GN-9212 User Manual
Page 43 of (54)
G-series GN-9212 DeviceNet Rev. 1.01.docx
Registers
(Read output word)
holdingregisters in a remote device. The Request PDU specifies the
starting register address and the number of registers. The register data
in the response message are packed as two bytes per register, with the
binary contents right justified within each byte. For each register, the
first byte contains the high order bits and the second contains the low
order bits.
4(0x04)
Read Input Registers
(Read input word)
This function code is used to read from 1 to approx. 125 contiguous
input registers in a remote device. The Request PDU specifies the
starting register address and the number of registers. The register data
in the response message are packed as two bytes per register, with the
binary contents right justified within each byte. For each register, the
first byte contains the high order bits and the second contains the low
order bits.
5(0x05)
Write Single Coil
(Write one bit output)
This function code is used to write a single output to either ON or OFF
in a remote device. The requested ON/OFF state is specified by a
constant in the request data field. A value of FF 00 hex requests the
output to be ON. A value of 00 00 requests it to be OFF. All other values
are illegaland will not affect the output.
6(0x06)
Write Single Register
(Write one word
output)
This function code is used to write a single holding register in a remote
device. Therefore register numbered 1 is addressed as 0. The normal
response is an echo of the request, returned after the register contents
have been written.
8(0x08)
Diagnostics
(Read diagnostic
register)
*Refer to the 4.2.1
MODBUS function code 08 provides a series of tests for checking the
communication system between a client ( Master) device and a server (
Slave), or for checking various internal error conditionswithin a server.
The function uses a two–byte sub-function code field in the query to
define the type of test to be performed. The server echoes both the
function code and sub-function code in a normal response. Some of the
diagnostics cause data to be returned from the remote device in the
data field of a normal response.
15(0x0F)
Write Multiple Coils
(Write a number of
output bits)
This function code is used to force each coil in a sequence of coils to
either ON or OFF in a remote device. The Request PDU specifies the
coil references to be forced. Coils are addressed starting at zero. A
logical '1' in a bit position of the field requests the corresponding output
to be ON. A logical '0' requests it to be OFF. The normal response
returns the function code, starting address, and quantity of coils forced.
16(0x10)
Write Multiple registers
(Write a number of
output words)
This function code is used to write a block of contiguousregisters (1 to
approx. 120 registers) in a remote device.
The requested written values are specified in the request data field.
Data is packed as two bytes per register.
The normal response returns the function code, starting address, and
quantity of registers written.
23(0x17)
Read/Write Multiple
registers
(Read a number of
input words
/Write a number of
Read a number of input words /Write a number of output words
This function code performs a combination of one read operation and
one write operation in a single MODBUS transaction. The write
operation is performedbefore the read. The request specifies the
starting address and number of holdingregisters to be read as well as