Flowchart to ST v1.2
Draw a structured flowchart, get IEC 61131-3 Structured Text, and run it like a PLC.
- Build
- Click a point ○ on a line to insert a block: Process, FB call, IF / ELSE, CASE, WHILE DO, REPEAT UNTIL, FOR, Comment. Click a block to edit it.
- Read
- The ST is written live on the right: Head (declarations) and Body (code), each with its Copy button, ready to paste into your PLC software. Variables are declared automatically; click one in the Head to set its type, class or initial value. Tick ELSIF to write ELSE + IF as ELSIF (one END_IF).
- Simulate
- RUN / STOP, Step (next block), Cycle (one full scan), Reset. The speed slider goes from slow motion to real time.
- Task
- Cyclic or periodic, with a watchdog (time and sensitivity).
- Watch
- Follow the values live; click a value to write it once (the program may overwrite it at the next scan). Hover a number to see it in base 16 and base 2 (REAL / LREAL: IEEE 754 sign, exponent and mantissa). An orange OVF tag means the value went out of its type range and wrapped around, as on a real PLC; Reset clears it.
- Trace
- In the Watch, open Trace, tick up to 8 variables and press Rec: one point per scan over a set duration (5 s by default), optionally started by a trigger. View draws the timing diagram; export it as PDF, image or CSV.
- Files
- Save and load your project, export a PDF, copy the flowchart as an image.
Supports standard IEC types and ARRAY, operators and functions, and the TON, TOF, TP, CTU, CTD, CTUD, R_TRIG, F_TRIG, SR and RS blocks. Flowchart style inspired by SFC Editor (Dr. Tia Watts, Sonoma State University).
Cycle time is a teaching model (0.5 ms I/O + 0.05 ms per block), not a measurement of a real PLC. 64-bit integers (LINT, ULINT, LWORD) are exact up to ±9·1015.
Use it to learn and prepare; always validate your program in your PLC software (CODESYS…).
© 2026 Philippe RAYMOND · Licence CC BY-NC-ND 4.0
Free to use and share with credit to the author · no commercial use · no modified versions.
Official version: phil-legacy.github.io/toolbox