Modbus is an application layer protocol in Open System Interconnection (OSI)
layers. Modbus protocol specifies a communication standard for industrial
applications and devices to communicate.

In short, Modbus is all about a collection of function codes.

According to Modbus specification (v1.1.b), each request and response is
identified by a unique function code.

Modbus Modern Application Programming Interface (API) supports following
function codes.

1.Read Coils (0x01)

2.Read Discrete Inputs(0x02)

3.Read Holding Registers(0x03)

4.Read Input Registers(0x04)

5.Write Single Coil(0x05)

6.Write Single Register(0x06)

7.Write Multiple Coils(0x0F)

8.Write Multiple Registers(0x10)

9.Read File Record (0x14)

10.Write File Record (0x15)

11.Mask Write Register (0x16)

12.Read Write Multiple Registers (0x17)

13.Read FIFO Queue (0x18)

14.Encapsulated Interface support (0x2B)

Modbus Modern API simplifies the programming interface for industrial
applications to communicate with the devices that support Modbus protocol via