We have a device in the LAN that communicates via Modbus. We would like to query them somehow. Are there any examples of how I can query the parameters of such a device in Dataminer. It's about driver the controller and reading a single parameter.
Hi Piotr,
I don't have an easy example, but I could give you some details on how to get there.
To monitor a Modbus device, you will need to create (or license) a protocol (e.g. Generic Modbus PLC).
A driver used to communicate with a Modbus device is always a serial driver (both for Modbus RTU and Modbus TCP).
In such a driver, you must define pairs containing a command and a response.
These commands are built out of parameters, forming a full Modbus frame together.
e.g. of a Modbus request:
e.g. of a command defined in a protocol to build such a request:
e.g. of the parameters used to build this command:
Hi Dominique,
You are correct.
The driver type is defined as serial, but you configure your element using an IP endpoint.
This will ensure the required IP headers are added to the Modbus frame.
Thank you Ive,
And the port will be 502 by default?
Hi Dominique, that’s correct.
Hi Ive,
Like Piotr, I need to develop a MODBUS-TCP/IP driver. I already developped one for a Serial device. But this time it will be an IP one. I understand we also have to generate pairs Command / Response like in serial. I am ok with that but how to encapsulate those through TCP/IP? Shall declare this driver as serial and use an IP Address and Port # like I do for other serial devices driven through Moxa?