![Omron CX-PROGRAMMER V8.1 Operation Manual Download Page 163](http://html1.mh-extra.com/html/omron/cx-programmer-v8-1/cx-programmer-v8-1_operation-manual_744203163.webp)
138
Inputting ST Programs
Section 5-3
5-3
Inputting ST Programs
5-3-1
Syntax Rules
Statement Delimiters
• Statements (assignment and control statements) must always end in a
semicolon (;). The statement cannot be completed by simply using a car-
riage return.
• Do not use a semicolon (;) as a delimiter within a statement such as fol-
lowing reserved words, values, or equations. Inserting a semicolon within
a statement, except at the end of a statement, will result in a syntax error.
Comments
• Comments are enclosed in parentheses and asterisks, i.e., (*
comment*
).
Any characters except parentheses and asterisks can be used within a
comment. Nesting within comments is not supported.
Notation
Example
(*
comment*
)
(*this is the comment*)
Note
Nesting in comments is not possible, i.e.,
(*(*this type of nesting is not supported*)*)
Spaces, Carriage Returns,
Tabs
• Any number of spaces, carriage returns, and tabs, or combinations of
these can be used anywhere within statements. Therefore, use spaces,
carriage returns, and tabs between reserved words and equations to
make them easier to read.
• Spaces, carriage returns, and tabs cannot be used between the following
tokens (the smallest meaningful unit for compiling), in which case they are
referred to as token separators.
Tokens: Reserved words, variable names, special characters, constants
(numerical values)
Reserved words (upper or lower case): AND, CASE, DO, ELSE, FOR,
IT, NOT, OF, OR, REPEAT,
THEN, TO, UNTIL, WHILE,
XOR, TRUE, FALSE, ELSIF,
BY, EXIT, RETURN
Variable names:
Any text that is not a reserved
word will be recognized as a
variable name.
Special characters:
<=, >=, <>, :=, .., &, (*, *)
Constants (numerical values):
• Numerical value only for
decimal numbers
• 16# followed by numerical
value for hexadecimal
numbers
• 2# followed by numerical
value for binary numbers
• 8# followed by numerical
value for octal numbers
If a space, carriage return, or tab is used between any of the above tokens,
the parts of the token on either side will be treated as separate tokens.
Therefore, make sure that spaces, carriage returns, or tabs are not used
within a single token.
Summary of Contents for CX-PROGRAMMER V8.1
Page 3: ...iv...
Page 5: ...vi...
Page 7: ......
Page 15: ...xvi...
Page 19: ...xx...
Page 25: ...xxvi Application Precautions 4...
Page 26: ...Part 1 Function Blocks...
Page 27: ......
Page 153: ...128 Procedures Section 3 2...
Page 154: ...Part 2 Structured Text ST...
Page 155: ......
Page 159: ...134 CX Programmer Specifications Section 4 2...
Page 205: ...180 Procedures Section 6 1...
Page 207: ...182 System defined external variables supported in function blocks Appendix A...
Page 229: ...204 Revision History...
Page 230: ......