EasyManuals Logo
Home>Allen-Bradley>Controller>Studio 5000 Logix Emulate

Allen-Bradley Studio 5000 Logix Emulate User Manual

Allen-Bradley Studio 5000 Logix Emulate
676 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 #635 background imageLoading...
Page #635 background image
Rockwell Automation Publication MOTION-RM002H-EN-P-February 2018 635
Chapter 11
Overview of Structured Text Programming
This chapter describes issues that are unique with structured text programming.
Review the information in this chapter to gain a better understanding about how
your structure text programming will execute.
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.
Term Definition Examples
Assignment 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 An expression is part of a complete assignment or construct statement. An expression
evaluates to a number (numerical expression), a String (string expression), or to a true or
false state (BOOL expression)
Tag Expression A named area of the memory where data is stored (BOOL, SINT, INT, DINT, REAL, String). value1
Immediate
Expression
A constant value 4
Operators
Expression
A symbol or mnemonic that specifies an operation within an expression. tag1 + tag2
tag1 >= value1
Function Expression 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)
Instruction An instruction is a standalone statement.
An instruction uses parentheses to contain its operands.
Depending on the instruction, there can be zero, one, or multiple operands.
When executed, an instruction yields one or more values that are part of a data structure.
Terminate the instruction with a semi colon(;).
Even though their syntax is similar, instructions differ from functions in that instructions
cannot be used in expressions. Functions can be used only in expressions.
instruction();
instruction(operand);
instruction(operand1,
operand2,operand3);
Construct A conditional statement used to trigger structured text code (that is, other statements).
Terminate the construct with a semi colon (;).
IF...THEN CASE FOR...DO WHILE...DO
REPEAT...UNTIL
EXIT
Structured Text Syntax

Table of Contents

Other manuals for Allen-Bradley Studio 5000 Logix Emulate

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Allen-Bradley Studio 5000 Logix Emulate and is the answer not in the manual?

Allen-Bradley Studio 5000 Logix Emulate Specifications

General IconGeneral
BrandAllen-Bradley
ModelStudio 5000 Logix Emulate
CategoryController
LanguageEnglish

Related product manuals