Unit logic in IEC 61131-3 — verified before the hardware
SFC or ST, motion with PLCopen blocks, unit state per PackML. The program is written in the browser and passes the compiler and a run before start-up.
A unit program is an ordinary controller program
A line unit — robot, positioner, track, gripper, conveyor — runs its own program. In SyncTwin it is an IEC 61131-3 program: the same standard used to write logic for industrial controllers.
Logic is described with SFC steps and transitions or with ST text. Axis motion is set with standard PLCopen blocks. End of cycle and unit faults are named as PackML states.
Hence the main consequence: your commissioning engineer, familiar with the standard, reads and edits the program. There is no separate platform language to learn.
The program is written and checked in the browser before the equipment arrives: compiler, a lab with an I/O table, a run on virtual axes. It goes to the drives unchanged, without rewriting.
One language — IEC 61131-3
- Logic — SFC or STSteps and transitions are read by a commissioning engineer who knows the standard.
- Motion — PLCopen blocksAxis move, reset and error reading — with standard blocks.
- Ready-made text is brought as a fileImport of .st and PLCopen XML programs; the language is a property of the program.
- Unit state — PackMLThe final SFC step is Complete; an axis fault is Aborted; one «Stop» in all windows.
Language is a property of the program
Set on creation or import. The lab screen, tabs and filter build themselves from it.
A new program starts from an SFC template the compiler already accepts.
Import instead of typing
The “Import” button takes .st and PLCopen XML files. If a file contains several program units, the platform asks which one to take.
Program knobs
Input variables with a range and units become unit knobs. The “Visual” view shows them for any language; values are stored with the unit.
What a unit cycle is made of
| Part | What it is | Note |
|---|---|---|
| SFC step | A cycle state: what the unit does while the step is active | The final SFC step is the unit’s PackML Complete state |
| Transition | The condition on which a step is replaced by the next one | Usually the Done output of a motion block, an input port or a timer |
| Motion block | PLCopen: MC_MoveAbsolute and others, MC_Reset, MC_ReadAxisError, MC_SetPosition | The block has an Active state, acceleration and deceleration; MC_SetPosition shifts the coordinate without motion |
| Axis enable | MC_Power — ANDed with unit power | MC_Power(FALSE) disables the axis; without it the axis does not move |
| Knob | An input variable with a range and units | Speeds and delays go into knobs, not into the text |
| Port | A unit input or output for the project; goods use in/out ports | An output has a signal kind and period, an input has a timeout behaviour |
| Place | Formal: Pick, Place | The project specifies the actual point at the unit; the program is not edited |
Links to neighbours — not in the program
A unit does not know its neighbours. The program declares ports; the project connects them with a wire on the “Graph” tab.
Motion techniques — as blocks
Transfer, flip and placement are available as function blocks. A machine’s cutting program is called from the unit with a G-code start block.
Waiting — with a named outcome
A step waiting for a sensor gets a wait limit and an outcome for it: skip, halt or raise a fault. The program author decides.
Channels with roles, not addresses
Axes
The role selects the drive mode, the mechanism — what the operator sees.
Inputs — sensors
The role says what the sensor knows: «part in place», «grip confirmed».
Outputs
The role says what the port does: holds, stops, marks, diverts the flow.
- A unit is offered only its own actionsWithout a presence sensor, «wait for the part» is not in the list at all.
- Command sent is not yet «gripped»The grip is confirmed by an input signal, not by a guessed delay.
- Binding to hardware — during commissioningStart without a binding is refused with the channel name; «probably the first drive» is never substituted.
Channels, roles and the catalogue of unit samples in detail — on the page “Line automation”.
Five steps from an empty program to the drives
- Create“New program” — choose the unit block. The block gives the program its axes, roles, profiles and I/O names. Or “Import” .st and PLCopen XML.
- CompilerThe text is checked in full against IEC 61131-3, then the binding to the unit. Errors are shown as is, with their place in the text.
- LabI/O table, input forcing, SFC player and PackML state — in the browser.
- Virtual axesThe unit runs on the test bench while the drives stand still: steps, timing and transitions are visible.
- DrivesFollowing error and load are checked only on a real axis, after profiles are assigned.
Forcing is a debugging tool: it is cleared on emergency stop and never goes into production. The value put into an input was invented by the author; on the test bench it is named by the simulator.
Program and unit on one screen
View by language
The lab opens a program in its own language: SFC steps and transitions or ST text. The in-browser player exists for SFC with a step model.
Bottom “Unit” panel
Input table %IX and output table %QX, PackML state. An input is forced with a switch; ports appear as widgets next to the program knobs.
A clean check
The step and transition counter and the compiler verdict are shown below the code. A demo program is read-only — work happens in its copy.
The unit speaks PackML
| State | When |
|---|---|
| Complete | The cycle reached the final SFC step |
| Aborted | Axis fault — following error exceeded the limit |
| Stop + Abort | “Stop” from any window: twin, commissioning tool, panel at the equipment — one command |
| Aborted | Output is on but the confirmation input never came — output confirmation watchdog in preparation |
Default fault thresholds
| Limit | Default | Note |
|---|---|---|
| Torque threshold | 600 ‰ of rated | A fault only if the excess lasts longer than the delay: during acceleration torque normally goes over the limit |
| Position error threshold | 0.05 revolution | Not checked on virtual axes: there the error is the model working, not a drive fact |
| Fault delay | 0.2 s | How long the excess must last |
These are starting values
For specific hardware the thresholds are set explicitly. Your unit’s datasheet refines them.
Torque on a virtual axis is a model
It is derived from the difference between “commanded” and “actual”. Good for debugging end-stop search and tightening logic; it is not a measurement.
No rated torque in the datasheet — a dash
The per-mille scale counts from the motor’s rated torque. With no rating set, a torque condition never fires; fill in the datasheet before building a transition on it.
From zero to motion: a welding positioner
Two rotary drives: tilt sets the table under the seam, rotation turns the faceplate under the torch. This is a sample from the unit catalogue; its program can be taken as is and rewritten for your hardware.
| SFC step | Action | Transition |
|---|---|---|
| home | Both axes to 0° — MC_MoveAbsolute on each | Both blocks Done |
| tilt | “Tilt” to 45° | Done |
| turn | “Rotation” by 360° | Done |
| tilt back | Both axes to 0° simultaneously | Both blocks Done |
| pause | Timer delay | Timer → “home” |
- Block“New block” → positioner sample. Two axes named after the mechanism joints arrive together with the geometry.
- ProgramAn SFC template, a five-step cycle. Speeds go into input variables: they become unit knobs.
- CheckThe compiler accepts the text and the binding. The player plays the steps, the “Unit” panel shows the PackML state.
- Virtual servosThe tilt sets to 45°, the rotation completes a turn; at the end of the cycle the unit is in the Complete state.
- DrivesAxes are assigned profiles and the drive datasheet is filled in; “In cycle” mode is for a production run.
Axis limits come from the mechanism: tilt ±85°, rotation ±360°. The manufacturer does not publish the ranges, and the mechanism file calls this an assumption.
The platform names the run outcome
The unit card keeps recent runs: which program, when, how it ended. From the moment of start the platform itself polls the test bench and stamps the record from its frame — the card does not need to stay open.
- Ran to the endThe program completed the cycle.
- StoppedThe run was interrupted before the end.
- ErrorThe run failed; the reason is in the record.
- Outcome unknownNobody observed the end of the run: the test bench did not confirm motion, the link dropped or the server restarted mid-run.
A refusal is named, not silent
| Test bench refusal | What it means | What to do |
|---|---|---|
| Servo not mapped to a drive on the bus | The program axis is not linked to the unit’s drive | Assign an axis profile in the commissioning tool |
| Input or output not mapped | The program uses a channel the hardware does not know | Map the I/O channel in the commissioning tool |
| Unit not found | The unit the run was addressed to has been deleted or the wrong one was specified | Select the unit again |
| Test bench refused without a reason | The unit sent no reason; the platform does not invent one | Check the log on the box and the link to the unit |
An unmapped drive blocks the start: there is no substitution of a real axis with a virtual one “just to make it move”. A green run with unconnected hardware is the most expensive error, and the platform does not allow it.
What a unit program does not do
| Does not do | Why | Where it is |
|---|---|---|
| Does not execute G-code | The unit has no interpreter of its own: it calls a cutting program with a start block | CNC machines |
| Does not know tools and slots | Unit tooling is declared as a channel, not as a number in a tool table | Robots and tooling |
| Does not derive a toolpath from the part | The author names the path — with SFC steps and PLCopen blocks | Cutting programs |
| Does not accept jog and raw commands from the cloud | What crosses the boundary is intent — the program and the “run” and “stop” commands | Commissioning at the equipment |
| Does not check lag on virtual axes | There is no feedback there; only a run on drives proves the load | Drives |
What works and what is in preparation
- RunsST and SFC programs, import of .st and PLCopen XML, compiler, lab with forcing, unit start on virtual axes and on test bench drives, run log.
- In preparationOutput confirmation watchdog; a transfer block with points as a table — done in code, coming in the next releases.
- Subject of the implementationRunning the program against the simulator next to the controller, sensors through the same input as real ones — virtual commissioning.
Discuss an implementation
Send the unit program or describe its cycle — we will check it in the lab and propose an R&D stage with price and timeline.
Request accessDiscuss an implementation
Describe the unit or line — we will tell you what we will verify and in what time. Target indicators are fixed in the implementation specification.
Request access