Overview
Section titled “Overview”Use MC function blocks to command simulated single axes, straight Cartesian paths and robots. MotionGroup and its child MotionAxis components configure the PLC’s motion task. The task writes position signals; drive behaviours such as Drive_FollowPosition consume those signals. It never directly moves a Drive.
The implemented subset follows PLCopen Motion Control Part 1 v2.0 and Part 4,
with the limits described below. A group of kind Robot couples the motion task to a
RobotIK and commands its joints from the TCP pose (see Robots).
Properties
Section titled “Properties”| MotionGroup property | Type / unit | Default |
|---|---|---|
| Kind | enum Cartesian / Robot | Cartesian |
| Kinematics | ComponentReference to a RobotIK (Robot only) | empty |
| JointVelocity | number, deg/s (Robot only) | 120 |
| JointAcceleration | number, deg/s² (Robot only) | 600 |
| JointJerk | number, deg/s³ (Robot only) | 6000 |
| IgnoreJointDynamicsOnLin | boolean (Robot only) | false |
| AngularVelocity | number, deg/s (Robot only) | 180 |
| WorldFrame | ComponentReference to a node (Robot only, in development) | empty |
| PoseConvention | enum YUpEulerXYZ / ZUpEulerZYX (Robot only, in development) | YUpEulerXYZ |
| Program | ComponentReference to owning PLCProgram | unbound; required |
| Variable | string, program handle variable name | empty; required |
| Velocity | number, mm/s | 500 |
| Acceleration | number, mm/s² | 5000 |
| Deceleration | number, mm/s² | 5000 |
| Jerk | number, mm/s³ | 100000 |
Profile defaults must be finite and strictly positive. Add MotionAxis components to child nodes; nested groups own their own descendants.
| MotionAxis property | Type / unit | Default |
|---|---|---|
| Name | string; unique X, Y or Z (Cartesian), J1..Jn (Robot) | empty; required |
| Setpoint | PLCOutputFloat signal slot, in the axis unit | unbound; required |
| Feedback | PLCInputFloat signal slot, in the axis unit | unbound; optional |
| Min / Max | number, logical mm | -1000000 / 1000000 |
| Offset | number, mm | 0 |
| Sign | enum 1 / -1 | 1 |
| Variable | string, optional AXIS_REF handle of this axis | empty |
| Unit | enum mm / deg | mm |
Min and Max must be finite with Min < Max. Cartesian axes use Unit = mm, robot axes
Unit = deg; a wrong unit is reported and blocks the deploy. For a Robot group Min, Max
and Offset are hidden and not used: the drive limits of the RobotIK apply. The signal value is
Offset + Sign × logical position; feedback uses the inverse. Without Feedback, readers
use the simulated set-position. A configured invalid feedback produces an error.
The inspector uses the standard reference picker, signal slot rows, selects and number/string editors. Runtime position and command state are read-only. Redeploy after changing motion configuration. The newer fields (Kind, Kinematics, the joint dynamics, MotionAxis Variable and Unit) are taken over at deploy: a change shows “Takes effect on the next PLC deploy” and never affects a move that is running.

Quick start
Section titled “Quick start”- Add a PLCProgram and a MotionGroup.
- Add one to three child MotionAxis nodes, configure coordinate names and bounds, and bind each Setpoint to a PLCOutputFloat position signal.
- Configure each drive’s position-following behaviour to consume the matching signal.
- Enter the program below. Set MotionGroup.Program to that PLCProgram and Variable
to
motion. - Deploy, then Run in continuous simulation. Raise Start after enablement.
PROGRAM PositioningVAR motion : AXES_GROUP_REF; enable : MC_GroupEnable; move : MC_MoveLinearAbsolute;END_VARVAR_EXTERNAL Start : BOOL; END_VAR enable(AxesGroup := motion, Execute := TRUE); move(AxesGroup := motion, Execute := enable.Done AND Start, PositionX := 100.0, PositionY := 50.0, PositionZ := 0.0);END_PROGRAMZero profile inputs select group defaults. Hold Start through completion, then release and raise it for another move. Use AXIS_REF and Axis for a group containing exactly one MotionAxis. Handles belong only in PROGRAM VAR, are required on every MC call and cannot be assigned, calculated or passed through user POUs.
To check the profile on a running machine, open Axis forces for the mechanism and switch to Motor torque. Jerk-limited moves show smooth, repeating peaks without spikes:

Available function blocks
Section titled “Available function blocks”| Single axis | Purpose |
|---|---|
| MC_Power | Level-sensitive logical enable; Status/Valid |
| MC_Reset | Clear a resolved fault at standstill |
| MC_ReadActualPosition | Enable → Valid/Busy/Position |
| MC_MoveAbsolute | Absolute Position |
| MC_MoveRelative | Signed Distance from position at activation |
| MC_MoveVelocity | Continuous Velocity; InVelocity when speed is reached |
| MC_Halt | Interruptible controlled stop |
| MC_Stop | Controlled stop with held-Execute interlock |
| Group (Cartesian or Robot) | Purpose |
|---|---|
| MC_AddAxisToGroup | Add an axis handle to the group before enabling it |
| MC_GroupEnable / MC_GroupDisable | Enable coordination / immediately cancel and hold |
| MC_GroupReset | Clear a resolved fault at standstill |
| MC_MoveLinearAbsolute | Straight move to Position (array) or PositionX/Y/Z (Cartesian only); optional transition to the previous move |
| MC_MoveDirectAbsolute | Point-to-point move to Position; all axes arrive together; optional transition to the previous move |
| MC_GroupHalt | Controlled stop that locks nothing and can be replaced by the next move |
| MC_GroupStop | Controlled stop with held-Execute interlock |
| MC_GroupReadActualPosition / MC_GroupReadPosition | Enable → Valid/Busy/Position[0..5] and PositionX/Y/Z |
Execute commands trigger on a rising edge; falling Execute does not cancel the motion. Call instances cyclically to observe completion. Positional moves expose Done, Busy, Active, CommandAborted, Error and ErrorID. Stop has no Active port; MoveVelocity has InVelocity instead of Done. Readers use Enable, Valid and Busy, plus Error/ErrorID.
Positions and enums. Position is an ARRAY[0..5] OF LREAL, set element by element
(move.Position[2] := 400.0;). A MC_MoveLinearAbsolute instance uses either Position or
PositionX/Y/Z, never both. CoordSystem takes MC_COORD_SYSTEM.ACS (0) or MC_COORD_SYSTEM.MCS
(1, default); BufferMode takes the bare constants mcAborting/mcBuffered or the qualified
enum MC_BUFFER_MODE. MC_MoveDirectAbsolute takes Velocity, Acceleration, Deceleration and Jerk
in percent of the group’s nominal dynamics (0 means 100 %).
Only the first call of one MC instance per scan evaluates inputs; later calls return cached values. Use separate instances for scan-order arbitration. Direction constants are mcPositiveDirection (1), mcShortestWay (2), mcNegativeDirection (3) and mcCurrentDirection (4). Absolute linear moves accept but ignore a valid Direction; MoveVelocity rejects shortest-way. Zero Velocity selects the default, not a stop.
Axis states are Disabled, Standby, DiscreteMotion, ContinuousMotion, Stopping and ErrorStop. Group states are GroupDisabled, GroupStandby, GroupMoving, GroupStopping and GroupErrorStop. Enable reaches standby; completed moves return to standby; faults require reset after the cause clears.
Robots
Section titled “Robots”Set the group Kind to Robot, assign the robot’s RobotIK to Kinematics and add one MotionAxis per
joint named J1 to Jn (the index in the RobotIK axis list) with Unit deg. Bind each Setpoint to the signal
that the joint’s drive follows. The group then commands the robot from poses instead of single coordinates.
PROGRAM PickVAR arm : AXES_GROUP_REF; enable : MC_GroupEnable; toPick : MC_MoveDirectAbsolute; lift : MC_MoveLinearAbsolute;END_VARVAR_EXTERNAL Start : BOOL; END_VAR toPick.Position[0] := 300.0; toPick.Position[1] := -250.0; toPick.Position[2] := 400.0; toPick.Position[3] := 180.0; toPick.Position[4] := 0.0; toPick.Position[5] := 90.0; lift.Position[0] := 300.0; lift.Position[1] := -250.0; lift.Position[2] := 500.0; lift.Position[3] := 180.0; lift.Position[4] := 0.0; lift.Position[5] := 90.0; enable(AxesGroup := arm, Execute := TRUE); toPick(AxesGroup := arm, Execute := enable.Done AND Start, CoordSystem := MC_COORD_SYSTEM.MCS); lift(AxesGroup := arm, Execute := toPick.Done);END_PROGRAMPose contract
Section titled “Pose contract”With CoordSystem = MCS (the default), Position[0..2] is the local X, Y, Z position in millimetres and
Position[3..5] the local rotation as Euler angles X, Y, Z in degrees (order XYZ) of a node that hangs
directly below the RobotIK node and sits on the tool point. These are exactly the numbers the Inspector
shows for such a node (the Inspector shows metres; multiply by 1000). Moving, turning or uniformly
scaling the robot base does not change them. To read the pose of a mark elsewhere in the scene, use
MC_GroupReadPosition or the read-only line Pose in robot frame on the RobotIK.
CoordSystem = ACS takes the joint values J1 to Jn in degrees. MC_MoveDirectAbsolute moves point to
point in either system; MC_MoveLinearAbsolute on a Robot group needs the array form, and with ACS the
joint target is converted to a pose and approached on a straight line. MC_GroupHalt brakes along the path
without locking, MC_GroupStop locks until Execute falls.
World coordinate system and pose convention (in development)
Section titled “World coordinate system and pose convention (in development)”These two settings are a development feature: they are not yet available in released builds. Without them a Robot group behaves exactly as described above.
WCS. Assign a node of the scene to WorldFrame on the Robot group with the reference picker. Then
CoordSystem := MC_COORD_SYSTEM.WCS (2) is accepted by MC_MoveLinearAbsolute, MC_MoveDirectAbsolute,
MC_GroupReadPosition and MC_GroupReadActualPosition, and the pose is measured in the frame of that node.
Without WorldFrame, WCS is the same as MCS. Only the position and rotation of the node count; its scale must be
uniform and positive. A non-uniform or negative scale, or a WorldFrame that was deleted, answers 16#8010 and
names the cause in Problems. The frame is read when a command is accepted, so a moved WorldFrame applies to the
next command. WCS exists only for Robot groups; Cartesian groups and the systems FCS and TCS answer 16#8010.
PoseConvention sets how the six pose numbers of the group are written, in every coordinate system: in the
move inputs, in MC_SetCoordinateTransform, in the position reads and in the published robot points.
| PoseConvention | Values | Axes |
|---|---|---|
| YUpEulerXYZ (default) | X, Y, Z in mm, Euler X, Y, Z in degrees | the robot’s own frame, Y up (see Pose contract) |
| ZUpEulerZYX | X, Y, Z in mm, A, B, C in degrees, rotation Z, then Y, then X | the axes of the robot program export |
With ZUpEulerZYX a point carries the same numbers in the PLC program as in the robot program that the export writes for the same point, for example the X, Y, Z, A, B, C of a KUKA E6POS. At B = ±90° A and C turn about the same axis; the group then reports C = 0 and the whole turn in A. Joint values (ACS) and the rail value at index 6 (mm) are never converted.
Limits of robot motion
Section titled “Limits of robot motion”- The solution nearest to the current joint position is always used; there is no configuration or turn data.
- Only rotary axes; a chain with a linear axis is refused with a diagnostic.
OrientationModesupports onlymcLinear(0): the orientation turns the shortest way, evenly along the line.- A linear move is checked when it becomes active: samples at most 10 mm and 2° apart, at most 2000 (20 m).
An unsolvable sample ends the command with
16#800Fbefore anything moves. At run time a joint jump of more than 30° per step stops the group with16#800F; recover withMC_GroupReset. - The tool rotation is limited by
AngularVelocity; point-to-point moves useJointVelocity,JointAccelerationandJointJerkas 100 %. - A linear move keeps the tool limits (
Velocity,Acceleration,Jerk,AngularVelocity) and, from realvirtual WEB 6.9.0, also the joint limitsJointVelocity,JointAccelerationandJointJerk. Close to a singularity (for example a nearly stretched wrist) the tool therefore slows down instead of the joints exceeding their limits, and some moves without blending take longer than in earlier versions. Keep linear moves away from singular poses; use a point-to-point move to pass through. IgnoreJointDynamicsOnLin(off by default) restores the earlier behaviour: plain linear moves then use only the tool limits, and the joints can exceed their limits close to a singularity. The switch takes effect on the next PLC deploy.- Blending between moves works as described under Blending between moves. Only
ACSandMCS; the robot IK solver must be loaded (otherwiseMC_GroupEnableanswers16#800D).
Robot on a rail (external axis)
Section titled “Robot on a rail (external axis)”Add a MotionAxis named E1 to the group. Set Unit to mm and bind Setpoint to
the signal that drives the rail drive. Add an ExternalAxis component that links the
rail drive to the group’s RobotIK. Place the E1 axis on the rail drive’s node or
below it, otherwise the group refuses the configuration. The six robot joints remain rotary.
For MC_MoveDirectAbsolute and MC_MoveLinearAbsolute, use
Position with ARRAY[0..6] OF LREAL. Indices 0 to 5 hold the Cartesian pose in
MCS or the joint angles in ACS. Index 6 holds the rail value in mm.
Your Cartesian pose is relative to F0, the robot base in its zero position on the rail;
the moving base is F0 translated by e along the rail direction, so a target in F0 stays fixed as the rail moves.
Both move blocks accept ExternalAxisMode of type MC_EXTERNAL_AXIS_MODE:
MC_EXTERNAL_AXIS_MODE.Fixed(0, default) uses the rail value you supply.MC_EXTERNAL_AXIS_MODE.Auto(1) chooses the target rail value once when the move starts. Auto requires the Cartesian coordinate systemMCS. Robots with a spherical wrist or UR geometry use their closed-form solution.
The following forms apply to a group with E1:
| Position values | ExternalAxisMode | MCS | ACS |
|---|---|---|---|
6 (ARRAY[0..5] OF LREAL) | Fixed (default) | 16#8004 | 16#8004 |
| 6 | constant MC_EXTERNAL_AXIS_MODE.Auto | Allowed: pose in F0 | 16#8004 |
| 6 | variable, even if its value is Auto | 16#8004 | 16#8004 |
7 (ARRAY[0..6] OF LREAL) | Fixed (default) | Allowed: pose in F0, rail in mm | Allowed: J1..J6 in degrees, rail in mm |
| 7 | Auto | Allowed: pose in F0, index 6 ignored | 16#8004 |
A variable mode requires seven values and follows its current Fixed/Auto value.
Without E1, seven values or Auto returns 16#8004; six values with Fixed keep
the usual robot pose contract. Form checks run at deploy, with 16#8004 as the
runtime fallback. ExternalAxisMode is an extension to the PLCopen interface.
Auto uses these fields on RobotIK:
| Field | Unit | Meaning |
|---|---|---|
ExternalAxisTravelWeight | 1/m | Penalizes rail travel from the previous rail value. |
ExternalAxisJointReserveWeight | none | Penalizes joint positions close to their limits. |
ExternalAxisOffsetWeight | 1/m | Penalizes deviation from the preferred offset along the rail. |
ExternalAxisPreferredOffset | mm | Sets the preferred base offset relative to the target along the rail; 0 puts the base level with the target. |
The PLC copies these weights and the preferred offset at deploy; a change takes effect on the next PLC deploy.
Limits apply to each axis in its own unit: degrees for the joints and mm for E1.
The rail uses the drive’s LowerLimit and UpperLimit. Its TargetSpeed must
be positive. Acceleration limits rail acceleration only with UseAcceleration.
Jerk limits rail jerk only with UseAcceleration, SmoothAcceleration and
Jerk greater than 0. These drive settings take effect on deploy.
During a linear move, the tool tip’s path in F0 also limits
path speed. A rail value outside the limits at the target or a path point returns
16#8011. Auto returns 16#8012 when it finds no rail value for the target.
MC_GroupReadPosition and its alias MC_GroupReadActualPosition return seven values.
Bind Position to ARRAY[0..6] OF LREAL. Index 6 is the rail value in mm in both
ACS and MCS.
Blending works with E1 as on a group without a rail. Set BufferMode to
mcBlendingPrevious (or another blending mode) and TransitionMode to
mcTMCornerDistance on the following move; LIN-LIN, LIN-PTP, PTP-LIN and PTP-PTP
corners are blended. In the corner zone the rail is the seventh channel of the corner:
- On a LIN-LIN corner the rail moves along the same curve parameter as the tool tip, so its position and its speed pass through the zone without a step.
- On a corner with a PTP move the rail is part of the joint curve and is treated in mm like a joint.
- The rail keeps its own speed, acceleration and jerk from the rail drive inside the zone.
- On a PTP move the corner distance (TransitionParameter) counts in the unit of the leading channel, the axis or rail with the longest move time: in mm when the rail leads, in degrees when a joint leads. On a LIN move it is always mm of the tool path. A rail-only move with a corner distance of 20 starts its corner 20 mm before the target (at most half the move).
A move with a pure rail travel or a pure rotation of the tool has no corner; the group
stops at that point as before and reports the reason in Problems
(motion-blend-rejected). A DES snapshot of this group is refused with
plc-motion-external-axis.
Set the group’s Program to this PLCProgram and Variable to group.
Choose a target within the configured robot and rail limits. Raise Start after
enabling and hold it until completion. Release it before requesting another move.
PROGRAM RailPositioningVAR group : AXES_GROUP_REF; enable : MC_GroupEnable; move : MC_MoveDirectAbsolute; Position : ARRAY[0..6] OF LREAL;END_VARVAR_EXTERNAL Start : BOOL; END_VARPosition[0] := 300.0;Position[1] := -250.0;Position[2] := 400.0;Position[3] := 180.0;Position[4] := 0.0;Position[5] := 90.0;Position[6] := 500.0;enable(AxesGroup := group, Execute := TRUE);move(AxesGroup := group, Execute := enable.Done AND Start, Position := Position, CoordSystem := MC_COORD_SYSTEM.MCS, ExternalAxisMode := MC_EXTERNAL_AXIS_MODE.Fixed);END_PROGRAMExample: robot on a linear track
Section titled “Example: robot on a linear track”The RobotOnTrack demo uses a UR10e on a 3 m rail to visit two stations.

These excerpts use its poses in F0 (mm and Euler XYZ degrees). Set the group’s
Program to the example program and Variable to arm; power and add J1..J6 and E1
with MC_Power and MC_AddAxisToGroup, as in the demo, before enabling the group.
Raise Start for one sequence and keep it high until completion; release it to rearm.
Move to station A with PTP Fixed, then lift on a straight line in F0 while the rail moves from 400 to 800 mm.
PROGRAM TrackFixedVAR arm : AXES_GROUP_REF; enable : MC_GroupEnable; atA : MC_MoveDirectAbsolute; lift : MC_MoveLinearAbsolute; pAtA, pLiftA : ARRAY[0..6] OF LREAL;END_VARVAR_EXTERNAL Start : BOOL; END_VARpAtA[0] := -400.0; pAtA[1] := 400.0; pAtA[2] := 550.0;pAtA[3] := 90.0; pAtA[4] := 0.0; pAtA[5] := 0.0; pAtA[6] := 400.0;pLiftA[0] := -400.0; pLiftA[1] := 650.0; pLiftA[2] := 550.0;pLiftA[3] := 90.0; pLiftA[4] := 0.0; pLiftA[5] := 0.0; pLiftA[6] := 800.0;enable(AxesGroup := arm, Execute := TRUE);atA(AxesGroup := arm, Execute := enable.Done AND Start, Position := pAtA, CoordSystem := MC_COORD_SYSTEM.MCS, ExternalAxisMode := MC_EXTERNAL_AXIS_MODE.Fixed);lift(AxesGroup := arm, Execute := Start AND atA.Done, Position := pLiftA, CoordSystem := MC_COORD_SYSTEM.MCS, ExternalAxisMode := MC_EXTERNAL_AXIS_MODE.Fixed, Velocity := 150.0, Acceleration := 500.0, Deceleration := 500.0, Jerk := 5000.0);END_PROGRAMUse PTP Auto to approach station B and LIN Auto to descend; each move chooses its target rail value once when it becomes active.
PROGRAM TrackAutoVAR arm : AXES_GROUP_REF; enable : MC_GroupEnable; aboveB : MC_MoveDirectAbsolute; downB : MC_MoveLinearAbsolute; pAboveB, pAtB : ARRAY[0..6] OF LREAL;END_VARVAR_EXTERNAL Start : BOOL; END_VARpAboveB[0] := -2600.0; pAboveB[1] := 650.0; pAboveB[2] := 550.0;pAboveB[3] := 90.0; pAboveB[4] := 0.0; pAboveB[5] := 0.0; pAboveB[6] := 0.0;pAtB[0] := -2600.0; pAtB[1] := 400.0; pAtB[2] := 550.0;pAtB[3] := 90.0; pAtB[4] := 0.0; pAtB[5] := 0.0; pAtB[6] := 0.0;enable(AxesGroup := arm, Execute := TRUE);aboveB(AxesGroup := arm, Execute := enable.Done AND Start, Position := pAboveB, CoordSystem := MC_COORD_SYSTEM.MCS, ExternalAxisMode := MC_EXTERNAL_AXIS_MODE.Auto);downB(AxesGroup := arm, Execute := Start AND aboveB.Done, Position := pAtB, CoordSystem := MC_COORD_SYSTEM.MCS, ExternalAxisMode := MC_EXTERNAL_AXIS_MODE.Auto, Velocity := 150.0, Acceleration := 500.0, Deceleration := 500.0, Jerk := 5000.0);END_PROGRAMAt rest at station B, read all seven values, freeze the measured rail value in
pLiftB[6], and use Fixed for the following lift.
PROGRAM TrackReadAndLiftVAR arm : AXES_GROUP_REF; enable : MC_GroupEnable; readPosition : MC_GroupReadPosition; liftB : MC_MoveLinearAbsolute; pRead, pLiftB : ARRAY[0..6] OF LREAL; captured : BOOL;END_VARVAR_EXTERNAL Start : BOOL; END_VARpLiftB[0] := -2600.0; pLiftB[1] := 650.0; pLiftB[2] := 550.0;pLiftB[3] := 90.0; pLiftB[4] := 0.0; pLiftB[5] := 0.0;enable(AxesGroup := arm, Execute := TRUE);readPosition(AxesGroup := arm, Enable := enable.Done, CoordSystem := MC_COORD_SYSTEM.MCS, Position => pRead);IF NOT Start THEN captured := FALSE; END_IF;IF Start AND readPosition.Valid AND NOT captured THEN pLiftB[6] := pRead[6]; captured := TRUE;END_IF;liftB(AxesGroup := arm, Execute := Start AND captured, Position := pLiftB, CoordSystem := MC_COORD_SYSTEM.MCS, ExternalAxisMode := MC_EXTERNAL_AXIS_MODE.Fixed, Velocity := 150.0, Acceleration := 500.0, Deceleration := 500.0, Jerk := 5000.0);END_PROGRAMIKPath targets on a rail
Section titled “IKPath targets on a rail”IKTarget stores ExternalAxisMode (Fixed/Auto) and ExternalAxisPos (mm).
The inspector shows these fields only when the target’s robot has an ExternalAxis;
changing the mode to Auto does not solve immediately. Solve the target or edit it
with the gizmo to update its solution. Community plays stored joint and rail values
without a solver; solving in Fixed or Auto needs the Commercial edition.
If you add a rail to an existing path, review each target: its default rail value is 0 mm.
Named robot points from the scene
Section titled “Named robot points from the scene”Add MotionTarget to the node carrying an IKTarget. Pick a Robot MotionGroup in Group, then enter the declared ST global name in Variable (case insensitive). The suggested name comes from the point label; it is only a suggestion and is never entered automatically. Binding changes are document edits and can be undone.
Use Copy ST declaration and declare the point in a PLCLibrary GVL:
VAR_GLOBAL P_Pick : ARRAY[0..5] OF LREAL;END_VARThe values are X, Y, Z in mm and Euler X, Y, Z in degrees relative to the group’s
WorkObject. Without WorkObject they are in MCS; with a rail, MCS is the fixed
rail frame F0. For a robot on a rail declare ARRAY[0..6]; index 6 is the point’s
ExternalAxisPos in mm. Array length must match the group’s axis count.
Pass the array to ordinary PLCopen motion:
move(AxesGroup := arm, Execute := start, Position := P_Pick, CoordSystem := 3);In development, CoordSystem on the MotionTarget chooses the system the point is written in: PCS (default, as described here), MCS or WCS (the group’s WorldFrame, or MCS without one). The numbers follow the group’s PoseConvention (see World coordinate system and pose convention). Command the point in the same system.
Use PCS (CoordSystem := 3) with WorkObject and MCS without it. A program-set
MC_SetCoordinateTransform deliberately adds another offset: point X=100
plus transform X=50 commands X=150, while the authored point and its IK path
remain at X=100.
Moving the point publishes the new values for the next scan. Undo restores the old values. Reset and deploy replay the current point before the first scan. Moving a point and its WorkObject together preserves the point’s relative values, so the published array does not change. Its stored joint angles (AxisPos) are not solved again when only a parent such as the WorkObject moves: a point-to-point IK path then still drives to the old joint pose while the PLC program reads the new position. Move the point itself once (or teach it again) to update its joint angles. Moving the whole robot together with its points changes neither.
There is no exclusivity: the program and other identified writers may write
the array. The last writer wins; the next point change publishes again. The
array elements are visible as ordinary GVL signals, for example P_Pick[0].
Point tables: a grid of points
Section titled “Point tables: a grid of points”For pallet or rack slots, one MotionTarget can stand for a whole grid of points.
Set CountX, CountY and CountZ (1 to 64 each, together at most 64
points) and Pitch, the spacing in mm along the point node’s own X, Y and Z
axes. The node itself is the first point; every grid point keeps its
orientation (and, on a rail, its ExternalAxisPos). The pitch is physical mm: it
does not change when the point or its parent is scaled. While the point is
selected, the grid points appear as small markers in the 3D view, and the
Inspector shows the table size, for example
12 points, table ARRAY[0..71] OF LREAL. A count above 64 points in total is
refused before the change is made.
The variable is then one flat table with 6 values per point (7 with a rail):
VAR_GLOBAL P_Slots : ARRAY[0..71] OF LREAL; (* 12 points x 6 values, point k at 6*k *)END_VARPoint k = ix + CountX * (iy + CountY * iz): X runs fastest, Z is the layer.
Point k occupies the elements 6*k to 6*k+5. The Position of a move still
takes one point, so copy point k into a local array first. This is plain
IEC 61131-3, the same loop you write for any position table:
VAR pos : ARRAY[0..5] OF LREAL; i, k : INT;END_VAR
FOR i := 0 TO 5 DO pos[i] := P_Slots[6 * k + i];END_FOR;move(AxesGroup := arm, Execute := start, Position := pos, CoordSystem := 3);With a rail use ARRAY[0..6], FOR i := 0 TO 6 and P_Slots[7 * k + i].
Copy ST declaration writes the right table size and this loop as a comment.
With all counts at 1 the point is a single point, exactly as above. The
reachability check tests every grid point and names an unreachable one by its
index k and (ix, iy, iz). The ST export writes the whole table as the start value.
Export the program as ST (in development)
Section titled “Export the program as ST (in development)”The Export ST action on a PLC program in the Inspector downloads one IEC 61131-3
Structured Text file (.st) for a real controller. This is a development feature and
not yet available in released builds. The file contains, in this order:
- a header comment with origin, date, the motion groups with their PoseConvention, WorkObject and WorldFrame, the exported points with their coordinate system, and the warnings;
- the program’s own code. It is never rewritten: the only change is the start value
of each robot point declared in the program’s own
VAR_GLOBAL, set to the pose the simulation currently publishes (P_Pick : ARRAY[0..5] OF LREAL := [..];, mm and degrees in the group’s PoseConvention, seven values with a rail); - every PLC library GVL that declares an exported robot point: its text unchanged except
for the start values of those points, wrapped in
NAMESPACE <GVL name> ... END_NAMESPACE(withqualified_onlyas the library declares it). Library GVLs without an exported point are not included; - after that,
RV_WORK_OBJECTandRV_WORLD_FRAMEasVAR_GLOBAL CONSTANT ARRAY[0..5] OF LREAL: the WorkObject and WorldFrame relative to the robot base (MCS), only when they are set.
Only the realvirtual ST compiler reads the whole file as one source; NAMESPACE is a
realvirtual extension, not strict IEC 61131-3. For a CODESYS or TwinCAT project, split the
file into the project’s objects: the program into a program object, the text between
NAMESPACE and END_NAMESPACE into a GVL object with that name, and the frame block into
a GVL (it is data). CODESYS and TwinCAT do not accept VAR_GLOBAL after END_PROGRAM in a
program object.
Read the warnings before you hand the file on. The export never makes a silent
assumption; it warns about points without a valid binding (not exported),
realvirtual-specific names such as RV_* variables, GET_PARAM or MU_*, also inside an included library
(with line), a rail (the controller must know axis E1), a MC_SetCoordinateTransform
set at runtime (not part of the start values), start values it replaced, and a program
that does not compile on its own in realvirtual (for example because it uses a PLC
library). The export is no CODESYS project; use the CODESYS export for that.
Agents use web_query("plc.program.export", {"programPath": "<program>"}), which
answers { fileName, text, warnings } and changes nothing in the model.
Problems names missing variables, wrong types or lengths, duplicate point bindings, missing groups or kinematics, contradictory IKPath robot assignments and unsupported Cartesian/tracking groups. A standalone point gets its robot from Group. An existing IKPath assignment is never silently replaced.
A Drive_FollowPosition bound to an axis of the robot keeps driving that axis while an IK path, ik.robot.goTo or a Jog moves the robot: the follower’s setpoint overwrites the robot motion on that axis. Drive a robot axis either through a follower or through robot motion, not both at once. Robot ownership already prevents ST and IK paths from taking control simultaneously.
Blending between moves
Section titled “Blending between moves”By default a move ends at standstill before the next one starts. MC_MoveLinearAbsolute and MC_MoveDirectAbsolute
can instead pass a corner without stopping: the group leaves the first move shortly before its end, follows a smooth
curve and joins the second move. realvirtual WEB runs locally, so the curve is planned on your machine with no cloud
service and your data stays with you.
The three inputs belong to the second move (the successor) and describe the transition from the first move into it:
| Input | Values | Meaning |
|---|---|---|
TransitionVelocity | MC_TRANSITION_VELOCITY: mcTVZero 0, mcTVLow 1, mcTVPrevious 2, mcTVNext 3, mcTVHigh 4 | Speed in the curve. mcTVZero (default) stops at the corner as before. 1 uses the lower of the two move velocities, 2 that of the first move, 3 that of the second, 4 the higher one. Modes 1 to 4 only act up to the slower of the two programmed velocities: the programmed velocity of a move is always a hard limit (PLCopen-compliant), so the curve never runs faster than either move |
TransitionMode | MC_TRANSITION_MODE: mcTMNone 0 (default) or mcTMCornerDistance 3 | Only these two modes execute; mcTMStartVelocity, mcTMConstantVelocity and mcTMMaxCornerDeviation give 16#8004 |
TransitionParameter | ARRAY[0..3] OF LREAL | [0] is the corner distance d: millimetres on a linear move, degrees of the leading joint on a point-to-point move, millimetres on the linear move of a mixed pair. [1..3] are reserved and must be 0 |
A transition needs BufferMode = mcBuffered, TransitionVelocity other than 0, TransitionMode = mcTMCornerDistance
and a successor that is commanded while the first move is still running. With mcAborting, or with the inputs at
their defaults, the first move brakes as before. The reference point is fixed to the start of the second move.
A value of 0 or less for d, a TransitionVelocity outside 0 to 4 or a nonzero TransitionParameter[1..3] returns 16#8004.
PROGRAM CornerVAR arm : AXES_GROUP_REF; enable : MC_GroupEnable; first, second : MC_MoveLinearAbsolute; corner : ARRAY[0..3] OF LREAL;END_VARVAR_EXTERNAL Start : BOOL; END_VAR first.Position[0] := 300.0; first.Position[1] := -250.0; first.Position[2] := 400.0; first.Position[3] := 180.0; first.Position[4] := 0.0; first.Position[5] := 90.0; second.Position[0] := 500.0; second.Position[1] := -250.0; second.Position[2] := 400.0; second.Position[3] := 180.0; second.Position[4] := 0.0; second.Position[5] := 90.0; corner[0] := 40.0; enable(AxesGroup := arm, Execute := TRUE); first(AxesGroup := arm, Execute := enable.Done AND Start); second(AxesGroup := arm, Execute := enable.Done AND Start, BufferMode := MC_BUFFER_MODE.mcBuffered, TransitionVelocity := MC_TRANSITION_VELOCITY.mcTVLow, TransitionMode := MC_TRANSITION_MODE.mcTMCornerDistance, TransitionParameter := corner);END_PROGRAMWhat is blended
Section titled “What is blended”- Linear to linear, point-to-point to point-to-point and mixed pairs, on robot groups and on Cartesian groups.
- The corner distance is limited to half the length of the shorter of the two moves. The Problems panel then shows
the info
motion-blend-distance-capped. - The speed in the curve is never higher than the limits allow: the joint limits along the curve,
AngularVelocityand the speed from which the second move can still stop at its end. - Stop, Halt, an Aborting command or a fault inside the curve brake along the path.
When blending is enabled, a transition between a linear move and a joint move carries the tool through the corner
without slowing to a crawl. The programmed target points stay the same. A stop requested during a transition
respects the robot’s joint limits and can therefore take slightly longer than requested. A sequence of corners
without a straight piece between them keeps the same speed at the shared point; the first curve is lowered if
it has not started yet and that is not slower than stopping at the second corner. If that is not possible,
the group stops at the second corner and the Problems panel shows the info motion-blend-rejected: the
following transition is slower than the one before it and the one before it cannot be slowed down to match.
When the group stops at the corner
Section titled “When the group stops at the corner”No transition arises, and the group stops at the corner exactly as without blending, when
- the second move is commanded too late, for example in the scan in which the first move already reaches the corner,
- the curve cannot be driven within the limits,
- the check of the second move uses up its budget or the second move is unreachable,
- the group is already braking, or the pair has no curve (a pure rotation, a move of length zero),
- a move is longer than 20 m (2000 samples).
- In a sequence of corners without a straight piece between them, the following transition is slower than
the one before it and the first curve can no longer be lowered (reason
chain-speed).
The Problems panel then shows the info motion-blend-rejected with the reason, once per program run. Both hints are
reported at the end of the scan. The second move is checked over its stopping distance when it is accepted and step by
step ahead of the motion. If that check fails before the curve starts, the transition is dropped and the second move
ends with 16#800F when it starts; once the curve has started, the group stops with 16#800F and brakes inside the
checked part.
Limits
Section titled “Limits”- Linear moves keep the joint limits unless
IgnoreJointDynamicsOnLinis on (see Limits of robot motion). At a transition the joint limits hold in the sense “not worse than without a transition”; close to a singularity the joint jerk can lie slightly above its limit. - A
MC_GroupStoporMC_GroupHaltshortly before a blended corner stays within the tool speed limit: the group brakes on the programmed straight line with yourDecelerationand does not enter the cancelled curve; the buffered next move is aborted. If that braking would run past the end of the line, the group brakes harder, up to the robot’s limits, or keeps the running profile to the end of the line. The Problems panel then showsmotion-lin-stop-at-limit. - Since realvirtual WEB 6.9.0 each piece of a corner uses its own approach limits, so blended corners are usually faster than stopping at them. Known limitation: a point-to-point, linear, point-to-point, linear chain without a straight piece between the corners is about 7 % slower with blending than with stopping, and in some other cases blending is still slower than stopping at the corner. A fix is planned.
- Only
mcTMCornerDistanceexists. The obsoletemcBlendingLowtomcBlendingHighbuffer modes stay rejected with16#8007; useTransitionVelocityinstead.
See your programmed points in 3D
Section titled “See your programmed points in 3D”The targets of a robot program exist only as numbers in Structured Text. To see where they are, use Motion targets in the overlay menu of the 3D view while the simulation runs. The entry is offered when the model contains a robot group, and it is on by default. If you switch it off or on yourself, your choice is kept.

- Markers: every target the robot group has accepted appears as a small coordinate triad at its pose (X red, Y green, Z blue), drawn at a constant size on screen, with a ring that faces the camera. A solid ring marks the active target, a dashed ring a waiting one. Targets the robot has already reached stay visible but faint, so the taught points of a cycle build up as the program runs.
- Labels: the target the robot is moving to and the targets waiting in the buffer carry a label with the name of the function block instance and the motion type, for example
toAboveSlot PTPordownSlot LIN. Labels sit beside the triad. A target that failed or was aborted keeps its label and turns red. Reached targets show the marker only. - Same pose, several commands: commands that address the same pose share one marker.
- TCP trail: a line shows the path of the tool centre point over the last eight seconds of simulation time, which makes approach moves and blended corners visible.
The overlay shows the programmed point. With blending the path passes near that point without reaching it, and the trail shows the difference.
The overlay only reads. It changes neither the program nor the targets, works for robot groups only, and pauses while the model runs as discrete-event simulation. After restoring a snapshot, labels of moves that were already running are empty until the program commands them again.
An AI assistant reads the same list with web_query("motion.group.targets", {}).
Ownership and lifecycle
Section titled “Ownership and lifecycle”A group has exactly one owning PLCProgram occurrence. Many FB instances can share its handle, but one handle cannot bind two groups. Missing/duplicate bindings and competing program/group or group/group set-point writers refuse deployment with Problems entries.
Live controller values override local motion; the task writes nothing to live-bound or forced set-points. Authority loss suspends the group until authority returns and it is reset. Reconnect resynchronises without replaying commands. External operation/jog must enter the PLC as signals.
Runner Stop, scan error, COLD redeploy and group removal brake and hold under local authority. Simulation/PLC Reset is immediate, even while paused, and clears motion before the viewer resets drives. Power off/GroupDisable cancel immediately; use Stop first for a controlled stop.
Deploy while the simulation runs
Section titled “Deploy while the simulation runs”You can change the ST code and deploy it again while the simulation runs. A deploy restarts the
function blocks, so a start signal that is still TRUE would look like a new rising edge. To keep
the robot or axis from moving on its own, a move block ignores a held Execute = TRUE after
such a deploy. It starts again after Execute has been FALSE once and then goes TRUE.
- Which blocks wait:
MC_MoveAbsolute,MC_MoveRelative,MC_MoveVelocity,MC_MoveLinearAbsoluteandMC_MoveDirectAbsolute. - Which blocks act at once:
MC_Stop,MC_Halt,MC_GroupStopandMC_GroupHalt(a held stop keeps holding), and the administrative blocksMC_GroupEnable,MC_GroupDisable,MC_AddAxisToGroup,MC_GroupResetandMC_Reset. - What you see: the block reports no error and its outputs stay FALSE. The Problems panel
shows the info
plc-motion-execute-held-at-deploywith the name of the waiting block. The entry disappears after the falling edge.
A cold start still works as before: when the simulation starts or is reset, a held
Execute = TRUE counts as a rising edge, so a program with a permanently wired
Execute := TRUE runs. The same holds for the first deploy of a new program into the running
simulation and for the Reset button of the PLC editor. Pause and resume, Stop and Run of the
program, and a deploy that failed and was corrected do not lift the protection.
Errors, limits and use cases
Section titled “Errors, limits and use cases”| ErrorID | Meaning |
|---|---|
| 16#8001 | Invalid binding |
| 16#8002 | Disabled |
| 16#8003 | Axis bounds exceeded |
| 16#8004 | Invalid parameters |
| 16#8005 | Owner/writer conflict |
| 16#8006 | Forced/external authority |
| 16#8007 | Invalid BufferMode/Direction |
| 16#8008 | State/interlock refusal |
| 16#8009 | Invalid feedback |
| 16#800A | Profile provider failure |
| 16#800B | Axis of another group added |
| 16#800C | Axis added twice, or group enabled before all axes were added and powered |
| 16#800D | Robot kinematics unavailable (reference missing, solver not loaded, no solver budget) |
| 16#800E | Point-to-point target unreachable |
| 16#800F | Linear path not solvable or jump guard hit |
| 16#8010 | Coordinate system not supported, or its frame (WorkObject, WorldFrame) is unusable: missing, scaled unevenly or deleted |
| 16#8011 | Rail value outside the rail drive limits at the target or a point on the path |
| 16#8012 | Auto finds no rail value for the target |
| 16#8013 | The mounted robot was removed; the group waits for its replacement. Running moves end as aborted, new commands are refused until then |
| 16#8014 | In development, only with RequireReachableTargets: the reachability check of the group’s motion targets failed or is unavailable |
These are realvirtual-specific positive DINT values. Parameter errors reject that request without disturbing healthy motion. Kernel faults latch ErrorStop/GroupErrorStop.
Use this subset for Cartesian handling, positioning, single-axis speed control and robots with rotary axes. The coordinate systems are ACS, MCS and PCS (WCS for Robot groups in development); homing and synchronisation are absent, and moves are blended only with the corner distance transition. Acceleration/deceleration share the conservative limit min(A,D). Every replacement brakes first, including a collinear move. Done reports profile completion, with no hardware settling monitor. An unavailable protected profile core uses a warned trapezoid fallback without a jerk guarantee.
Continuous simulation and DES
Section titled “Continuous simulation and DES”PLCopen motion runs in both simulation kinds. In DES the moves advance on a fixed motion cycle, and the program scans only when something it reads changes.
| Continuous simulation | DES (event-driven) | |
|---|---|---|
MC_ blocks | Run; the motion task advances the profile every simulation step | Run; a fixed motion cycle (the Cycle Time of the DES manager) advances the profile while a move is running |
| When a command starts | In the same simulation step, right after the scan that issued it | At the following motion cycle point, up to one cycle later |
| When the program scans | Every step | When a command’s status or InVelocity changes, and on its other triggers (signal change, timer, own change). A program that reads a position with MC_ReadActualPosition or MC_GroupReadActualPosition also scans when that axis moves |
| Idle model | Scans every step | No motion cycle events while no move is running |
| DES check | Not applicable | MC_ blocks cause no finding. D5 remains only for a motion program started without the DES motion cycle |
| Snapshots | Not applicable | A move that is running when you save continues identically after the restore |
| End position and timing | Reference | The same profile, started on the motion cycle grid. Do not expect the same timestamps as in continuous simulation |
A snapshot is refused, with the reason shown before it is saved, in two short situations: a move was started before the DES run began (let it finish), or a motion task is still braking after its program or group was removed (try again after about a second).
Robots in DES
Section titled “Robots in DES”Robot groups run in DES as well: MC_MoveDirectAbsolute and linear moves use the same motion cycle, and a snapshot taken during a robot move continues identically after the restore. The IK solver must be loaded when you restore.
With a limited number of live IK solves, a model that contains both a PLC-controlled robot group and an IK path cannot be saved as a snapshot. The snapshot menu shows the reason before saving, and loading such a snapshot is refused without changing the running simulation. With an unlimited solver budget, or with only PLC robot groups or only IK paths in the model, snapshots work.