17.03.2014 Views

DVP-ES2-EX2-SS2-SA2-SX2-Operation Manual

DVP-ES2-EX2-SS2-SA2-SX2-Operation Manual

DVP-ES2-EX2-SS2-SA2-SX2-Operation Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

3. Instruction Set<br />

API Mnemonic Operands Function<br />

80 RS Serial Communication<br />

Controllers<br />

<strong>ES2</strong>/<strong>EX2</strong> <strong>SS2</strong> <strong>SA2</strong> <strong>SX2</strong><br />

SE<br />

Type Bit Devices Word devices Program Steps<br />

OP X Y M S K H KnX KnY KnM KnS T C D E F RS: 9 steps<br />

S *<br />

m * * *<br />

D *<br />

n * * *<br />

PULSE 16-bit 32-bit<br />

<strong>ES2</strong>/<strong>EX2</strong> <strong>SS2</strong> <strong>SA2</strong><br />

<strong>SA2</strong><br />

<strong>SA2</strong><br />

<strong>SX2</strong> <strong>ES2</strong>/<strong>EX2</strong> <strong>SS2</strong> <strong>SX2</strong> <strong>ES2</strong>/<strong>EX2</strong> <strong>SS2</strong><br />

SE SE SE <strong>SX2</strong><br />

Operands:<br />

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

data to be received n: Length of data to be received (n = 0~255)<br />

Explanations:<br />

1. RS instruction is used for data transmitting and receiving between PLC and external/peripheral<br />

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

S, set up data length m, specify the data receiving register D and the receiving data length n.<br />

2. RS instruction supports communication on COM1 (RS-232), COM2 (RS-485) and COM3<br />

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

applicable to <strong>DVP</strong>-<strong>ES2</strong>-C.)<br />

3. Designate m as K0 if data sending is not required. Designate n as K0 if data receiving is not<br />

required.<br />

4. Modifying the communication data during the execution of RS instruction is invalid.<br />

5. There is no limitation on times of using this instruction, however, only 1 instruction can be<br />

executed on one communication port at the same time..<br />

6. If the communication format of the peripheral device is Modbus, <strong>DVP</strong> series PLC offers handy<br />

communication instructions MODRD, MODWR, and MODRW, to work with the device.<br />

7. If the connected peripheral devices are Delta VFD series products, there are several<br />

communication instructions available including FWD, REV, STOP, RDST and RSTEF.<br />

Program Example 1: COM2 RS-485<br />

1. Write the data to be transmitted in advance into registers starting from D100 and set M1122<br />

(Sending request) as ON.<br />

2. When X10 = ON, RS instruction executes and PLC is ready for communication. D100 will then<br />

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

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

receive 10 data and store the data in 10 consecutive registers starting from D120.<br />

3-203

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!