2. Programming Concepts

 

 

Content

 

 

 

 

 

 

b7

 

 

0100(H4):

600

 

 

 

0101(H5):

1200

 

 

 

0110(H6):

2400

 

 

 

0111(H7):

4800

 

 

 

1000(H8):

9600

 

 

 

1001(H9):

19200

 

 

 

1010(HA):

38400

 

 

 

1011(HB):

57600

 

 

 

1100(HC):

115200

 

 

 

1101(HD):

500000 (COM2 /

 

 

 

COM3)

 

 

 

 

 

 

 

1110(HE):

31250 (COM2 /

 

 

 

COM3)

 

 

 

 

 

 

 

1111(HF):

921000 (COM2 /

 

 

 

COM3)

 

 

 

 

b8

Select start bit

 

0: None

1: D1124

b9

Select the 1st end bit

 

0: None

1: D1125

b10

Select the 2nd end bit

 

0: None

1: D1126

b11~b15

Undefined

 

 

 

 

 

 

 

 

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).

M1002

MOV

H86 D1036

SET

M1138

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)

.

M1002

MOV

H86

D1120

 

 

 

 

 

 

SET

M1120

 

 

 

 

2 - 6 3

Page 95
Image 95
Delta DVP-ES2/EX2/SS2/SA2/SX2/SE manual COM3, Example 1 Modifying COM1 communication format