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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>DVP</strong>-<strong>ES2</strong>/<strong>EX2</strong>/<strong>SS2</strong>/<strong>SA2</strong>/<strong>SX2</strong>/SE <strong>Operation</strong> <strong>Manual</strong> - Programming<br />

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

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

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

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

and 4 for further explanations.<br />

6. n: Data length for accessing.<br />

• When S 2 (MODBUS function code) is specified as H05 which designates the PLC force<br />

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

• When S 2 is specified as H02, H03, H0F, H10 which designate the data length for<br />

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

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

Bit. H03/H10, unit: Word.)<br />

COM. mode COM H02 H03 H0F H10<br />

COM1 K 64 K 16 K 64 K 16<br />

RTU<br />

COM2 K 64 K 16 K 64 K 16<br />

COM3 K 64 K 16 K 64 K 16<br />

COM1 K 64 K 16 K 64 K 16<br />

ASCII<br />

COM2 K 64 K 8 K 64 K 8<br />

COM3 K 64 K 16 K 64 K 16<br />

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

executed on the same COM port at a time.<br />

8. Rising-edge contact (LDP, ANDP, ORP) and falling-edge contact (LDF, ANDF, ORF) can not<br />

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

stored in the receiving registers will be incorrect.<br />

9. If rising-edge contacts (LDP, ANDP, ORP) or falling-edge contacts (LDF, ANDF, ORF) is used<br />

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

M1316(COM3) has to be executed as a requirement.<br />

10. MODRW instruction determines the COM port according to the communication request. The<br />

COM port determination is made following the order: COM1COM3COM2. Therefore,<br />

please insert every MODRW instruction right after the sending request instruction for avoiding<br />

errors on the target location for data access.<br />

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

note of API 80 RS instruction.<br />

Program Example 1: COM2(RS-485), Function Code H02<br />

1. Function code K2 (H02): read multiple bit devices, up to 64 bits can be read..<br />

2. PLC1 connects to PLC2: (M1143 = OFF, ASCII mode), (M1143 = ON, RTU Mode)<br />

3-332

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

Saved successfully!

Ooh no, something went wrong!