![Omron CX-PROGRAMMER V8.1 Скачать руководство пользователя страница 164](http://html1.mh-extra.com/html/omron/cx-programmer-v8-1/cx-programmer-v8-1_operation-manual_744203164.webp)
139
Inputting ST Programs
Section 5-3
• Always use a space, carriage return, tab, or other token separator
between reserved words and variable names. Using token separators
between other token combinations is optional.
In the following example, the box (
@
) indicates where a space, carriage
return, tab, or other token separator is required.
Upper and Lower Case
• Reserved words and variable names do not distinguish between upper
and lower case (either can be used).
Prohibited Characters for
Variable Names
• The following characters enclosed in square brackets cannot be used in
variable names.
• [!], ["], [#], [$], [%], [&], [`], [(],, [)], [-], [=], [^], [~], [\], [|], [@], [`], [[], [{], [;],
[+], [:], [*], []], [}], [,], [<], [.], [>], [/], [?]
• The numbers 0 to 9 cannot be used as the first character of variable
names.
• An underscore cannot be followed immediately by another underscore in
variable names.
• Spaces cannot be used in variable names.
An error message will occur if any of these characters are used in this way.
Operator Priority
• Consider the operator priority in the structured text syntax, or enclose
operations requiring priority in parentheses.
Example: AND takes priority over OR. Therefore, in the example X OR Y
AND Z, priority will be given to Y AND Z.
STRING Data Type
• The following text strings are supported:
Strings with up to 255 alphanumeric characters
The text strings are not case sensitive.
• Text strings defined in the ST language are stored in PLC memory as fol-
lows:
• Place text strings inside signal quotation marks.
• Two hexadecimal digits following a dollar sign ($) are interpreted as hexa-
decimal values.
IF
@
A>0THEN
@
X=10;
ELSE
@
X:=0;
END_IF;
Notation
Description
‘A’
Indicates the text string “A” (ASCII 41).
‘ ’
Indicates a text string containing a single space (ASCII 20).
‘’
Indicates an empty text string.
Notation
Description
$02
The hexadecimal number 02 (start code)
$03
The hexadecimal number 03 (end code)
n
n+1
31 32
33 34
35 36
00 00
n+2
n+3
Data for the Text String "123456"
The null code (00) is stored
at the end of the text string.
Содержание CX-PROGRAMMER V8.1
Страница 3: ...iv...
Страница 5: ...vi...
Страница 7: ......
Страница 15: ...xvi...
Страница 19: ...xx...
Страница 25: ...xxvi Application Precautions 4...
Страница 26: ...Part 1 Function Blocks...
Страница 27: ......
Страница 153: ...128 Procedures Section 3 2...
Страница 154: ...Part 2 Structured Text ST...
Страница 155: ......
Страница 159: ...134 CX Programmer Specifications Section 4 2...
Страница 205: ...180 Procedures Section 6 1...
Страница 207: ...182 System defined external variables supported in function blocks Appendix A...
Страница 229: ...204 Revision History...
Страница 230: ......