Structured Text (ST)

KronoTech

PLC

Ladder Logic

RSLogix 5000

Structured Text

Introduction

Operators

Functions

HMI

Instruments

Structured Text (ST)

Structured Text (ST) is a high level textual language that is a Pascal like language. It is very flexible and intuitive for writing control algorithms.

Structured Text uses operators such as logical branching, multiple branching, and loops. People trained in computer programming languages often find it the easiest language to use for programming control logic. When symbolic addressing is used, ST programs resemble sentences, making it highly intelligible to beginner users as well.

ST is ideal for tasks requiring complex math, algorithms or decision-making. Its concise format allows a large algorithm to be displayed on a single.

Benefits of Structured Text

  • People trained in computer languages can easily program control logic
  • Symbols make the programs easy to understand
  • Programs can be created in any text editor
  • Runs as fast as ladder logic

Code

The following is few example to show some typical Structured Text code:

Example 1

We have a level switch in a tank that indicates that the level of liquid in the tank is extremely high; Hence we want to trigger the siren when this happens.

Siren := NOT Level_Switch ;

Example 2

We have a light that will be turned on by 2 switches. If any of the switches is in ON position then the light will turn ON.

Light := SwitchA OR SwitchB;

Examples 3

We have Motor that will be controlled manually by 2 push buttons (Start Push Button, and Stop Push Button). When the Start Push Button is pushed then the Motor will be turned ON. and when the Stop Push Button is Pushed then we want to stop the Motor. (Security logic has been taken off this logic, for the purpose of domonstration.)

IF StartPb THEN
Motor := 1;
END_IF;

IF StopPb THEN
Motor := 0;
END_IF;

Quick Links

PLC Languages

Ladder Logic
Function Block
Structure Text
SFC
Mnemonic

Ladder Logic

Basic
Counters
Timer
Arithmetic
Comparison
Functions
Trig Functions

Instruments

Switches

HMI

Advantages
Alarms
Trends

Other

Bottle Application