C h a p t e r 3 F r e q u e n t l y A s k e d Q u e s t i o n s a n d A n s w e r s
3.3
Setting COM2
【
Question
】
How to set COM2?
【
Answer
】
COM2 supports the PLC. It is set in the same way as a DVP series PLC is. It is set by means of
special D registers and special M devices. Please refer to the table below for more information.
Communication parameter
Register
Communication format
D1120
The communication set holds.
M1120
ASCII (Off)/RTU (On) mode
M1143
Slave station address
D1121
Communication timeout
D1129
A communication timeout occurs.
M1129
Users can set a communication protocol according to the table below.
Contents
b0
Data length
0: 7
1: 8
(If RTU communication is used, the number of data bits
set must be 8.)
b1
b2
Parity bit
00: None
01: Odd
11: Even
b3
Number of stop bits
0: 1 bit
1: 2 bits
b4
b5
b6
b7
Serial transmission rate
0001 (H1): 110
0010 (H2): 150
0011 (H3): 300
1011 (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
1110 (HE): 32150
b8
Start-of-text character
None
D1124
b9
First end-of-text character
None
D1125
b10
Second end-of-text character
None
D1126
b11~b15
undefined
Example: COM2 uses ASCII communication.
If the communication format that COM2 uses is the ASCII communication protocol (9600, 7, E, 1), the program
code below must be added to the top of the program in the PLC. When the PLC runs during the first program
scan, it checks whether M1120 is ON. If M1120 is ON, the setting of COM2 will be changed according to the
value in D1120.
3 - 5