beautypg.com

Delta DVP-ES2 User Manual

Page 448

background image

D V P - E S 2 / E X 2 / S S 2 / S A2 / S X 2 / S E O p e r a t i o n M a n u a l - P r o g r a m m i n g

3 - 3 3 2

COM2 sends the function code of reading(K2/K3), the registers from S directly receive the

data string and stored the converted data in D1296~D1311. Please refer to program example

1 and 3 for further explanation. When COM1 or COM3 sends the function code of

reading(K2/K3), the registers store the converted data directly. Refer to program example 2

and 4 for further explanations.

6.

n: Data length for accessing.

z When

S

2

(MODBUS function code) is specified as H05 which designates the PLC force

ON/OFF status, n = 0 indicates ON and n = 1 indicates OFF.

z When

S

2

is specified as H02, H03, H0F, H10 which designate the data length for

accessing, the available set range will be K1~Km, where m value should be specified

according to communication modes and COM ports as the table below. (H02/H0F, unit:

Bit. H03/H10, unit: Word.)

COM. mode

COM

H02

H03

H0F

H10

COM1

K 64

K 16

K 64

K 16

COM2

K 64

K 16

K 64

K 16

RTU

COM3

K 64

K 16

K 64

K 16

COM1

K 64

K 16

K 64

K 16

COM2

K 64

K 8

K 64

K 8

ASCII

COM3

K 64

K 16

K 64

K 16

7.

There is no limitation on the times of using this instruction, however only one instruction can be

executed on the same COM port at a time.

8.

Rising-edge contact (LDP, ANDP, ORP) and falling-edge contact (LDF, ANDF, ORF) can not

be used as drive contact of MODRW (Function code H02, H03) instruction, otherwise the data

stored in the receiving registers will be incorrect.

9.

If rising-edge contacts (LDP, ANDP, ORP) or falling-edge contacts (LDF, ANDF, ORF) is used

before MODWR instruction, sending request flag M1122(COM2) / M1312(COM1) /

M1316(COM3) has to be executed as a requirement.

10. MODRW instruction determines the COM port according to the communication request. The

COM port determination is made following the order: COM1

ÆCOM3ÆCOM2. Therefore,

please insert every MODRW instruction right after the sending request instruction for avoiding

errors on the target location for data access.

11. For detailed explanation of the associated flags and special registers, please refer to Points to

note of API 80 RS instruction.

Program Example 1: COM2(RS-485), Function Code H02

1.

Function code K2 (H02): read multiple bit devices, up to 64 bits can be read..

2.

PLC1 connects to PLC2: (M1143 = OFF, ASCII mode), (M1143 = ON, RTU Mode)

This manual is related to the following products: