Instruction | Parameter | Devices | Offset modification | Pulse extension | |||||||||||||||||||||||
X | Y | M | S | SM | T(bit) | C(bit) | LC(bit) | HSC(bit) | D.b | KnX | KnY | KnM | KnS | T | C | D | R | SD | LC | HSC | K | H | E | [D] | XXP | ||
PID | Parameter 1 | ● | ● | ● | |||||||||||||||||||||||
Parameter 2 | ● | ● | ● | ||||||||||||||||||||||||
Parameter 3 | ● | ● | ● | ||||||||||||||||||||||||
Parameter 4 | ● | ● | ● |
PRUN/Octal digit transmission (16-bit data)
PRUN(P)
After processing the device numbers of (s) and (d) with specified digits as octal numbers, transfer the data.
-[PRUN (s) (d)]
Content, range and data type
Parameter | Content | Range | Data type | Data type (label) | Custom variable type |
---|---|---|---|---|---|
(s) | Digit specification*1 | - | BIN16 bit | ANY16 | -- |
(d) | Transfer target device number*1 | - | BIN16 bit | ANY16 | -- |
Device used
Instruction | Parameter | Devices | Index modification | Pulse expansion | |||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
X | Y | M | S | SM | T(bit) | C(bit) | LC(bit) | HSC(bit) | D.b | KnX | KnY | KnM | KnS | T | C | D | R | SD | LC | HSC | K | H | E | [D] | XXP | ||
PRUN | Parameter 1 | ● | ● | ● | ● | ||||||||||||||||||||||
Parameter 2 | ● | ● | ● | ● |
Function
• Octal digit device→ decimal digit device
• Decimal digit device → octal digit device
Error code
Error code | Content |
---|---|
4085H | When the specified device range for reading exceeds the range of the corresponding device |
4086H | When the specified device range for writing exceeds the range of the corresponding device |
Example
As shown in the above ladder diagram: X0~X17 takes the value of octal digits and pass it to the devices corresponding to M.
TRH/Wet and dry bulb temperature and humidity conversion
TRH
This command completes the conversion of dry bulb temperature, wet bulb temperature and corresponding humidity.
-[TRH (d1) (s) (d2) (n)]
Content, range and data type
Parameter | Content | Range | Data type | Data type (label) | Custom variable type |
---|---|---|---|---|---|
(d1) | Humidity | 0~100 | Single-precision floating point | ANYREAL_32 | REAL |
(s) | Dry bulb temperature | - | Single-precision floating point | ANYREAL_32 | REAL |
(d2) | Wet bulb temperature | - | Single-precision floating point | ANYREAL_32 | REAL |
(n) | Mode | 0 to 1 | Signed BIN 32 bit | ANY32 | DINT |
Device used
Instruction | Parameter | Devices | Index modification | Pulse expansion | |||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
X | Y | M | S | SM | T(bit) | C(bit) | LC(bit) | HSC(bit) | D.b | KnX | KnY | KnM | KnS | T | C | D | R | SD | LC | HSC | K | H | E | [D] | XXP | ||
TRH | Parameter 1 | ● | ● | ● | ● | ● | ● | ||||||||||||||||||||
Parameter 2 | ● | ● | ● | ● | ● | ● | |||||||||||||||||||||
Parameter 3 | ● | ● | ● | ● | ● | ● | |||||||||||||||||||||
Parameter 4 | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● |
Function
There are two modes to choose from (n):
Mode 0: Calculate the corresponding humidity by wet bulb temperature and dry bulb temperature.
Mode 1: Calculate the corresponding wet bulb temperature by dry bulb temperature and humidity.
The conversion process formula is as follows:
Assuming that the wet bulb temperature is A, the dry bulb temperature is B, and the corresponding current humidity is C, which meet the following conditions:
Precautions
·The wet bulb temperature is not greater than the dry bulb temperature. When they are the same, the humidity reaches the maximum value 100%.
·The unit of dry and wet bulb temperature is (oC).
·The general value range of dry bulb is between 0~100oC, and the command does not judge its range, so pay special attention when using this command.
Error code
Error code | Content |
---|---|
4084H | When the value specified in (n) exceeds the following range. 0 to 1 |
The value specified in (d1) exceeds the following range. 0 to 100 | |
A negative value is specified in (s). | |
A negative value is specified in (d2). | |
4085H | The output result of (d1)(s)(d2)(n) in the read application command exceeds the device range. |
4086H | The output result of the write application command (d1) and (d2) exceeds the device range. |
Example
Dry and wet bulb temperature/humidity conversion table