Hello, could it be possible to use Modbus RTU instead of the provided by the webserver? If Yes, can the the protocols operate at the same time (sort of redundancy)?
Quote 0 0
The Modbus/TCP Slave is provided by the OpenPLC application itself, not by the webserver. The webserver is just a "launcher" to upload programs and to start the OpenPLC.

You can add Modbus RTU support by writing the code for it on the Modbus module (OpenPLC_v2/core/modbus.cpp). As long as you read and write to the same buffers, both Modbus/TCP and Modbus/RTU will be able to operate together at the same time. Another alternative would be to bring back the libmodbus implementation for Modbus Slave, as it provides support for TCP and RTU using the same code. The libmodbus implementation is backed up at OpenPLC_v2/core/server_libmodbus.bkp. Just rename the extension to .cpp and remove modbus.cpp and server.cpp files.
Quote 0 0