3. Instruction Set
Program Example 1:
Communication between PLC and VFD-B series AC motor drives (ASCII Mode, M1143 = OFF)
MOV D1120
H87
M1002
SET M1120
M1127
Receiving
completed
Set communication protocol as 9600, 8, E, 1
Retain communication protocol
Set receiving time-out as 100ms
Processing received data
Reset M1127
Sending request
X1
X0
MODRD K1 H2101 K6
Set communication instruction:
D
Data address: H2101
D
ata length: 6 words
evice address: 01
PLC converts the received ASCII data in
D1070~D1085 into Hex data and stores them
into D1050~D1055
MOV D1129
K100
SET M1122
RST
M1127
PLC → VFD-B , PLC transmits: “01 03 2101 0006 D4”
VFD-B → PLC , PLC receives: “01 03 0C 0100 1766 0000 0000 0136 0000 3B”
Registers for data to be sent (sending messages)
Address of AC motor drive:
ADR (1,0)
Command code: CMD (1,0)
Starting data address
Number of data (count by word)
Checksum: LRC CHK (0,1)