DVP-ES2/EX2/EC5/SS2/SA2/SX2/SE&TP Operation Manual - Programming
Example 1: Modifying COM1 communication format
1. Add the below instructions on top of the program to modify the communication format of COM1.
When PLC switches from STOP to RUN, the program will detect whether M1138 is ON in the
first scan. If M1138 is ON, the program will modify the communication settings of COM1
according to the value set in D1036
2. Modify COM1 communication format to ASCII mode, 9600bps, 7 data bits, even parity, 1 stop
bits (9600, 7, E, 1).
MOV
H86 D1036
SET M1138
M1002
Example 2: Modiying COM2 communication format
1. Add the below instructions on top of the program to modify the communication format of COM2.
When PLC switches from STOP to RUN, the program will detect whether M1120 is ON in the
first scan. If M1120 is ON, the program will modify the communication settings of COM2
according to the value set in D1120
2. Modify COM2 communication format to ASCII mode, 9600bps, 7 data bits, even parity, 1 stop
bits (9600, 7, E, 1)
MOV
H86 D1120
SET M1120
M1002
Example 3: Modifying COM3 communication format
1. Add the below instructions on top of the program to modify the communication format of
COM3. When PLC switches from STOP to RUN, the program will detect whether M1136 is
ON in the first scan. If M1136 is ON, the program will modify the communication settings of
COM3 according to the value set in D1109
2. Modify COM3 communication format to ASCII mode, 9600bps, 7 data bits, even parity, 1 stop
bits (9600, 7, E, 1).
MOV
H86 D1109
SET M1136
M1002
Example 4: RTU mode setting of COM1
、COM2、COM3
1. COM1, COM2 and COM3 support ASCII/RTU mode. COM1 is set by M1139, COM2 is set by
M1143 and COM3 is set by M1320. Set the flags ON to enable RTU mode or OFF to enable
ASCII mode.
2. Modify COM1/COM2/COM3 communication format to RTU mode, 9600bps, 8 data bits, even
parity, 1 stop bits (9600, 8, E, 1).