DVP-ES2/EX2/SS2/SA2/SX2/SE Operation Manual - Programming
3-206
Program Example 3: COM2 RS-485
1. Connect PLC to VFD-B series AC motor drives (AC motor drive in ASCII Mode; PLC in 16-bit
mode and M1161 = OFF).
2. Write the data to be sent into registers starting from D100 in advance in order to read 6 data
starting from address H2101 on VFD-B
MOV
D1120H86
M1002
SET
M1120
SET M1122
MOV D1129K100
X0
M1123
RST M1123
RS
D100
K17
D120 K35
Processing received data
Set up communication protocol as
9600,7,E,1
Retain communication protocol
Set up communication time-out as 100ms
Write transmitting data in advance
Sending request
Reset M1123
Pulse for
sending request
Receiving
completed
PLC Ö VFD-B, PLC sends “: 01 03 2101 0006 D4 CR LF “
VFD-B Ö PLC, PLC receives “: 01 03 0C 0100 1766 0000 0000 0136 0000 3B CR LF “
Registers for sent data (PLC sends out messages)
Register Data Explanation
D100 low ‘: ’ 3A H STX
D100 high ‘0’ 30 H ADR 1
D101 low ‘1’ 31 H ADR 0
Address of AC motor drive: ADR (1,0)
D101 high ‘0’ 30 H CMD 1
D102 low ‘3’ 33 H CMD 0
Instruction code: CMD (1,0)
D102 high ‘2’ 32 H
D103 low ‘1’ 31 H
D103 high ‘0’ 30 H
D104 low ‘1’ 31 H
Start data address
D104 high ‘0’ 30 H
D105 low ‘0’ 30 H
D105 high ‘0’ 30 H
D106 low ‘6’ 36 H
Number of data (counted by words)
D106 high ‘D’ 44 H LRC CHK 1
D107 low ‘4’ 34 H LRC CHK 0
Error checksum: LRC CHK (0,1)
D107 high CR D H
D108 low LF A H
END