2 Functions of Devices in DVP-PLC the program will modify the relevant settings of COM1 according to the value set in D1036. 2. Modify the communication format of COM1 into ASCII mode, 115,200bps, 7 data bits, even parity, 1 stop bit (115,200, 7, E, 1) M1002 Notes: 1. After the communication format is modified, the format will stay intact when PLC switches from RUN to STOP. 2. If you shut down the power of the PLC and repower it again, the modified communication format will return to default setting. Example 3: Modifying the communication format of COM3 1. The communication format of COM3 is fixed as 7 data bits, even parity, 1 stop bit.
Add the program code below on top of the program to modify the baud rate of COM3 into 38,400bps. When PLC switches from STOP to TUN, the program will detect whether M1136 is On in the first scan time. If M1136 is On, the program will modify the relevant settings of COM3 according to the value set in D1109. 2. Modify the baud rate of COM3 into 38,400bps M1002 Notes: 1. After the communication format is modified, the format will stay intact when PLC switches from RUN to STOP. 2. If you shut down the power of the PLC and repower it again, the modified communication format will return to default setting. 1. COM1 and COM2 support ASCII/RTU mode. COM1 is set by M1139 and COM2 is set by M1143.
When the flags Example 4: Setting up RTU mode of COM1 and COM2 are On, they are in RTU mode; when the flags are Off, they are in ASCII mode. 2. How to set up RTU mode COM1: (9,600, 8, E, 1, RTU) M1002 DVP-PLC Application Manual 2-83 MOV H86 D1036 SET M1138 MOV HA0 D1109 SET M1136 MOV H86 D1036 SET M1138 SET M1139