Download the PDF of the entire series of articles on Modbus
Overdigit Slave Modbus modules conform to the official Modbus specification but at the same time take advantage of the protocol flexibility to achieve much higher performance than any other Modbus device on the market.
The performance increase can only be fully used in conjunction with Overdigit Web-PLCs, as the implementation of custom function codes is also required. However, this demonstrates the possibility of using the Modbus protocol also to meet the most specific needs, apparently achievable only with the development of fully proprietary protocols. In this way, it is possible to maintain compatibility, on the same fieldbus, between standard Modbus devices and systems that can achieve higher performance but still using the Modbus protocol as well.
With regard to the “Physical layer”, Overdigit modules are equipped with an RS485 driver with 1/2 load units. This means that up to 64 devices can be connected to the bus without using line repeaters. The 6-pin connector, standardized for all modules, allows powering the devices and connecting the serial interface to the fieldbus. Within the modules, the termination resistor is provided, whose insertion is obtained wiring an external jumper in the terminal block between the signal pole B and the RES pole:
The A and B signals are also indicated as 485- and 485+ by highlighting the polarity of the line in the active driving state of the bit=0, as opposed to the inactive state of the transmission. Note that inactive state, for the presence of the default polarization resistors, assumes the same polarity associated with the transmission of bit=1.
The RS485 line driver used in the Overdigit modules allows serial communications up to 1Mb/s maximum speed, even though Modbus systems on the market normally never exceed 115200b/s.
The “Data Link layer” implemented in Overdigit modules provides four modes for the parity bit:
“No-1stop” mode is not included in the Modbus protocol specification, but it has been implemented to achieve compatibility with the many commercial systems that have “deviated” from the specification and have in fact created a rather widespread, but non-official, variant to the serial Modbus protocol.
With regard to the implementation of the Protocol Data Unit (PDU), defined in the “Application layer”, the Overdigit modules provide all the standard command codes required for the resources management of the specific module. To selecting the objects, extended addressing has been adopted so that the address field of the PDU can extend across the range 0 to 65535 for each of the four data areas defined by the protocol. In practice, however, for the operation of the various devices, only few addresses are normally needed starting from the value 0.
In addition, in the Overdigit modules, some custom function codes have been added, as permitted by the Modbus protocol, which allow to greatly speed up the operations for module resources update.
In particular, codes 100, 101, 102 have been added respectively to update all input, output, and input/output bytes of the module. In this case, all the I/O resources of the module are packed into a single bytes stream inside the Data area of the PDU.
The command code that makes the module updating most effectively is that used for reading inputs and writing outputs:
Using this command allows the refreshing of the entire image area of the module inputs and outputs in a single frame exchange. To do this in conventional Slave modules with Modbus protocol, multiple queries and word variables, even if the information to be exchanged can be contained in just one byte, must be used. In the case of Overdigit modules, I/O resources are instead inserted within a bytes array as long as necessary to contain the status of all resource variables.
The amount of I/O bytes can be known in advance or determined dynamically, for example at power-on, using the standard command code 17 (Report Slave ID):
The data field in the response PDU consists of a single 20 bytes array that contains informations about the module and size of the I/O areas at predefined locations:
The use of command code 102, in conjunction with the maximum communication speed (1Mb/s), allows to update all the I/O area of the modules at considerably reduced times than is normally achieved on other commercial systems.
For example, in the case of the Overdigit EX1608DD module with 16 inputs + 8 digital outputs, the total communication time is only 250μs. Most of the similar modules on the market often limit the maximum speed to 38400b/s and do not include additional commands. For this reason, to update the I/O, a reading of one “Input Register” and a writing of one “Holding Register” are required. Considering also a zero time in frame processing and therefore an immediate response from the slave, a total communication time of about 13ms is necessary, which is 52 times greater.
Obviously such performances request also the implementation of custom functions, as is the case in the CoDeSys Modbus library of Overdigit Web PLCs, but the main advantage over the development of a fully proprietary protocol is that the main structure of the protocol remains compliant with Modbus standard, allowing compatibility of these modules with all the most traditional devices.