The frame and character timing is probably the most important aspect of modbus since this defines the start and end of a frame and inter character timing. Specifically the frame and inter character timing does not exactly adhere to the modbus standard but a simple method is implemented that combines both these delays and works very well indeed. The implementations does not fully comply with the Modbus over serial line specification.
Read() - To extract the bytes from the bufferīegin() - To initialize the serial routine Specifically the following functions:Īvailable() - To check if something is in the receive buffer The libraries were also tested on a PIC18F26K80 microcontroller using the Lupic18 C compiler but should work on any microcontroller and compiler provided that you support the library with your own hardware serial library.
This makes it easier to port to other platforms which only supports a C compiler. The libraries are written with an object orientated approach using C and does not make use of C++ object constructs. The examples and libraries are well commented and should get you up and running quickly. The libraries are very robust and non blocking, all communication takes place in the background allowing your code to run without any delay in execution (well almost). In addition to this SimpleModbusSlave has also been tested on LS InfoU SCADA system, Mango M2M SCADA, FreeSCADA 2, Modbus Poll, the free QModbus slave tester and the very handy modbus slave tester, '> Mtester Both libraries have been tested extensively on commercial equipment like LS Industrial PLC's, Schneider equipment, Ascon equipment, Siemens PLC's, Selco alarm panels and various commercial panel meters and indicators. There are only two required functions modbus_update() and modbus_configure(). Broadcasting is supported on both libraries for function 16 and 15 on the master. Both SimpleModbusMaster & SimpleModbusSlave implements function 3 and 16 in addition SimpleModbusMaster implements function 1, 2, 4 and 15.
SimpleModbus is a collection of Arduino libraries that enables you to communicate serially using the Modicon Modbus RTU protocol.