The Zone of PLC
Popular Articles
·RSLogix 5000 Introduction to Ba
·RSLogix 5000 Ladder Logic Funct
·Introduction - Structured Text
·Programs and Routines in RSLogi
·An Allen Bradley Retentive On-D
·Instruction of PID for PLC Prop
·Introdution of RSLogix 5000
·introduce of Master Control Rel
·RSLogix 5000 Ladder Logic Trigo
·An Allen-Bradley TON Timer
·Instruction of MSG - MeSsaGe
·Constructs - Structured Text
Related Articles
·A Simple Counter Example
·A Simple Timer Example
·An example using bit memory (ol
·introduce of Master Control Rel
·An Allen Bradley Counter
·A Timer Example for control of
·An Allen Bradley Off-Delay Time
·An Allen Bradley Retentive On-D
·An Allen-Bradley TON Timer
·The Four Basic Timer Types
·Instruction of PID for PLC Prop
·Instruction of MSG - MeSsaGe
  Current Position:Home > A-B PLC > Content
RSLogix 5000 Structured Text (ST)
Source: author  Date: 2011-06-28

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;


[Add to Favorit] [Refer to] [Comment(Item)] [New User Reg] [Back to Top] Print Close this Window  
Copyright © plcer.com Source:Automating Manufacturing Systems