Skip to content

Structured Text simulator

A Structured Text simulator that runs in your browser

PLCflow Sim's native language is IEC 61131-3 Structured Text. Write IF/ELSIF logic, timers and counters, press Run, then set inputs and values in the tag list beside the code and see every tag it drives respond.

Run an exampleBrowse examples
IEC 61131-3Structured TextTON / TOF / CTUT# durations

Imported ladder reads back as Structured Text

  1. 01 Write
  2. 02 Run
  3. 03 Set inputs
IF Level > 85 THEN
  HighAlarm := TRUE;
END_IF;
IF Level < 75 THEN
  HighAlarm := FALSE;
END_IF;
FillValve := LowAlarm AND NOT HighAlarm;
From the tank level example
The tank level example in Structured Text, running in PLCflow Sim. Level is 88 and HighAlarm is on.
The tank level example in the Structured Text view, with its tags live in the list beside the code.

What you get when you run Structured Text

Live tags beside the code

The tag list sits next to the editor and updates while the program scans. Click a tag to see where the program uses it.

Timers and counters

TON, TOF, RTO, CTU and CTD with named parameters and T# durations.

Ladder and ST, one program

Imported ladder reads back as generated Structured Text, and ST is drawn as ladder where it can be.

No VAR blocks

Tags live in the tag database and are created from how the code uses them, so a short routine is a short file.

With and without a simulator

Without a simulator

  1. Install a full IDE and a soft PLC to try ten lines
  2. A licence, a VM and a project to set up

With PLCflow Sim

  1. Open a tab
  2. Type
  3. Run

Who uses it this way

Engineer moving from ladder to ST

Tries the idioms and watches the tags respond.

Student on an ST course

Runs the exercises instead of only checking their syntax.

Integrator

Prototypes a sequence before choosing a platform for it.

PLC training simulator

Try it on an example

Tank level alarms

Structured Text

Level alarms with hysteresis, in Structured Text. Each alarm sets at one level and clears at another.

LevelHighAlarmFillValve

Traffic light sequencer

Structured Text

Three chained timers cycle forever with no input. Press Run and watch it go.

GreenAmberRed

Structured Text questions

Which Structured Text is supported?

Assignments, full expressions, IF/ELSIF/ELSE, the TON, TOF, RTO, CTU and CTD blocks, RESET and RETURN. Loops (FOR, WHILE, REPEAT), CASE, and the TP, CTUD, R_TRIG and F_TRIG blocks are not supported yet.

Do I need VAR blocks?

No. Tags live in the tag database and are created from how the code uses them.

Can I export my Structured Text?

Yes, as a .st file, with a free account.

See it run

Open an example and press Run. It needs no install and no account.

Run an example