Mitsubishi — 5.6 Application Instructions

5 Categories and Use of Basic Application Instructions API 100 Operands: S 1 : Device address S 2 : Data address n : Data length Explanations: 1. Range of S 1 : K0 ~ K254 2. Range of n : K1 ≦ n ≦ K6. 3. MODRD is an instruction exclusively for peripheral communication equipment in MODBUS ASCII/RTU mode. The built-in RS-485 communication ports in Delta VFD drives (except for VFD-A series) are all compatible with MODBUS communication format. MODRD can be used for communication (read data) of Delta drives. 4. If the address of S 2 is illegal for the designated communication device, the device will respond with an error, PLC will record the error code in D1130 and M1141 will be ON. 5.

The feedback (returned) data from the peripheral equipment will be stored in D1070 ~ D1085. After data receiving is completed, PLC will check the validity of the data automatically. If there is an error, M1140 will be 6. The feedback data are all ASCII codes in ASCII mode, so PLC will convert the feedback data into hex data and ON. store them in D1050 ~ D1055. D1050 ~ D1055 is invalid in RTU mode. 7. If peripheral device receives a correct record (data) from PLC after M1140/M1141 = ON, the peripheral device will send out feedback data and PLC will reset M1140/M1141 after the validity of data is confirmed. 8. Flags: M1120 ~ M1129, M1140 ~ M1143. Program Example 1:

Communication between DVP-PM and VFD-B series AC motor drive (ASCII mode, M1143 = OFF) M1002 Set communication protocol as 9600, 8, E, 1 Retain communication protocol Set receiving time-out as 100ms X1 X0 Sending request Set communication instruction: D Data address: H2101 D ata length: 6 words M1127 evice address: 01 PLC converts the received ASCII data in D1070~D1085 into Hex data and stores them into D1050~D1055 Processing received data Receiving completed Reset M1127 DVP-PM Application Manual 5-85 Mnemonic Operands Function Controllers 20PM 10PM MODRD Read Modbus Data Type OP Bit Devices Word Devices Program Steps X Y M S K H KnX KnY KnM KnS T C D V Z MODRD:

7 steps S 1 * * * S 2 * * * n * * * MOV H87 D1120 SET M1120 MOV K100 D1129 SET M1122 MODRD K1 H2101 K6 RST M1127