Common Structured Text Patterns
A practical lookup for recurring Structured Text patterns, with interactive examples to step through one PLC scan at a time.
Assignment
Copy a value with Output := Input;. The assignment writes whenever the statement executes.
Permissives and inhibits
Combine conditions using AND and NOT to require readiness while preventing a command during a fault.
Priority
IF and ELSIF execute the first true branch, so branch order determines priority. Assign all required outputs in each branch.
Memory
A start and stop pattern can retain a command between scans. Retention through a power cycle depends on the controller and its configuration.
Rising edges
A rising edge occurs when the current signal is true and its previous value was false. Update the stored previous value after the comparison.
Learn about edges and event counting or practice in ST Studio. Enable JavaScript to run the examples on this page.