17.03.2014 Views

DVP-ES2-EX2-SS2-SA2-SX2-Operation Manual

DVP-ES2-EX2-SS2-SA2-SX2-Operation Manual

DVP-ES2-EX2-SS2-SA2-SX2-Operation Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

3. Instruction Set<br />

3. In ASCII or RTU mode, when PLC’s COM2 sends out data, the data will be stored in<br />

D1256~D1295. The feedback data will be stored in registers starting with S and converted into<br />

D1296~D1311 in Hex automatically.<br />

4. Take the connection between PLC1 (PLC COM2) and PLC2(PLC COM1) for example, the<br />

tables below explains the status when PLC1 reads Y0~Y17 of PLC2.<br />

M1002<br />

MOV<br />

H87<br />

D1120<br />

Set communication protocol as 9600, 8, E, 1<br />

SET<br />

M1120<br />

Retain communication protocol<br />

MOV<br />

K100<br />

D1129<br />

Set communication timeout as 100ms<br />

X0<br />

X0<br />

RST<br />

SET<br />

MODRW<br />

M1143<br />

M1122<br />

K1<br />

K2<br />

Receiving completed<br />

M1127<br />

Processing received data<br />

M1143 = OFF<br />

ASCII mode<br />

Sending request<br />

SET<br />

H0500 D0 K16<br />

M1143<br />

M1143 = ON<br />

RTU mode<br />

Data length (bit)<br />

Data storing register<br />

Data address Y0=H0500<br />

Function code K2<br />

read multiple bits<br />

Connection device<br />

address K1<br />

ASCII mode: The received data is stored in registers starting from D0 in ASCII format and<br />

PLC converts the content to registers D1296~D1311 in hexadecimal automatically.<br />

RTU mode: The received data is stored in registers starting from D0 in Hex.<br />

RST<br />

M1127<br />

Reset M1127<br />

ASCII Mode (M1143 = OFF):<br />

When X0 = ON, MODRW instruction executes the function specified by Function Code 02.<br />

PLC1 PLC2,PLC1 sends: “01 02 0500 0010 E8”<br />

PLC2 PLC1,PLC1 receives: “01 02 02 3412 B5”<br />

Registers for data to be sent (sending messages)<br />

Register Data Descriptions<br />

D1256 Low ‘0’ 30 H ADR 1<br />

D1256 High ‘1’ 31 H ADR 0<br />

Device address: ADR (1,0)<br />

D1257 Low ‘0’ 30 H CMD 1<br />

D1257 High ‘2’ 32 H CMD 0<br />

Control parameter: CMD (1,0)<br />

D1258 Low ‘0’ 30 H<br />

D1258 High ‘5’ 35 H Y0 = H0500<br />

D1259 Low ‘0’ 30 H Starting Data Address<br />

D1259 High ‘0’ 30 H<br />

3-333

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!