Machinery TwinDocs

Variables as the universal glue

One variable, two configurations, and why everything binds by variable ID.

Variables are the currency of a Machinery Twin project. Anything that changes at runtime is a variable; anything that moves reads one.

One variable, two configs

Every variable carries two independent configurations:

Active inTypical use
Simulation configSimulation modeMaster clock, sine, cam output, copies of other variables
Online configOnline modeFrom Connection, a live PLC tag, or any of the simulation options

The variable's consumers (objects, mechanisms, other variables) don't care which config produced the value. That is what lets one project live both as an offline simulation and as a live machine monitor.

What can read a variable

  • Object pose, per-axis bindings for position, rotation, scale
  • Object appearance, color (via color-typed values) and visibility (value > 0 = visible)
  • Mechanism inputs, crank angles, path positions, joint values, workspace targets
  • Other variables, functions take an input variable; cams take a master variable
  • State machine transitions, threshold conditions watch a variable

What can write a variable

  • Its own simulation/online config (constant, function, cam, PLC tag)
  • A state machine action, SetValue, Function, MotionCam, or a Position (trapezoid) move

Name variables like PLC tags

Variable names are how you'll find things in every selector in the app, and the name is the key used when mapping to PLC symbols. A convention like Axis1_Position, Gripper_Open, Line_MasterSpeed keeps large projects navigable.

Full details: variable modes, function reference, scaling & clamping.

On this page