A Rockwell Automation communcation driver for TwinCAT HMI.
Uses the LogixDriver wrapper for libplctag.NET to communicate via EtherNet/IP to ControlLogix platform PLCs.
Within the TwinCAT HMI framework, this driver supports:
- Connection state monitoring / reconnection
- Tag browsing
- Automatic type and value resolution
For how it works under the hood (symbols, mapping, reads and writes, connections and errors), see the documentation.
Download the latest .nupkg release, then place it in a nuget offline packages folder (e.g. C:\ProgramData\Beckhoff\NuGetPackages). It will now be availabe to install in your TwinCAT HMI project via the nuget package manager GUI (References -> Packages) or CLI (nuget install TcHmiLogixDriver).
The tag browser allows you to map top-level UDTs and arrays, or individual members / elements. What you map decides what gets read from the PLC. Any request that falls under a mapped path is served by one read of that mapped tag.
For instance, take this tag model in the PLC:
Line LINE_UDT
├── Speed REAL
├── Running BOOL
└── Motors MOTOR_UDT[4]
└── [0..3]
├── Speed REAL
├── Current REAL
└── Faults DINT
with the following mapped symbols:
Line
Line.Motors
Line.Motors[2].Speed
To serve a binding, the driver walks down a mapping tree along the binding's path and stops at the deepest node it reaches. That node is the tag it reads from the PLC:
| Control Binding | Mapped path | Read from PLC |
|---|---|---|
Line.Speed |
Line |
Line (whole structure) |
Line.Motors[0].Current |
Line.Motors |
Line.Motors (whole array) |
Line.Motors[2].Speed |
Line.Motors[2].Speed |
Line.Motors[2].Speed (single primitive) |
Notice that the binding to Line.Speed causes the whole Line structure to be read!
- Map a parent structure or array when the HMI shows many of its members. Every binding under it (
Line.Speed,Line.Running, …) is served by a single PLC request.- Map individual members when you only need a few fields from a large structure or array, so the driver doesn't transfer the whole thing for each request.
- When mappings overlap, the most specific path wins.
Lineis mapped, butLine.Motors[2].Speedhas its own mapping, so bindings for that tag read just that member and not all ofLine.
Renaming mapped symbols is not supported in this version. Keep the default name the tag browser assigns (
TcHmiLogixDriver.<target>.<path>). The driver builds its mapping tree from those names, so a renamed symbol is left out. Bindings to it then read a larger mapped parent, or fail.
Writes don't use the mapping tree. The requested path is turned straight into a tag name (Line.Motors[0].Current → Line.Motors[0].Current) and written as is. A structure write must include every member of the structure.
- Beckhoff.TwinCAT.HMI.Server.Engineering >= 14.5.73.0 (22.0.7983)