Data Sheet

MODBUS Function Codes
The MBH88 responds to the following MODBUS function codes.
01 (0x01) Read Coils.
02 (0x02) Read Discrete Inputs.
05 (0x05) Write Single Coil.
15 (0x0F) Write Multiple Coils.
01 (0x01) Read Coils.
This function code will read back the current state of the relays. The “Start Address” must be
in the range 1-8 and the “Quantity of Coils” must be in the range 1-8. Also the sum of these
two parameters must not exceed 9.
02 (0x02) Read Discrete Inputs.
This function code will read back the current state of the Inputs. The “Start Address” must be
in the range 1-8 and the “Quantity of Inputs” must be in the range 1-8. Also the sum of these
two parameters must not exceed 9.
03 (0x03) Read Holding Registers
This is used only to get device information.
Reg 1 is the model number, 0x188 for the MBH88.
Reg 2 is the Hardware revision.
Reg 3 is the Firmware revision.
05 (0x05) Write Single Coil.
This function code is used to change the state of a single Relay. The “Output Address” must
be in the range 1-8. The “Output Value” must be 0xFF00 to turn the relay on, or 0x0000 to
turn it off.
15 (0x0F) Write Multiple Coils.
This function code is used to change the state of multiple Relays. The “Start Address” must
be in the range 1-8 and the “Quantity of Coils” must be in the range 1-8. Also the sum of these
two parameters must not exceed 9.
The MBH88 does not respond to any other function codes.
Make sure you only write to coils that exist and only read coils and inputs that exist. If you try
to read/write I/O that does not exist on the module then the command is ignored with no
response.