beautypg.com

Delta DVP-ES2 User Manual

Page 319

background image

3 . I n s t r u c t i o n S e t

3 - 2 0 3

API Mnemonic

Operands

Function

80

RS

Serial Communication

Controllers

ES2/EX2 SS2 SA2

SE

SX2

Bit Devices

Word devices

Program Steps

Type

OP

X Y

M S K H KnX KnY KnM KnS T C D E F

S

*

m

*

*

*

D

*

n

*

*

*

RS: 9 steps

PULSE 16-bit 32-bit

ES2/EX2 SS2

SA2

SE

SX2 ES2/EX2 SS2

SA2

SE

SX2 ES2/EX2 SS2

SA2

SE

SX2

Operands:

S: Start device for data to be sent m: Length of data to be sent (m = 0~256) D: Start device for

data to be received n: Length of data to be received (n = 0~255)

Explanations:

1.

RS instruction is used for data transmitting and receiving between PLC and external/peripheral

equipment (AC motor drive, etc.). Users have to pre-store word data in registers starting from

S, set up data length m, specify the data receiving register D and the receiving data length n.

2.

RS instruction supports communication on COM1 (RS-232), COM2 (RS-485) and COM3

(RS-485, ES2/EX2/SA2). (COM3 is only applicable to DVP-ES2/EX2/SA2/SE, and is not

applicable to DVP-ES2-C.)

3. Designate

m as K0 if data sending is not required. Designate n as K0 if data receiving is not

required.

4.

Modifying the communication data during the execution of RS instruction is invalid.

5.

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

executed on one communication port at the same time..

6.

If the communication format of the peripheral device is Modbus, DVP series PLC offers handy

communication instructions MODRD, MODWR, and MODRW, to work with the device.

7.

If the connected peripheral devices are Delta VFD series products, there are several

communication instructions available including FWD, REV, STOP, RDST and RSTEF.

Program Example 1: COM2 RS-485

1.

Write the data to be transmitted in advance into registers starting from D100 and set M1122

(Sending request) as ON.

2.

When X10 = ON, RS instruction executes and PLC is ready for communication. D100 will then

start to send out 10 data continuously. When data sending is over, M1122 will be automatically

reset. (DO NOT apply RST M1122 in program). After approximate 1ms, PLC will start to

receive 10 data and store the data in 10 consecutive registers starting from D120.

This manual is related to the following products: