Structured text
Structured text, abbreviated as ST or STX, is one of the five languages supported by the IEC 61131-3 standard, designed for programmable logic controllers (PLCs). It is a high level language that is block structured and syntactically resembles Pascal, on which it is based. All of the languages share IEC61131 Common Elements. The variables and function calls are defined by the common elements so different languages within the IEC 61131-3 standard can be used in the same program. Complex statements and nested instructions are supported: Sample program. TxtState := STATES[StateMachine]; CASE StateMachine OF ELSE END_CASE; Unlike  in some other programming languages, there is no fallthrough for the CASE statement: the first matching condition is entered, and after running its statements, the CASE block is left without checking other conditions. Additional ST programming examples. // PLC configuration CONFIGURATION DefaultCfg END_CONFIGURATION PROGRAM Monitor_Start_Stop // Actual Program END_PROGRAM Function block example. // Function Block Timed Counter : Incremental count of the timed interval FUNCTION_BLOCK FB_Timed_Counter END_FUNCTION_BLOCK