Machinery TwinDocs

Mapping PLC tags to variables

The From Connection mode, addresses, data types, conversions, and update behaviour.

Once a connection exists, wiring a PLC value into the scene is one variable setting.

Setup

  1. Select the variable, open its Online tab.
  2. Set the mode to From Connection.
  3. Choose the connection (by name), enter the address, pick the data type.
Data typePLC-side equivalents
REALREAL / LREAL / float
INTINT / 16-bit integers
DINTDINT / 32-bit integers
BOOLBOOL, read as 0 / 1

Address syntax is per driver: absolute DB addresses for S7, symbol paths for ADS, node IDs for OPC UA.

Type mismatches read as nonsense, not errors

Reading a REAL address as DINT (or vice versa) yields wildly wrong numbers rather than a failure, the bytes are reinterpreted. If a mapped value looks absurd, check the type first.

Convert units on the variable

PLC values arrive in controller units. Do the conversion on the same variable with its modifiers: scale factor for counts→degrees or µm→mm, output offset for home offsets, min/max as a sanity clamp. Downstream consumers then live entirely in scene units.

Update behaviour

  • Values refresh at the connection's polling interval; the scene interpolates nothing, a slow poll on a fast axis looks stepped. Use 50–100 ms for visible motion.
  • While the connection is down, the variable holds its last value; the connection's status dot (and Test) tells you why.

Partial mapping is normal

Only map what the PLC truly owns, typically axis positions and a few status bits. Leave derived motion to cams and mechanisms in the twin: a single mapped line-shaft position can drive a whole machine's worth of synchronized cam slaves from the same master.

On this page