Gateway Modbus RTU to Modbus TCP - Printable Version +- Logic Machine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: Gateway (https://forum.logicmachine.net/forumdisplay.php?fid=10) +--- Thread: Gateway Modbus RTU to Modbus TCP (/showthread.php?tid=2078) |
Gateway Modbus RTU to Modbus TCP - davidsilva - 10.05.2019 Hi, I have 4 meters connected by Modbus RTU (attachment). I would like that the Logic Machine works as a Modbus TCP Slave with this 4 meters and with same ID and registers, and then connect to other device. I.e. the Logic Machine works as a Gateway Modbus RTU to Modbus TCP. Best regards, RE: Gateway Modbus RTU to Modbus TCP - admin - 11.05.2019 This is not possible with default Modbus TCP slave as it only supports one slave ID / one set of registers. One solution is to use single slave ID but different registers addresses for each RTU slave. RE: Gateway Modbus RTU to Modbus TCP - EBMel - 12.05.2019 Will it be possible to program the LogicMachine so that the meter 1 will useĀ Modbus TCP slaveĀ register 1-100, meter 2 register 101-200 ........? The Modbus TCP slave exampel only shows register starting from 1. An exampel/instructions where defined registerts are set would be great! RE: Gateway Modbus RTU to Modbus TCP - admin - 13.05.2019 Actual Modbus addressing starts from 0. Documentation for some devices have addressing starting from 1 which creates confusion. Here's modified slave script where you can specify addresses directly and there can be gaps in register map, for example: 0..15 for meter 1; 100..115 for meter 2 etc. This script supports 16-bit values only. If only one way communication is needed (Modbus values are read-only) then it can be modified to support 32-bit and 64-bit values internally without additional scripts for splitting values into 16-bit parts. Code: if not mb then |