Technical Reference: Introduction to Modbus
The following information describes the operation of Modbus as it relates to Acromag Series 900MB I/O modules. For more detailed information on Modbus, you may also refer to the “Modicon Modbus Reference Guide”, PI-MBUS-300 Rev J, available via download from www.public.modicon.com.
The Modbus protocol provides an industry standard method that Modbus devices use for parsing messages. This protocol was developed by Modicon, Incorporated, for industrial automation systems and Modicon programmable controllers.
Modbus devices communicate using a master-slave technique in which only one device (the master) can initiate transactions (called queries). The other devices (slaves) respond by supplying the requested data to the master, or by taking the action requested in the query. A slave is any peripheral device (I/O transducer, valve, network drive, or other measuring device) which processes information and sends its output to the master using Modbus. Acromag Series 900MB I/O Modules are slave devices, while a typical master device is a host computer running appropriate application software.
Masters can address individual slaves, or can initiate a broadcast message to all slaves. Slaves return a response to all queries addressed to them individually, but do not respond to broadcast queries. A master’s query consists of a slave address (or broadcast address), a function code defining the requested action, any required data, and an error checking field. A slave’s response consists of fields confirming the action taken, any data to be returned, and an error checking field. Note that the query and response both include a device address, plus a function code, plus applicable data, and an error checking field. If no error occurs, the slave’s response contains the data requested. If an error occurs in the query
received, or if the slave is unable to perform the action requested, the slave will return an exception message as its response (see Modbus Exceptions). The error check field of the message frame allows the master to confirm that the contents of the message are valid. Additionally, parity checking is also applied to each transmitted character in its data frame.