
COOLMAY EX3G PLC/HMI All in one Programming manual
29
2.6.6 Demo example
Below is an example of EX3G 1 channel temperature analog AD0 acquisition. The program reads the
values as follows:
Connect the signal terminal of the temperature sensor to the AD0 input of the PLC and the other end to
the GND of the analog input port.
When the PLC is running, the value of the data register D8030 corresponding to AD0 will be
transmitted to D0, the value of D0 will be put into D10 after floating point operation, and then the floating
point number division operation will be performed on D10, and then operation result will be put into D20,
the result D20 is the actual Temperature value.
In the ladder diagram, you can also directly divide the value of D8030.
Note: When the input is 0-10V analog, the actual analog value = register reading / 400;
When the input is temperature, the actual temperature value = register reading/10;
When the input is 0-20mA analog, the actual analog value = register reading / 200;
When the input is 4-20 mA analog, the actual analog value = register reading / 250 + 4.
The analog correction is corrected for the size. The following figure is an example of correcting the
AD0 temperature after acquisition:
If the current temperature is 37.9
℃
,the actual test is 47.9
°
C, the error is 10
°
C, you need to modify
the size correction register, show as below: