Delta DVP-ES2/EX2/SS2/SA2/SX2/SE Two-Way Radio User Manual


 
3. Instruction Set
3-355
Program Example 11: COM2 (RS-485), Function Code H10
1. Function code K16 (H10): Write in multiple Word devices. Up to 16 Words can be written. For
PLC COM2 ASCII mode, only 8 words can be written.
2. For ASCII or RTU mode, PLC COM2 stores the data to be sent in D1256~D1295, and the
received data in D1070~D1085.
3. Take the connection between PLC COM2 and VFD-B AC motor drive for example, the tables
below explain the status when PLC COM2 writes multiple word devices in VFD-B.
H87MOV
M1002
D1120
SET M1120
K100
MOV
D1129
RST M1127
Set communication protocol as 9600, 8, E, 1
Retain communication protocol
Set communication timeout as 100ms
MODRW K16K1
X0
H2000 D50 K2
Connection device
address: K1
Function code: K16
write in multiple Words
Data address: H2000
Data storing register
Data length(word)
Processing received data
ASCII mode: The received data is stored in D1070~D1085 in ASCII format
RTU mode: The received data is stored in D1070~D1085 in Hex
Reset M1127
M1127
SET
X0
M1122
Sending request
M1143 = OFF
ASCII mode
RST
M1143
M1143 = ON
RTU mode
SET
M1143
Receiving completed
ASCII mode (M1143 = OFF)
When X0 = ON, MODRW instruction executes the function specified by Function Code H10
PLC ÖVFD-B, PLC transmits: “01 10 2000 0002 04 1770 0012 30”
VFDÖPLC, PLC receives: “01 10 2000 0002 CD”
Registers for
data to be sent (sending messages)
Register Data Descriptions
D1256 Low byte ‘0’ 30 H ADR 1
D1256 High byte ‘1’ 31 H ADR 0
Address of VFD: ADR (1,0)
D1257 Low byte ‘1’ 31 H CMD 1
D1257 High byte ‘0’ 30 H CMD 0
Control parameter: CMD (1,0)
D1258 Low byte ‘2’ 32 H
Data Address