EasyManuals Logo

Omron CX-PROGRAMMER V8.1 User Manual

Omron CX-PROGRAMMER V8.1
231 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 #161 background imageLoading...
Page #161 background image
136
Structured Text Language Specifications Section 5-1
5-1 Structured Text Language Specifications
5-1-1 Overview of the Structured Text Language
Structured text is a high-level textual language that has selection and iteration
structures, and is similar to PASCAL.
ST Language
Configuration
ST Language Configuration
An ST language program is composed from statements. There are two kinds
of statements: assignment and control.
Assignment statement: This statement uses an equation to store a calcu-
lation result in a variable.
Control statement: Includes statements such as selection statements and
iteration statements.
For details on each kind of statement, refer to 5-4 ST Language Configura-
tion.
Statement Contents
Statements are composed of the following elements.
Variables (Refer to 5-4-2 Variables.)
Constants (Refer to 5-4-3 Inputting Constants.)
Operators (Refer to 5-4-4 Operators.)
Functions (Refer to 5-4-5 Standard Functions and 5-4-6 OMRON Expan-
sion Functions.)
Example of a Control Statement
Note In an ST program, addresses are not input as actual I/O memory addresses.
Variable names are used for all address inputs. The addresses that use vari-
ables are set by the user.
For details on variable specifications and setting methods, refer to the CX-
Programmer Operation Manual (W446).
CASE COLOR OF
1: NofRed := NofRed + 1;
2: NofBlue := NofBlue+1;
ELSE NofOther := NofOther+1;
END CASE;
IF NofRed > 100 OR NofBlue >100 THEN
STOP:=TRUE
END IF;
Statement (e.g., CASE):
Configured using variables,
equations, etc.
Equation: Configured using
operators and operands.
(*Variable COLOR value is...*)
(*1: Increment variable NofRed by 1*)
(*2: Increment variable NofBlue by 1*)
(*Neither 1 or 2: Increment variable NofOther by 1*)
(* When NofRed or NofBlue exceeds 100*)
(*Assign TRUE for variable STOP*)
Statement (e.g., IF):
Configured using variables,
equations, etc.
Comment:
A comment can be attached to a statement.
Configured using (* before the
comment and *) after the comment.
Variable
Constant

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron CX-PROGRAMMER V8.1 and is the answer not in the manual?

Omron CX-PROGRAMMER V8.1 Specifications

General IconGeneral
BrandOmron
ModelCX-PROGRAMMER V8.1
CategorySoftware
LanguageEnglish

Related product manuals