11 PID Control Instruction

Version 2.1 by Iris on 2025/09/17 17:54

InstructionParameterDevices

Offset

modification

Pulse

extension

XYMSSMT(bit)C(bit)LC(bit)HSC(bit)D.bKnXKnYKnMKnSTCDRSDLCHSCKHE[D]XXP
PIDParameter 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

ParameterContentRangeData typeData type (label)Custom variable type
(s)Digit specification*1-BIN16 bitANY16--
(d)Transfer target device number*1-BIN16 bitANY16--

Device used

InstructionParameterDevicesIndex modificationPulse expansion
  XYMSSMT(bit)C(bit)LC(bit)HSC(bit)D.bKnXKnYKnMKnSTCDRSDLCHSCKHE[D]XXP
PRUNParameter 1                      
Parameter 2                      

Function

• Octal digit device→ decimal digit device

1709790843788-781.png

• Decimal digit device → octal digit device

1709790863850-104.png

Error code

Error codeContent
4085HWhen the specified device range for reading exceeds the range of the corresponding device
4086HWhen the specified device range for writing exceeds the range of the corresponding device

Example 

1709790902188-165.png

As shown in the above ladder diagram: X0~X17 takes the value of octal digits and pass it to the devices corresponding to M.

1709790924438-346.png

TRH/Wet and dry bulb temperature and humidity conversion


file:///C:\Users\ADMINI~1\AppData\Local\Temp\ksohtml13328\wps3.pngTRH

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

ParameterContentRangeData typeData type (label)Custom variable type
(d1)Humidity0~100Single-precision floating pointANYREAL_32REAL
(s)Dry bulb temperature-Single-precision floating pointANYREAL_32REAL
(d2)Wet bulb temperature-Single-precision floating pointANYREAL_32REAL
(n)Mode0 to 1Signed BIN 32 bitANY32DINT

Device used 

InstructionParameterDevicesIndex modificationPulse expansion
  XYMSSMT(bit)C(bit)LC(bit)HSC(bit)D.bKnXKnYKnMKnSTCDRSDLCHSCKHE[D]XXP
TRHParameter 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:

1709791199711-348.png

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 codeContent
4084HWhen 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).
4085HThe output result of (d1)(s)(d2)(n) in the read application command exceeds the device range.
4086HThe output result of the write application command (d1) and (d2) exceeds the device range.

Example 

1709791591456-917.png

Dry and wet bulb temperature/humidity conversion table

1709791607332-438.png