beautypg.com

Delta Electronics Programmable Logic Controller DVP-PLC User Manual

Page 406

background image

8 Application Instructions API 100-149

DVP-PLC Application Manual

8-4

Registers for received data (responding messages)

Register DATA

Explanation

D1070 low

01 H

Address

D1071 low

03 H

Function

D1072 low

04 H

Number of data (counted by bytes)

D1073 low

17 H

D1074 low

70 H

Content of address 2102 H

D1075 low

00 H

D1076 low

00 H

Content of address 2103 H

D1077 low

FE H

CRC CHK Low

D1078 low

5C H

CRC CHK High

Program Example 3:

1. In the communication between PLC and VFD-S series AC motor drive (ASCII Mode, M1143 = Off), retry when

communication time-out, data receiving error and sending address error occur.

2. When X0=On, PLC will read the data in VFFD-S data adress H2100 of device 01 and stores the data in ASCII

format in D1070 ~ D1085. PLC will automatically convert the data into numerals and stores them in D1050 ~

D1055.

3. M1129 will be On when communication time-out occurs. The program will trigger M1129 and send request to

M1122 for reading the data again.

4. M1140 will be On when data receiving error occurs. The program will trigger M1140 and send request to

M1122 for reading the data again.

5. M1141 will be On when sending address error occurs. The program will trigger M1141 and send request to

M1122 for reading the data again.

M1002

MOV

H87

D1120

SET

M1120

SET

M1122

MOV

K100

D1129

RST

M1127

M1127

X0

MODRD

K1

H2100

K 6

X0

M1129

M1140

M1141

RST

M1129

Set up communication protocol to 9600, 8, E, 1

Set up communication instruction:
device address 01, data address

H2100

data length 6 words

Communication time-out Retry

sending address error Retry

receiving completed

handle received data

M1127

M1129

Retain communication protocol

Set up communication time-out: 100ms

Set up communication time-out: 100ms

Data receiving error Retry

Communication time-out. The flag is reset.

Sending/receiving of data is completed. The flag is reset.

The received data are stored in D1070~D1085 in ASCII

format. PLC will automatically convert the data into
numerals and store them in D1050~D1055.