DVP-ES2/EX2/SS2/SA2/SX2/SE Operation Manual - Programming

3.When data receiving is completed, M1123 will automatically be ON. When data processing on the received data is completed, M1123 has to be reset (OFF) and the PLC will be ready for communication again. However, DO NOT continuously execute RST M1123, i.e. it is

suggested to connect the RST M1123 instruction after the drive contact M1123.

M1002

H86

D1120

Set up communication protocol as

 

 

 

 

MOV

 

 

 

 

9600, 7, E, 1

 

 

 

 

 

 

 

 

 

 

 

SET

M1120

Retain communication protocol

 

 

 

 

 

 

 

 

MOV

K100

D1129 Set up communication time-out as 100ms

 

 

 

 

Pulses for

 

 

 

sending request

 

 

 

Pulse

X0

Write transmitting data in advance

SET

M1122 Sending request

 

 

 

 

 

RS

D100

K10

D120

K10

 

 

 

 

 

 

Receiving

 

 

 

 

 

completed

 

 

 

 

 

 

 

 

 

Processing received data

 

 

 

 

 

 

 

 

 

 

M1123

 

M1123

Reset M1123

 

 

 

 

 

 

RST

 

 

 

 

 

 

 

Program Example 2: COM2 RS-485

Switching between 8-bit mode (M1161 = ON) and 16-bit mode (M1161 = OFF)

8-bit mode:

1.STX (Start of Text) and ETX (End of text) are set up by M1126 and M1130 together with D1124~D1126. When PLC executed RS instruction, STX and ETX will be sent out automatically.

2.When M1161 = ON, only the low byte (lower 8 bits) is valid for data communication, i.e. high byte will be ignored and low byte will be received and transmitted.

M1000

M1161

X0

RS

D100

K4

D120

K7

Sending data: (PLC -> external equipment)

STX

D100L

D101L

D102L

D103L

ETX1

ETX2

source data register, starting from the lower 8 bits of D100

length = 4

3 - 204

Page 320
Image 320
Delta DVP-ES2/EX2/SS2/SA2/SX2/SE manual Program Example 2 COM2 RS-485, Bit mode