beautypg.com

2 functions of devices in dvp-plc – Delta Electronics Programmable Logic Controller DVP-PLC User Manual

Page 108

background image

2 Functions of Devices in DVP-PLC

DVP-PLC Application Manual

2-80

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

MOV

HA0

D1109

SET

M1136

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 4: Setting up RTU mode of COM1 and COM2

1. COM1 and COM2 support ASCII/RTU mode. COM1 is set by M1139 and COM2 is set by M1143. When the flags

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)

MOV

H86

D1036

SET

M1138

M1002

SET

M1139

COM2: (9,600, 8, E, 1, RTU)

MOV

H86

D1120

SET

M1120

M1002

SET

M1143

3. COM2 of EH/EH2/SV series MPU supports the generation of interruption I170 when the data receiving is

completed in Slave mode.

4. Normally when the communication terminal of the PLC is in Slave mode, PLC will not immediately process the

communication data entered but process it after the END is executed. Therefore, when the scan time is very long

and you need the communication data to be processed immediately, you can use interruption I170 for this matter.

5. Example of interruption I170 (after the data receiving is completed in Slave mode)