3. Instruction Set

3.In ASCII or RTU mode, when PLC’s COM2 sends out data, the data will be stored in D1256~D1295. The feedback data will be stored in registers starting with S and converted into D1296~D1311 in Hex automatically.

4.Take the connection between PLC1 (PLC COM2) and PLC2(PLC COM1) for example, the tables below explains the status when PLC1 reads Y0~Y17 of PLC2.

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 = ON

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

RST

M1143

M1143 = OFF

 

 

 

 

SET

M1143

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X0

 

 

ASCII mode

 

 

 

 

 

 

 

 

RTU mode

 

M1122

Sending request

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

SET

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X0

 

 

K2

H0500

D0

K16

 

 

 

 

 

 

 

 

 

 

 

 

MODRW

K1

 

Data length (bit)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Data storing register

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Data address Y0=H0500

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Function code K2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

read multiple bits

Receiving completed

 

 

 

 

 

 

 

 

 

 

 

 

 

Connection device

M1127

 

 

 

 

 

 

 

 

 

 

 

 

 

address K1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Processing received data

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

ASCII mode: The received data is stored in registers starting from D0 in ASCII format and PLC converts the content to registers D1296~D1311 in hexadecimal automatically.

RTU mode: The received data is stored in registers starting from D0 in Hex.

RST

M1127 Reset M1127

ASCII Mode (M1143 = OFF):

When X0 = ON, MODRW instruction executes the function specified by Function Code 02. PLC1Ö PLC2PLC1 sends: “01 02 0500 0010 E8

PLC2 ÖPLC1PLC1 receives: “01 02 02 3412 B5

Registers for data to be sent (sending messages)

Register

Data

 

 

Descriptions

D1256 Low

‘0’

 

30 H

ADR 1

Device address: ADR (1,0)

 

 

 

 

 

 

D1256

High

‘1’

 

31 H

ADR 0

 

 

D1257 Low

‘0’

 

30 H

CMD 1

Control parameter: CMD (1,0)

D1257 High

‘2’

 

32 H

CMD 0

 

 

 

 

 

 

 

 

 

D1258

Low

‘0’

 

30 H

 

 

 

 

 

 

 

 

 

D1258

High

‘5’

 

35 H

Y0 = H0500

 

D1259

Low

‘0’

 

30 H

Starting Data Address

 

 

 

 

 

 

 

D1259

High

‘0’

 

30 H

 

 

 

 

 

 

 

 

 

3 - 3 3 3

Page 449
Image 449
Delta DVP-ES2/EX2/SS2/SA2/SX2/SE manual Ascii Mode M1143 = OFF, Modrw