Chapter 13 Modbus Communication Instruction; Modbus Read/Write - Mitsubishi MELSEC iQ-F FX5 series Programming Manual

Melsec iq-f fx5 series
Hide thumbs Also See for MELSEC iQ-F FX5 series:
Table of Contents

Advertisement

13
MODBUS COMMUNICATION INSTRUCTION
13.1

MODBUS Read/Write

ADPRW
This instruction allows the MODBUS Master to communicate (read/write data) with the Slaves.
Ladder diagram
(s1)
Setting data
■Descriptions, ranges, and data types
Operand
Description
(s1)
Slave node address
(s2)
Function code
(s3)
Function parameters depending on the function code
(s4)
Function parameters depending on the function code
(s5)/(d1)
Function parameters depending on the function code
(d2)
Head bit device number to which the execution status of
the communication is output
■Applicable devices
Operand
Bit
X, Y, M, L,
SM, F, B, SB
(s1)
(s2)
(s3)
(s4)
(s5)/(d1)
(d2)
*1 T, ST, C cannot be used.
Processing details
• Function code (s2) is operated on Slave node address (s1) according to Parameters (s3), (s4), and (s5)/(d1). Use 0 as the
Slave Node Address for Broadcast commands. For details, refer to  MODBUS communication manual.
• The communication execution status (d2) is output according to the status of the ADPRW instruction such as
communicating/completed normally/completed with an error.
Precautions
Three devices are occupied from the device specified in (d2). Make sure that these devices are not used in other controls.
13 MODBUS COMMUNICATION INSTRUCTION
682
13.1 MODBUS Read/Write
(s2)
(s3)
(s4) (s5)/(d1) (d2)
Word
U\G T, ST,
T, ST, C, D,
C, LC
W, SD, SW, R
*1
*1
*1
*1
*1
*1
Structured text
ENO:=ADPRW(EN,s1,s2,s3,s4,s5d1,d2);
Range
Data type
0 to 20H
16-bit signed binary
01H to 06H, 0FH, 10H
16-bit signed binary
0 to FFFFH
16-bit signed binary
1 to 2000
16-bit signed binary
Bit/16-bit signed binary
Bit
Double word Indirect
U\G
Z
LC
LZ
Data type (label)
ANY16
ANY16
ANY16
ANY16
ANY_ELEMENTARY
ANY_BOOL
Constant
specification
K, H
E
$
Others

Advertisement

Table of Contents
loading

Table of Contents