4-11
IM 04L51B01-01EN
Using Modbus Functions (Communicating with Modbus devices)
4
4.5 Modbus Function and Register Assignments
4.5.1 Modbus Client/Master Function
Function
The GX/GP supports the following functions.
The server (slave) must support these functions.
Function Code Function Operation
1 Read the coil status
(0xxxx)
The GX/GP reads the coil status of the server (slave)
device.
2 Read the input relay
status (1xxxx, 1xxxxx)
The GX/GP reads the input relay status of the server
(slave) device.
3 Read the hold register
(4XXXX, 4XXXXX)
The GX/GP reads the hold register of the server
(slave)
into a communication channel.
4 Read the input register
(3XXXX, 3XXXXX)
The GX/GP reads the input register of the server
(slave)
into a communication channel.
5 Change the single coil
status
(0xxxx)
The GX/GP changes the single coil status of the server
(slave) device (off/on).
6 Write to a single hold
register (4xxxx, 4xxxxx)
The GX/GP writes to a single hold register of the server
(slave) .
15 Change the coil status
(0xxxx)
The GX/GP changes the coil status of the server (slave)
device (off/on).
16 Write to the hold register
(4XXXX, 4XXXXX)
The GX/GP writes the I/O channel data, math channel
data, or communication channel data to the hold register
of the server (slave).
Command
Command type: Read, Write
Number of commands: GX20-1/GP20-1: Set up to 100 commands
GX20-2/GP20-2: Set up to 200 commands
GX10/GP10: Set up to 50 commands
Data type: See the table below.
Symbol Description
INT16 16-bit signed integer
UINT16 16-bit unsigned integer
INT32_B 32-bit signed integer (big endian)
INT32_L 32-bit signed integer (little endian)
UINT32_B 32-bit unsigned integer (big endian)
UINT32_L 32-bit unsigned integer (little endian)
FLOAT_B 32-bit floating point (big endian)
FLOAT_L 32-bit floating point (little endian)
BIT Bit
Special value output
When a register is read or when its content is exported through the Modbus function, the
GX/GP may output the following special values.
Channel status Data type
Integer Floating
+Over, +Burnout Maximum expressible value +∞
–Over, –Burnout Minimum expressible value –∞
Example: Channel status is “–Over”
Data type Output value
INT16 –32768 (0x8000)
INT32 –2147483648 (0x80000000)
FLOAT –∞ (0xff800000)