API Mnemonic Operands Function Controllers: DVP-ES2/EX2/SS2/SA2/SX2/SE&TP Operation Manual - Programming

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

D V P - E S 2 / E X 2 / S S 2 / S A2 / S X 2 / S E & T P O p e r a t i o n M a n u a l - P r o g r a m m i n g

API Mnemonic Operands Function Controllers


ES2/EX2 SS2 SA2 SX2
100 MODRD Read Modbus Data SE

Type Bit Devices Word devices Program Steps


OP X Y M S K H KnX KnY KnM KnS T C D E F MODRD: 7 steps
S1 * * *
S2 * * *
n * * *
PULSE 16-bit 32-bit
SA2 SA2 SA2
ES2/EX2 SS2 SX2 ES2/EX2 SS2 SX2 ES2/EX2 SS2 SX2
SE SE SE

Operands:
S1: Device address (K0~K254) S2: Data address n: Data length (K1<n≦K6)

Explanations:
1. MODRD instruction supports COM2 (RS-485).
2. MODRD is an instruction exclusively for peripheral communication equipment in MODBUS
ASCII/RTU mode. The built-in RS-485 communication ports in Delta VFD drives (except for
VFD-A series) are all compatible with MODBUS communication format. MODRD can be used
for communication (read data) of Delta drives.
3. If the address of S2 is illegal for the designated communication device, the device will respond
with an error, PLC will record the error code in D1130 and M1141 will be ON.
4. The feedback (returned) data from the peripheral equipment will be stored in D1070 ~ D1085.
After data receiving is completed, PLC will check the validity of the data automatically. If there
is an error, M1140 will be ON.
5. The feedback data are all ASCII codes in ASCII mode, so PLC will convert the feedback data
into hex data and store them in D1050 ~ D1055. D1050 ~ D1055 is invalid in RTU mode.
6. If peripheral device receives a correct record (data) from PLC after M1140/M1141 = ON, the
peripheral device will send out feedback data and PLC will reset M1140/M1141 after the
validity of data is confirmed.
7. There is no limitation on the times of using this instruction, but only one instruction can be
executed at a time on the same COM port.
8. Rising-edge contact (LDP, ANDP, ORP) and falling-edge contact (LDF, ANDF, ORF) can not
be used with MODRD instruction, otherwise the data stored in the receiving registers will be
incorrect.
9. For associated flags and special registers, please refer to Points to note of API 80 RS
instruction.

3-276
3. Instruction Set

Program Example 1:
Communication between PLC and VFD-B series AC motor drives (ASCII Mode, M1143 = OFF)

M1002
MOV H87 D1120 Set communication protocol as 9600, 8, E, 1

SET M1120 Retain communication protocol

MOV K100 D1129 Set receiving time-out as 100ms


X1
SET M1122 Sending request
X0
MODRD K1 H2101 K6
Set communication instruction:
Data length: 6 words
Data address: H2101
Device address: 01
M1127 PLC converts the received ASCII data in
Processing received data D1070~D1085 into Hex data and stores them
into D1050~D1055

Receiving RST M1127 Reset M1127


completed

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)


Register Data Descriptions
D1089 low byte ‘0’ 30 H ADR 1 Address of AC motor drive:
D1089 high byte ‘1’ 31 H ADR 0 ADR (1,0)

D1090 low byte ‘0’ 30 H CMD 1


Command code: CMD (1,0)
D1090 high byte ‘3’ 33 H CMD 0
D1091 low byte 2’ 32 H
D1091 high byte ‘1’ 31 H
Starting data address
D1092 low byte ‘0’ 30 H
D1092 high byte ‘1’ 31 H
D1093 low byte ‘0’ 30 H
D1093 high byte ‘0’ 30 H
Number of data (count by word)
D1094 low byte ‘0’ 30 H
D1094 high byte ‘6’ 36 H
D1095 low byte ‘D’ 44 H LRC CHK 1
Checksum: LRC CHK (0,1)
D1095 high byte ‘4’ 34 H LRC CHK 0

3-277
D V P - E S 2 / E X 2 / S S 2 / S A2 / S X 2 / S E & T P O p e r a t i o n M a n u a l - P r o g r a m m i n g

Registers for received data (responding messages)


Register Data Descriptions
D1070 low byte ‘0’ 30 H ADR 1
D1070 high byte ‘1’ 31 H ADR 0
D1071 low byte ‘0’ 30 H CMD 1
D1071 high byte ‘3’ 33 H CMD 0
D1072 low byte ‘0’ 30 H
Number of data (count by byte)
D1072 high byte ‘C’ 43 H
D1073 low byte ‘0’ 30 H 0100 H
D1073 high byte ‘1’ 31 H Content of address PLC automatically converts
D1074 low byte ‘0’ 30 H 2101 H ASCII codes and store the
D1074 high byte ‘0’ 30 H converted value in D1050
D1075 low byte ‘1’ 31 H 1766 H
D1075 high byte ‘7’ 37 H Content of address PLC automatically converts
D1076 low byte ‘6’ 36 H 2102 H ASCII codes and store the
D1076 high byte ‘6’ 36 H converted value in D1051
D1077 low byte ‘0’ 30 H 0000 H
D1077 high byte ‘0’ 30 H Content of address PLC automatically converts
D1078 low byte ‘0’ 30 H 2103 H ASCII codes and store the
D1078 high byte ‘0’ 30 H converted value in D1052
D1079 low byte ‘0’ 30 H 0000 H
D1079 high byte ‘0’ 30 H Content of address PLC automatically converts
D1080 low byte ‘0’ 30 H 2104 H ASCII codes and store the
D1080 high byte ‘0’ 30 H converted value in D1053
D1081 low byte ‘0’ 30 H 0136 H
D1081 high byte ‘1’ 31 H Content of address PLC automatically converts
D1082 low byte ‘3’ 33 H 2105 H ASCII codes and store the
D1082 high byte ‘6’ 36 H converted value in D1054
D1083 low byte ‘0’ 30 H 0000 H
D1083 high byte ‘0’ 30 H Content of address PLC automatically converts
D1084 low byte ‘0’ 30 H 2106 H ASCII codes and store the
D1084 high byte ‘0’ 30 H converted value in D1055
D1085 low byte ‘3’ 33 H LRC CHK 1
D1085 high byte ‘B’ 42 H LRC CHK 0

3-278

You might also like