19
1-2-4
Structured Text Language for Easy Mathematical Processing
Structured Text Language
The structured text (ST) language is a high-level structured language, similar to Pascal. It is
ideal for mathematical processing and nested conditional branching that are difficult to write
in ladder diagrams.
Features of ST Language
You can create easy to read programs by using two different programming languages,
ladder diagram language for sequence control and ST language for mathematical
processing.
Example: Calculating the area of a trapezoid
(Top bottom length) * height / 2
The ST language simplifies this code.
You can use ST as an element in a ladder diagram or create a program in ST only.
ST is ideal for:
1. Arithmetic operations and function calculation
+, -, *, /, SIN, COS, TAN, etc.
2. Loop and condition constructs
IF THEN, FOR NEXT, etc.
3. Text string processing
Joining, extracting, searching, and replacing text strings
The next section gives more detailed explanation about programming with variables.
Summary of Contents for NX1P
Page 106: ...2017 0917 0917 P122 E1 01...