LK3U PLC Analog read and write instructions
Analog read and write instructions
Analog / NTC temperature read command RD3A | ||||||||||||||||||||
![]() | ||||||||||||||||||||
*m1- specifies the number of AD channels that need to be read (out of the maximum number of channels reported 6706 error); | ||||||||||||||||||||
*m2 - specify the upper and lower range of the register, m2 is the upper limit of the range, m2+1 is the lower limit of the range, only the D register can be specified as the range address, m2+2 is the first-order lag filter coefficient (0-128) is recommended to be set to 50, Other datagrams 6706 errors; | ||||||||||||||||||||
* The above program principle: When M0 is ON, read the first AD data (the upper limit range is at D0, the lower limit range is at D1) to D10. | ||||||||||||||||||||
Analog input range setting formula: | ||||||||||||||||||||
Input signal 0-10V/0-20mA:D0=External upper range; D1=External lower range, D2 customer is set according to site conditions; | ||||||||||||||||||||
Input signal 4-20mA: D0 = external upper range; D1 = external lower range - ((external upper range - external lower range) / 4; D2 is the same as above. | ||||||||||||||||||||
Example of analog input range setting: | ||||||||||||||||||||
Pressure transmitter range is 0-5Kpa | ||||||||||||||||||||
input sign 0-10V/0-20mA:D0=5000;D1=0;D2=50(customer can adjust the filter coefficient by himself); | ||||||||||||||||||||
input sign 4-20mA:D0=5000;D1=0-((5000-0)/4)=-1250;D2 is the same as above | ||||||||||||||||||||
The NTC temperature read command is the same as RD3A. The read format is the same. The only difference is that when reading the NTC temperature, the range register should not be set. The upper and lower ranges must be 0 at the same time. | ||||||||||||||||||||
*NTC10K temperature range -40 ° C ~ 150 ° C; *NTC50K temperature range -40 °C ~ 210 °C. | ||||||||||||||||||||
Analog write command WR3A | ||||||||||||||||||||
| ||||||||||||||||||||
*m1- specifies the number of DA channels that need to be output (beyond the 6712 error); | ||||||||||||||||||||
*m2--Specify the upper and lower range range registers, m2 is the upper limit of the range, m2+1 is the lower limit of the range, only the D register can be specified as the range address, and other datagrams are 6712 errors; | ||||||||||||||||||||
*The above program principle: When M0 is ON, the data of D10 (the upper limit range is D0 and the lower limit range is D1) is output to DA0. | ||||||||||||||||||||
Follow the procedure above: | ||||||||||||||||||||
1) For example: D0=1000, D1=0, the output voltage of DA is 0~10V, the data of D10 is 500, and the output of DA is 5V; | ||||||||||||||||||||
2) For example: D0=0, D1=0, the output voltage of DA is 0~10V, the data of D10 is 2048, and the output of DA is 5V; | ||||||||||||||||||||
3) For example: D0=1000, D1=-1000, the output voltage of DA is 0~10V, the data of D10 is 0, and the output of DA is 5V; | ||||||||||||||||||||
Weighing function description | ||||||||||||||||||||
*Weighing function related auxiliary relays and registers please see: Special relay M function description and special register D function description. LK3U PLC-Communication port pin definition LK3U PLC Supported instructions LK3U PLC Special relay M function description LK3U PLC Special register D function description LK3U PLC High-speed counter instructions LK3U PLC High-speed counter instructions |