labgrid icon indicating copy to clipboard operation
labgrid copied to clipboard

Add ModbusRTUDriver remote support

Open flxzt opened this issue 10 months ago • 0 comments

It is possible to use SerialPort's and NetworkSerialPort's in the ModbusRTU Driver (comparable to the SerialDriver). Would it make sense to use them directly for adding support for remote Modbus RTU access or should there be an additional NetworkModbusRTU resource that gets exported?

The only difference to the SerialPort resource currently is the additional timeout field, but it could also live in the driver.

Additionally, would it make more sense to also move the address field to ModbusRTUDriver ? The resource would be responsible for controlling the entire mod-bus serial interface, and the driver would control one individual slave.

I already have a (still WIP) branch for this, see: https://github.com/flxzt/labgrid/tree/remote-modbus-rtu . It already works, tested it with a Modbus RTU relay from Waveshare.

flxzt avatar Apr 23 '24 13:04 flxzt