StateTick Docs Home →
Tutorial · Series

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:

The full StateTick Studio window: Generic Composer open, the States page selected, and a state named Running with On Entry, On Exit and Steps groups filled with actions
Where you are: Generic Composer → States, in the full Studio window.
The Running state up close: On Entry runs Motor.IMotor.SetSpeed(100) and Global.SetPartCount(0), On Exit runs Motor.IMotor.SetSpeed(0), Steps run Timer.Start(DelayTimer) and Logic.Execute(LineControl)
A state = a Name + three action groups: On Entry, Steps, On Exit.

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:

The + Add dropdown on a state's On Entry group, listing Equipment Action, Global Action, Timer Action, Logic Block Action and Queue Action
The + Add menu: Equipment, Global, Timer, Logic Block and Queue actions (Generic variants live inside the Equipment dialog).
Action kindWhat it does
EquipmentWrite an equipment interface variable — Motor.IMotor.SetSpeed(100).
GlobalWrite a project globalGlobal.SetPartCount(0).
GenericA typed setter not tied to any equipment — Generic.Set[Bool](true), bound later in a composite.
TimerOperate a timer placeholder — Timer.Start('DelayTimer').
Logic BlockRun an ST Logic BlockLogic.Execute('LineControl').

This guide, page by page

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 →