Search code examples
modbusmodbus-tcp

Is RTU over TCP a spec-conforming modbus application?


For a week I've played with cheap modbus RS485/Ethernet adapters like USR-TCP232-304. I was assuming they would "speak" modbus TCP on the ethernet side and modbus RTU over RS485. After countless experiments I've found what that these adapters are actually expecting is RTU over TCP on the ethernet side, so they're not repackaging the ADU/PDU but simply relay.

Is this a standardized way of doing modbus or do I simply misunderstand what's going on?


Solution

  • Looking at the datasheet for the USR-TCP232-304 I see no mention of Modbus support; it's a RS485 Serial to Ethernet Converter only. These units makes no attempt to understand the data flowing over the link (if they receive a byte via RS485 they send it via the TCP link and vice versa). They can be used to talk to pretty much any device that uses RS485 (there are a lot of other protocols that run over RS485).

    Modbus RTU transmitted via this kind of unit is pretty common if not exactly standardised (it's not mentioned in the modbus spec to my knowledge). Often these devices include drivers that present themselves as a serial port so, from the applications perspective, there is no real difference between direct RS485 and going via one of these devices (other than timings).

    It looks like the next model up includes a modbus gateway function that will act as a Modbus TCP server (and there are plenty of other options; they generally cost a bit more because of the additional processing required).