Four areas, ten data types
Holding registers, input registers, coils and discrete inputs, read as bool, int16, uint16, int32, uint32, int64, uint64, float32, float64 or text. A single bit of a register can be a tag.
Modbus TCP SCADA driver
The Modbus TCP driver reads and writes the registers and coils of your devices. Each tag reads one address, polled on the connection's interval. It comes with the core.
How you connect it
Under Connections, choose Modbus TCP and add a device: its host, the port (502 unless you change it) and the unit id. Poll interval and reply timeout have defaults you can change.
A value of 32 bits or more spans several registers, and the standard does not say in which order a device sends them. Choose ABCD, CDAB, BADC or DCBA for the connection, or for a single tag. If a float reads as nonsense, try the others.
Browse lists the four areas, then ranges of addresses, then what the device holds at each one in decimal, in hex and as the PLC manual numbers it. You can also type an address, such as holding:100, or a manual's number, such as 40101.
Tick the addresses, choose a data type and create the tags. A type of two or four registers starts at the address you ticked.
What it does
Holding registers, input registers, coils and discrete inputs, read as bool, int16, uint16, int32, uint32, int64, uint64, float32, float64 or text. A single bit of a register can be a tag.
Addresses count from 0, as the device receives them. The register a PLC manual calls 40001 is address 0 in holding.
Tags of the same area and unit that touch, or lie within the gap you set, share one request, up to the registers-per-request limit.
When a device refuses a request that holds several tags, each of those tags is read alone from then on, so the good ones keep working. The refused tag is bad, with the device's own words as the detail.
Coils and holding registers can be written. A value that does not fit the type, such as 70000 for a uint16, is refused with a sentence. Input registers and discrete inputs cannot be written.
The driver speaks the protocol itself. The link is a tag too: its state, error and request counts are published with history.
Settings
| Setting | What it does | Default |
|---|---|---|
| Host and port | The device's address, and the port from 1 to 65535. | Port 502 |
| Unit id | 0 to 255, also called the slave id. A gateway to serial devices uses it to pick one. | 1 |
| Poll interval | How often every tag on the connection is read, from 20 ms to 1 hour. | 1000 ms |
| Reply timeout | How long to wait for an answer before the link counts as lost, from 100 ms to 60 s. | 3000 ms |
| Word and byte order | How a value of more than one register is laid out. A tag can use its own. | ABCD |
| Registers per request | The most registers one request reads, from 1 to 125. Lower it for a device that refuses long reads. | 100 |
| Read across gaps of | Unused registers to read through to join two tags into one request. | 0 |
What has been tried
The driver has run against a Modbus TCP device written for its tests. No real PLC or meter has been tried yet.
The driver comes with the core.
Questions
Other ways in
Tell us about your plant and what you run today, or what you want to build on it. We answer in plain language.