Variable types
Every Variable has a fixed type, chosen when you create it. The type decides what the Variable can hold, which Expressions accept it, and how it can be bound to hardware.
Value types
| Type | Holds | Typical use |
|---|---|---|
| Integer | A whole number | Part counters, cycle counts, indices into a Grid or Stack |
| Float | A decimal number | Measured distances, speeds, weights |
| Boolean | true or false | Flags, operator confirmations, "gripper closed" state |
| String | Text | Part IDs, batch numbers, a Subflow UUID |
| Cartesian Pose | A position (x, y, z) and an orientation (rz, ry, rx) | A taught pick point, a Workspace transformation, a pose returned by RobVision |
| Joint Pose | One angle per Robot joint | A configuration the Robot must reach exactly, where the Cartesian pose alone is ambiguous |
A String Variable can hold a whole JSON document, and
Expressions read into it with bracket notation —
myVariable["key0"]["key1"] for a nested value, myVariable["users"][0]["name"] for an
element of an array. This is how the responses of the
HTTP Request and
SQL Query Nodes are consumed: store the whole
response in one String Variable, then pick out the field you need where you need it, instead of
unpacking it into a Variable per value.
I/O types
Two further types do not store a value of their own — they are a physical channel on the Control Unit:
| Type | Holds | Direction |
|---|---|---|
| Input | The current state of a digital input | Read-only from the Flow's point of view |
| Output | The state of a digital output | Writing the Variable drives the output |
Both are Boolean-valued and identified by a bank and a channel number within that bank. See Binding a Variable to I/O.
Poses
A Cartesian Pose describes where the TCP is and how it is oriented. The orientation follows the same intrinsic z-y-x Euler convention used everywhere else in RobFlow, so a pose taught in one place can be reused in another.
A Joint Pose stores the angle of every joint instead. Use it when a specific arm configuration matters — the same Cartesian Pose can often be reached with several different joint configurations, and only a Joint Pose pins down which one.
You can write the Robot's live pose straight into a Variable of either kind with the
Variable Node, using the built-in
currentCartesianPose and currentJointPose values described below.
To compute a Pose rather than teach it, set the fields from Expressions — see Configure Pose Expression for the configurator that builds one dimension at a time.
Built-in Variables
Two Variables always exist and are not created by you. They hold a live value rather than a stored one, but they can be used anywhere an ordinary Variable of the same type can.
| Variable | Type | Value |
|---|---|---|
Current Cartesian Pose (currentCartesianPose) | Cartesian Pose | Where the Robot is right now |
Current Joint Pose (currentJointPose) | Joint Pose | The Robot's current joint angles |
Neither can be created, edited or deleted, and their names are reserved — you cannot name a
Variable of your own currentCartesianPose or currentJointPose. Assign one to a Variable of
the matching type to capture where the Robot was at that point in the Flow.
Choosing a type
- Counting something? Integer — and consider marking it as a counter event so it feeds OEE reporting, see Persistence, tags and counters.
- A value that can carry a fraction? Float — a measured distance, a speed, a weight, a calibration residual. If a value might ever be non-whole, pick Float now: the type cannot be changed later.
- A yes/no state that lives inside RobFlow? Boolean — a flag another branch checks, an operator's confirmation, "the fixture is loaded".
- Reading or driving a signal on the Control Unit? Input or Output, not Boolean.
- Text, an identifier, or a Subflow UUID? String — also the type to use for JSON, which Expressions can index into.
- Storing a taught position for later reuse? Cartesian Pose, unless the arm configuration matters — then Joint Pose.
- Talking to a PLC over a register? Any value type will do; what matters is the protocol mapping you give it.
A Variable's type cannot be changed after it is created. Create a new Variable of the right type and update the places that reference the old one.