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

Register

Data

Descriptions

D1074 Low byte

FF H

Data content (ON = FF00H)

 

 

D1075 Low byte

00 H

 

 

 

 

D1076 Low byte

8C H

CRC CHK Low

 

 

 

D1077 Low byte

F6 H

CRC CHK High

 

 

 

Program example 6: COM1(RS-232) / COM3(RS-485), Function Code H05

1.Function Code K5 (H05): Force ON/OFF bit device.

2.PLC1 connects PLC2: (M1320 = OFF, ASCII Mode ), (M1320 = ON, RTU Mode)

3.n = 1 indicates Force ON (set FF00H) and n = 0 indicates Force OFF (set 0000H)

4.PLC COM1/COM3 will not process the received data.

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

z If PLC1 applies COM1 for communication, the below program can be usable by changing:

1.D1109→D1036: communication protocol

2.M1136→M1138: retain communication setting

3.D1252→D1249: Set value for data receiving timeout

4.M1320→M1139: ASCII/RTU mode selection

5.M1316→M1312: sending request

6.M1318→M1314: receiving completed flag

M1002

 

 

 

 

 

 

MOV

H87

D1109

Set communication protocol as 9600,8,E,1

 

 

 

 

 

 

 

 

 

 

 

 

 

SET

M1136

Retain communication protocol

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

MOV

K100

D1252

Set receiving timeout as 100ms

M1320 = ON

 

 

 

 

 

 

 

 

 

 

 

 

RST

M1320

M1320 = OFF

 

 

 

 

SET

M1320

 

 

 

 

 

 

ASCII mode

 

 

 

 

RTU mode

 

X0

 

 

 

 

 

 

 

 

 

 

 

 

Sending request

 

 

 

 

 

 

 

 

 

 

 

 

 

 

SET

M1316

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X0

 

 

K5

H0500

D0

K1

 

 

 

 

 

 

 

 

MODRW

K1

Force ON status (Set FF00H)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Reserved

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Data address : Y0 = H0500

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Function Code K5:

Receiving completed

 

 

 

 

 

 

 

 

 

 

 

 

Force ON/OFF bit device

 

 

 

 

 

 

 

 

 

 

 

 

Connection device address: K1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

M1318

Received data

ASCII mode: No processing on received data .

RTU mode: No processing on received data .

RST

M1318 Reset M1318

3 - 346

Page 462
Image 462
Delta DVP-ES2/EX2/SS2/SA2/SX2/SE manual Program example 6 COM1RS-232 / COM3RS-485, Function Code H05