3. Instruction Set
3-291
Program Example:
Connect PLC to VFD series AC motor drive (ASCII mode, M1143 = OFF), (8-bit mode, M1161 = ON),
Write the data to be sent into registers starting from D100 in advance for reading 6 data from
address H0708 on VFD.
MOV D1120H86
M1002
SET M1120
SET M1122
MOV D1129K100
X10
M1123
RST
M1123
RS D100
K17
D120 K35
pulse
Receiving completed
Processing received data
Set up communication protocol to 9600, 7, E, 1
Retain communication protocol
Set up communication time-out: 100ms
Sending request
Reset M1123
Write data to be sent in advance
Sending request pulse
PLC VFD, PLC sends: “: 01 03 07 08 0006 E7 CR LF ”
Registers for sent data (sending messages)
Register Data Explanation
D100 low byte ‘: ’ 3A H STX
D101 low byte ‘0’ 30 H ADR 1
D102 low byte ‘1’ 31 H ADR 0
Address of AC motor
drive: ADR (1,0)
D103 low byte ‘0’ 30 H CMD 1
D104 low byte ‘3’ 33 H CMD 0
Command code:
CMD (1,0)
D105 low byte ‘0’ 30 H
D106 low byte ‘7’ 37 H
D107 low byte ‘0’ 30 H
D108 low byte ‘8’ 38 H
Starting data address
D109 low byte ‘0’ 30 H
D110 low byte ‘0’ 30 H
D111 low byte ‘0’ 30 H
D112 low byte ‘6’ 36 H
Number of data (words)
D113 low byte ‘E’ 45 H LRC CHK 0
D114 low byte ‘7’ 37 H LRC CHK 1
Error checksum: LRC
CHK (0,1)
D115 low byte CR D H
D116 low byte LF A H
END
The error checksum LRC CHK (0, 1) can be calculated by LRC instruction (8-bit mode, M1161 =
ON).
M1000
LRC D101 K12 D113