5 Categories and Use of Basic Application Instructions API 101 Operands: S 1 : Device address S 2 : Data address n : Data to be written Explanations: 2. MODWR is an instruction exclusively for peripheral communication equipment in MODBUS ASCII/RTU mode. 1. Range of S 1 : K0 ~ K254. 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 (write data) of Delta drives. 3. If the address of S 2 is illegal for the designed communication device, the device will respond with an error, PLC will record the error code in D1130 and M1141 will be ON.
For example, if 8000H is invalid to VFD-B, M1141 will be ON and D1130 = 2. For error code explanations, please see the user manual of VFD-B. 4. 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 5. If peripheral device receives a correct record (data) from PLC after M1140/M1141 = ON, the peripheral device ON. will send out feedback data and PLC will reset M1140/M1141 after the validity of data is confirmed. 6. 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 X1 Set receiving timeout as 100ms Sending request X0 Set communication instruction: Data address: H0100 Data: H1770 M1127 Device address: 01 Processing received data The received data is stored in D1070~D1085 in ASCII format. Receiving completed Reset M1127 DVP-PM Application Manual 5-89 Mnemonic Operands Function Controllers 20PM 10PM MODWR Write 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 MODWR:
7 steps S 1 * * * S 2 * * * n * * * MOV H87 D1120 SET M1120 MOV K100 D1129 SET M1122 MODWR K1 H0100 H1770 RST M1127