XGB Analog edition manual
2 - 34
2.13 Example Program
2.13.1 Program to sort A/D converted value in size
(1) System configuration
(2) Initial setting
No. Item Details
Internal memory
address
The value to write in
internal memory
1 Channel Ch0, Ch1, Ch2 0 h0007
2 Input voltage range 0 ~ 10 V 1 h0000
3 Output data range 0 ~ 4000 2 h0000
4 Filter process Ch 0 3 h0001
5 Ch 0 filter constant 50 4 50
6 Average process Ch1, Ch2 12 h0006
6
Average process
method
Frequency average: Ch1
Time average: Ch2
13 h0100
7 Average value
Frequency average value:
100 (times)
15 100
Time average value:
200 (ms)
16 200
(3) Program
(a) If Ch 0’s digital value is less than 3000, Contact No. 0 (P00080) of relay output module
installed on Slot No.2 will be On.
(b) If CH 1’s digital value is greater than 3200, Contact No.2 (P00082) of relay output module
installed on Slot No.2 will be On.
(c) If CH 2’s digital value is greater than or equal to 3000 and less than or equal to 3200, Contact
No.4 (P00086) of relay output module installed on Slot No.2 will be On.
(d) If CH 2’s digital value is equal to 3200, Contact No.5 (P00085) of relay output module installed
on Slot No.2 will be On.