EasyManuals Logo
Home>Allen-Bradley>Controller>Logix5000

Allen-Bradley Logix5000 Reference Manual

Allen-Bradley Logix5000
708 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #669 background imageLoading...
Page #669 background image
Rockwell Automation Publication 1756-RM003N-EN-P - October 2011 669
Appendix
C
Structured Text Programming
Introduction
This appendix describes issues that are unique with structured text programming.
Review the information in this appendix to make sure you understand how your
structured text programming executes.
Structured Text Syntax
Structured text is a textual programming language that uses statements to define
what to execute.
• Structured text is not case sensitive.
• Use tabs and carriage returns (separate lines) to make your structured text
easier to read. They have no effect on the execution of the structured text.
Structured text is not case sensitive. Structured text can contain these
components.
Topic Page
Structured Text Syntax 669
Assignments 670
Expressions 673
Instructions 679
Constructs 680
Comments 696
Term Definition Examples
Assignment
(see page 670
)
Use an assignment statement to assign values to tags.
The := operator is the assignment operator.
Terminate the assignment with a semi colon ‘;.’
tag := expression;
Expression
(see page 673
)
An expression is part of a complete assignment or construct statement. An
expression evaluates to a number (numerical expression) or to a true or false
state (BOOL expression).
An expression contains:
Tags A named area of the memory where data is stored (BOOL,
SINT,INT,DINT, REAL, string).
value1
Immediate A constant value. 4
Operators A symbol or mnemonic that specifies an operation within
an expression.
tag1 + tag2
tag1 >= value1
Functions When executed, a function yields one value. Use
parentheses to contain the operand of a function.
Even though their syntax is similar, functions differ from
instructions in that functions can be used only in
expressions. Instructions cannot be used in expressions.
function(tag1)

Table of Contents

Other manuals for Allen-Bradley Logix5000

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Allen-Bradley Logix5000 and is the answer not in the manual?

Allen-Bradley Logix5000 Specifications

General IconGeneral
BrandAllen-Bradley
ModelLogix5000
CategoryController
LanguageEnglish

Related product manuals