3. Instruction Set

ASCII mode (COM3: M1320 = OFF, COM1: M1139 = OFF):

When X0 = ON, MODRW instruction executes the function specified by Function Code 05 PLC1 Ö PLC2, PLC sends: “01 05 0500 FF00 6F

PLC2 Ö PLC1, PLC receives: “01 05 0500 FF00 6F” (No data processing on received data)

RTU mode (COM3: M1320 = ON, COM1: M1139 = ON):

When X0 = ON, MODRW instruction executes the function specified by Function Code 05 PLC1Ö PLC2, PLC1 sends: “01 05 0500 FF00 8C F6

PLC2 ÖPLC1, PLC1 receives: “01 05 0500 FF00 8C F6” (No data processing on received data)

Program Example 7: COM2(RS-485), Function Code H06

1.Function code K6 (H06): Write in single word device.

2.Set the value to be written into VFD-B in the register specified by operand S.

3.For ASCII or RTU mode, PLC COM2 stores the data to be sent in D1256~D1295, and received data in D1070~D1085.

4.Take the connection between PLC (PLC COM2) and VFD-B for example, the tables below explains the status when PLC reads status of VFD-B. (M1143 = OFF, ASCII Mode) (M1143 = ON, RTU Mode)

M1002

 

 

D1120 Set communication protocol as 9600, 8, E, 1

 

 

 

 

 

 

 

MOV

H87

 

 

 

 

 

 

 

 

 

 

 

SET

M1120

Retain communication protocol

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

MOV

K100

D1129 Set communication timeout as 100ms

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

M1143 = OFF

 

 

 

 

 

 

M1143 = ON

 

 

 

 

 

 

 

RST

M1143

 

 

 

 

SET

M1143 RTU mode

 

 

 

 

 

 

 

ASCII mode

 

 

 

 

 

X0

 

 

 

 

 

 

 

 

 

 

M1122

Sending request

 

 

 

 

 

 

 

 

 

 

 

 

 

 

SET

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X0

 

 

 

 

H2000

D50

K1

 

 

 

 

 

 

 

 

MODRW

K1

K6

Data length

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Data storing register

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

D50=H1770

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Data address: H2000

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Function code K6

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

write in single data

Receiving completed

 

 

 

 

 

 

 

 

 

 

 

 

Connection device

M1127

 

 

 

 

 

 

 

 

 

 

 

 

address: K1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

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 format

 

 

 

 

 

 

 

 

RST

M1127

Reset M1127

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

3 - 3 4 7

Page 463
Image 463
Delta DVP-ES2/EX2/SS2/SA2/SX2/SE manual RTU mode COM3 M1320 = ON, COM1 M1139 = on