Modbus function codes
The table below shows the Modbus function codes supported by the embedded fieldbus
interface.
DescriptionFunction nameCode
Reads the 0/1 status of coils (0X references).Read Coils01h
Reads the 0/1 status of discrete inputs (1X refer-
ences).
Read Discrete Inputs02h
Reads the binary contents of holding registers
(4X references).
Read Holding Registers03h
Forces a single coil (0X reference) to 0 or 1.Write Single Coil05h
Writes a single holding register (4X reference).Write Single Register06h
Provides a series of tests for checking the com-
munication, or for checking various internal error
conditions.
Diagnostics08h
Supported subcodes:
• 00h Return Query Data: Echo/loopback test.
• 01h Restart Comm Option: Restarts and ini-
tializes the EFB, clears communications
event counters.
• 04h Force Listen Only Mode
• 0Ah Clear Counters and Diagnostic Register
• 0Bh Return Bus Message Count
• 0Ch Return Bus Comm. Error Count
• 0Dh Return Bus Exception Error Count
• 0Eh Return Slave Message Count
• 0Fh Return Slave No Response Count
• 10h Return Slave NAK (negative acknow-
ledge) Count
• 11h Return Slave Busy Count
• 12h Return Bus Character Overrun Count
• 14h Clear Overrun Counter and Flag
Returns a status word and an event count.Get Comm Event Counter0Bh
Forces a sequence of coils (0X references) to 0
or 1.
Write Multiple Coils0Fh
Writes the contents of a contiguous block of
holding registers (4X references).
Write Multiple Registers10h
Modifies the contents of a 4X register using a
combination of an AND mask, an OR mask, and
the register's current contents.
Mask Write Register16h
Writes the contents of a contiguous block of 4X
registers, then reads the contents of another
group of registers (the same or different than
those written) in a server device.
Read/Write Multiple Registers17h
604 Fieldbus control through the embedded fieldbus interface (EFB)