Custom Modbus request to TCP device via Scripting

i am using a 3rd party OPC to connect to a modbus device & am bring back tag data flawlessly. The hardware has historical data stored in indexed archives & uses a non-standard modbus request to read the historical data internally for display on it’s proprietary GUI. The OPC server that I am using doesn’t have the capability via premade driver or user configurable driver to manage indexes & bring in the data. Any experience or tips on using a modbus TCP device connection in conjunction with python scripting to handle such a request?

Our driver has no facility that allows custom requests to be sent either.

To do this from scripting you’d have to open your own TCP connection to the device and send/receive the data entirely on your own.

1 Like

Do you happen to have docs on this non-standard request? If it is well-documented, I could probably expose it in my driver:

Thank you Phil. I do have a snip of the request & expected payload. Concurrent connections to the same device is another issue that I’m having to navigate on this application. The notes on your driver indicate that may be addressed as well. I’ll compile & share some info asap.

It shouldn’t be difficult to connect modbus device on a TCP socket connection using scripts to read/write tags between modbus device and Ignition gateway.

You can use UCON driver from kepware for this as well but if cost matters, just use python script and open your own TCP connection in ignition.

https://www.kepware.com/en-us/products/kepserverex/drivers/u-con/