Modbus Multi-Station RTU to TCP Converter
5 min
review the following information for setting up and configuring the modbus multi station rtu to tcp converter driver overview the litmus edge modbus multi station rtu to tcp converter driver opens a modbus tcp server listens for requests from clients translates those requests into rtu requests on a multi drop rs485 network repackages the rtu replies as tcp replies use this driver instead of the modbus rtu advanced driver when you want to reuse identical tag names across different station ids to do so, create multiple instances of the modbus tcp driver and add tags to those driver instances you cannot directly add tags to this driver litmus edge compatible series compatibility parameter compatible items driver type rtu client and tcp server validated devices/series modbus rtu stations litmus edge modbus tcp driver replaces gen 1 driver(s) n/a to set up and configure this device in litmus edge, you will need to do the following step 1 set up and configure the plc device step 2 set up the plc device in litmus edge devicehub step 3 set up modbus tcp devices in litmus edge devicehub step 1 set up and configure the plc device document the modbus rtu station addresses for each connected device on the rs485 multi drop network ensure your modbus rtu stations and the litmus edge gateway's serial or usb port are properly connected to the serial network verify the serial communication parameters (baud rate, parity, stop bits) configured on the converter match your rtu devices note the tcp port number configured on the converter (typically 502 for modbus tcp or a custom port) open the port for communication on the system > network > firewall > inbound rules page step 2 set up the plc device in litmus edge devicehub configure the following parameters when you connect a device docid\ pal6abpzbrimdu9lvgj30 with this driver update default values to the specific setup of your device parameter value type modbus driver modbus multi station rtu to tcp converter network interface 0 0 0 0 (or the ip address to bind the tcp server to) port 502 (or custom port to bind the tcp server to) max tcp connections 32 device file /dev/ttys0 baud rate 9600 data bits 8 parity none stop bits 1 response timeout 1000 (ms) retry count 2 pause between requests 10 (ms) important the converter processes requests from all stations and all tcp client connections one at a time because only one request can be on the rs485 network at a time new requests never preempt an in flight request each request runs to completion, including all retries, before the next request starts a station that does not respond therefore blocks all other stations for the full retry duration on every poll tune response timeout and retry count based on your rtu network conditions increase the timeout when devices respond slowly, such as plcs with long scan cycles or devices behind radio modems or serial gateways increase the retry count when the rs485 network experiences electrical noise that causes transient read failures retries let the converter recover from corrupted frames without returning an error to the client decrease the timeout or retry count when stations commonly go offline in your rtu network and you do not want large polling gaps for the stations that remain online each poll of an offline station occupies the serial network for the full retry sequence delaying all other stations do not reduce the timeout below 1000 ms or the retry count below 1 calculate and record the value from this formula number of stations × (\[response timeout × (retry count + 1)] + \[retry count × pause between requests]) step 3 set up modbus tcp devices in litmus edge devicehub see the modbus tcp docid\ fdminjdckrjhg8uz0m9gf page in the modbus tcp driver settings, use the following values network address enter 127 0 0 1 response timeout enter a value greater than or equal to the timeout calculated with the formula in step 2 clients with shorter timeouts abandon requests that the converter still processes and the repeated resends compound the delay for all stations if a station is offline, remove it from polling until it is restored