StateTick Docs Home →
Tutorial · Series

ST Logic Blocks in StateTick

An ST Logic Block is a reusable routine written in Structured Text Lite (a focused subset of the ST language) that runs every scan and drives your machine's behaviour. This guide starts with the essentials, then breaks the topic into focused pages you can work through in order.

What is an ST Logic Block?

An ST Logic Block is a named piece of Structured Text with typed parameters and an ST body. The body reads and writes global variables, equipment signals and its own parameters, and it executes on every runtime tick. Like an interface, a block is a reusable template: author it once in the Generic Composer, then instantiate it against real equipment inside a composite.

Blocks live on the Generic Composer → ST LogicBlocks page. Expand Generic Composer in the left sidebar and select ST LogicBlocks (highlighted below).

The full StateTick Studio window with Generic Composer expanded and the ST LogicBlocks page open, both highlighted
Where you are: Generic Composer → ST LogicBlocks, in the full Studio window.

The block editor

Each block is a section with a Parameters list, the ST code body (with live syntax highlighting), and an Advisor button. The Errors / Warnings badges at the bottom validate the block as you type.

The LineControl ST Logic Block editor with two parameters and a syntax-highlighted Structured Text body
The LineControl block: two parameters and a syntax-highlighted ST body.

This guide, page by page

Each page is short and focused, with a complete mini example:

Try it in StateTick

Write your control logic once as an ST block, validate it live, then reuse it across every machine in your factory.

Get Started →