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.

<strong>DVP</strong>-<strong>ES2</strong>/<strong>EX2</strong>/<strong>SS2</strong>/<strong>SA2</strong>/<strong>SX2</strong>/SE <strong>Operation</strong> <strong>Manual</strong> - Programming<br />

3. When data receiving is completed, M1123 will automatically be ON. When data processing on<br />

the received data is completed, M1123 has to be reset (OFF) and the PLC will be ready for<br />

communication again. However, DO NOT continuously execute RST M1123, i.e. it is<br />

suggested to connect the RST M1123 instruction after the drive contact M1123.<br />

M1002<br />

MOV<br />

H86<br />

D1120<br />

Set up communication protocol as<br />

9600, 7, E, 1<br />

SET<br />

M1120<br />

Retain communication protocol<br />

Pulses for<br />

sending request<br />

Pulse<br />

X0<br />

Receiving<br />

completed<br />

M1123<br />

MOV K100 D1129 Set up communication time-out as 100ms<br />

Write transmitting data in advance<br />

SET M1122 Sending request<br />

RS D100 K10 D120 K10<br />

Processing received data<br />

RST M1123 Reset M1123<br />

Program Example 2: COM2 RS-485<br />

Switching between 8-bit mode (M1161 = ON) and 16-bit mode (M1161 = OFF)<br />

8-bit mode:<br />

1. STX (Start of Text) and ETX (End of text) are set up by M1126 and M1130 together with<br />

D1124~D1126. When PLC executed RS instruction, STX and ETX will be sent out<br />

automatically.<br />

2. When M1161 = ON, only the low byte (lower 8 bits) is valid for data communication, i.e. high<br />

byte will be ignored and low byte will be received and transmitted.<br />

M1000<br />

X0<br />

M1161<br />

RS<br />

D100<br />

K4<br />

D120<br />

K7<br />

Sending data: (PLC -> external equipment)<br />

STX D100L D101L D102L D103L ETX1 ETX2<br />

source data register, starting from<br />

the lower 8 bits of D100<br />

length = 4<br />

3-204

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

Saved successfully!

Ooh no, something went wrong!