States in StateTick
A state is a named mode of your machine — Idle, Running, Faulted — and the actions it performs. Each state has three action groups: On Entry (run once when the state becomes active), Steps (run every scan while active), and On Exit (run once when leaving). You build each action from your equipment, globals, timers and logic blocks, then map the state onto real hardware in a composite.
What a state is made of
States are authored on the Generic Composer → States page. Each state is a card with a Name and the three collapsible groups. Here is a complete state, Running, with actions in all three:
Adding an action
Every group has its own + Add ▾ button. Click it and pick the kind of action to add — the same five kinds are available in On Entry, Steps and On Exit:
| Action kind | What it does |
|---|---|
| Equipment | Write an equipment interface variable — Motor.IMotor.SetSpeed(100). |
| Global | Write a project global — Global.SetPartCount(0). |
| Generic | A typed setter not tied to any equipment — Generic.Set[Bool](true), bound later in a composite. |
| Timer | Operate a timer placeholder — Timer.Start('DelayTimer'). |
| Logic Block | Run an ST Logic Block — Logic.Execute('LineControl'). |
This guide, page by page
On Entry, Exit & Steps →
When each group runs — and why Steps are cyclic actions, not condition-gated sub-steps.
Equipment Actions →
Write an equipment interface variable, from a fixed value or another signal.
Global Actions →
Set a project global — already concrete, no mapping needed.
Generic Actions →
Typed setters with no target yet — bind them to any equipment in the composite.
Timer Actions →
Start/Stop/Restart/Reset/SetPreset a timer placeholder.
Logic Block Actions →
Invoke an ST Logic Block by name — cross-linked to the ST tutorial.
Composite Mapping →
Instantiate a state and map every generic action to a concrete instance.
Full Example →
Build the Running state end to end and map it onto a real machine.
Once your states exist, the FSM Planner is where you wire them together — and it can create them for you in the first place, straight from a sketch.
Try it in StateTick
Author a state machine once with generic actions, then map it to real hardware in every machine you build.
Get Started →