SyncTwinTECHNOLOGIES
Module · PLC programs

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.

Unit program in SFC A chain of SFC steps: wait for the part, grip, transfer, release; transitions on sensor signals, the grip is confirmed by an input; the final step is the PackML Complete state. S0 wait for part sensor: part in place S1 grip input: grip confirmed S2 transfer axis: target reached S3 release Complete PackML state
What it is

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.

Language

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.

Structure

What a unit cycle is made of

PartWhat it isNote
SFC stepA cycle state: what the unit does while the step is activeThe final SFC step is the unit’s PackML Complete state
TransitionThe condition on which a step is replaced by the next oneUsually the Done output of a motion block, an input port or a timer
Motion blockPLCopen: MC_MoveAbsolute and others, MC_Reset, MC_ReadAxisError, MC_SetPositionThe block has an Active state, acceleration and deceleration; MC_SetPosition shifts the coordinate without motion
Axis enableMC_Power — ANDed with unit powerMC_Power(FALSE) disables the axis; without it the axis does not move
KnobAn input variable with a range and unitsSpeeds and delays go into knobs, not into the text
PortA unit input or output for the project; goods use in/out portsAn output has a signal kind and period, an input has a timeout behaviour
PlaceFormal: Pick, PlaceThe 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.

Unit block

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”.

How it works

Five steps from an empty program to the drives

  1. 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.
  2. 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.
  3. LabI/O table, input forcing, SFC player and PackML state — in the browser.
  4. Virtual axesThe unit runs on the test bench while the drives stand still: steps, timing and transitions are visible.
  5. 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.

PLC lab

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.

States and faults

The unit speaks PackML

StateWhen
CompleteThe cycle reached the final SFC step
AbortedAxis fault — following error exceeded the limit
Stop + Abort“Stop” from any window: twin, commissioning tool, panel at the equipment — one command
AbortedOutput is on but the confirmation input never came — output confirmation watchdog in preparation

Default fault thresholds

LimitDefaultNote
Torque threshold600 ‰ of ratedA fault only if the excess lasts longer than the delay: during acceleration torque normally goes over the limit
Position error threshold0.05 revolutionNot checked on virtual axes: there the error is the model working, not a drive fact
Fault delay0.2 sHow 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.

Example

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 stepActionTransition
homeBoth axes to 0° — MC_MoveAbsolute on eachBoth blocks Done
tilt“Tilt” to 45°Done
turn“Rotation” by 360°Done
tilt backBoth axes to 0° simultaneouslyBoth blocks Done
pauseTimer delayTimer → “home”
  1. Block“New block” → positioner sample. Two axes named after the mechanism joints arrive together with the geometry.
  2. ProgramAn SFC template, a five-step cycle. Speeds go into input variables: they become unit knobs.
  3. CheckThe compiler accepts the text and the binding. The player plays the steps, the “Unit” panel shows the PackML state.
  4. Virtual servosThe tilt sets to 45°, the rotation completes a turn; at the end of the cycle the unit is in the Complete state.
  5. 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.

Run log and refusals

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 refusalWhat it meansWhat to do
Servo not mapped to a drive on the busThe program axis is not linked to the unit’s driveAssign an axis profile in the commissioning tool
Input or output not mappedThe program uses a channel the hardware does not knowMap the I/O channel in the commissioning tool
Unit not foundThe unit the run was addressed to has been deleted or the wrong one was specifiedSelect the unit again
Test bench refused without a reasonThe unit sent no reason; the platform does not invent oneCheck 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.

Boundaries

What a unit program does not do

Does not doWhyWhere it is
Does not execute G-codeThe unit has no interpreter of its own: it calls a cutting program with a start blockCNC machines
Does not know tools and slotsUnit tooling is declared as a channel, not as a number in a tool tableRobots and tooling
Does not derive a toolpath from the partThe author names the path — with SFC steps and PLCopen blocksCutting programs
Does not accept jog and raw commands from the cloudWhat crosses the boundary is intent — the program and the “run” and “stop” commandsCommissioning at the equipment
Does not check lag on virtual axesThere is no feedback there; only a run on drives proves the loadDrives
Status

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 access
Next step

Discuss 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

Implementation →

Request access