Mitsubishi — Chapter 8 Application Instructions API 100-149

8 Application Instructions API 100-149 6. n : Length of data (Unit: word) The setting range is K1~K96. If n exceeds the range, it will be taken as the maximum value or the minimum value. 7. Whenever the instruction is executed, the communication command is sent. Users do not need to enable a special flag to send the communication command. 8. The instruction can be used several times. However, if an ETHRW instruction specifies a module, other ETHRW instructions can not send communication commands to the module. The next communication command can not be sent until the reception is complete or the module replies that an error occurs. 9.

If a communication command is being received, the reception stops when the execution of the instruction stops. 10. The communication timeout is stored in D1394. The default timeout is 3000 milliseconds. The range of digital Besides, the flag related to the command’s having being received and the error flag are not ON. values is 1~32767. If the communication timeout exceeds the range, it will be taken as 3000 milliseconds. 11. The values of bit0~bit8 in D1395 indicate which communication port has received a command. Bit8 represents an Ethernet communication card. For example, if the Ethernet communication card installed in DVP-EH3 has received a command, “BLD D1395 K8” is satisfied. 12.

The values of bit0~bit8 in D1396 indicate which module does not receive a command correctly. For example, if a reception error occurs in the first left-side module DVP-EN01, “BLD D1396 K0” is satisfied. 13. When the instruction is executed, user can not use the online editing function. Otherwise, the data received will not be stored correctly. 14. The instruction supports EH3 version 1.20 (and above), and SV2 version 1.00 (and above). Program Example:

(The command is sent and received through the first left-side module (DVP-EN01) connected to DVP-EH3-L.) The IP address stored in D100 and D101 is 192.168.0.2, the communication port number stored in D102 is K100, the station address stored in D103 is K1, and the function code stored in D104 is H’03. The device address is H’1000, and two pieces of data are read. When M0 is ON, ETHRW is executed. After the reception of the communication command is complete, bit0 in D1395 is ON. The data received is stored in D10 and D11. M1002 M0 BLD D1395 K0 DVP-PLC Application Manual 8-25 MOV H0002 D100 MOV HC0A8 D101 MOV K100 D102 MOV K1 D103 MOV K3 D104 ETHRW D100 H1000 D10 K2 MOV D10 D20