![background image](http://html1.mh-extra.com/html/omron/cs1-h-series/cs1-h-series_operation-manual_742526172.webp)
157
Structured Text (ST Language) Specifications
Appendix B
Structured Text Errors
Error Messages
Error Message
Cause of error
Example
%s' Input variables cannot be
assigned a value
A value was substituted for an
input variable.
%s' operator not supported by
%s data type
A numerical value or variable
for a data type that is not sup-
ported by the operator was
used.
A:=B+1; (*A and B are WORD type variables*))
%s' variable had a read only
memory AT Address and can-
not be assigned a value
A value was substituted for a
variable allocated to a read-
only memory address (read-
only Auxiliary Area address or
Condition Flag).
Array index out of range
An array index larger than the
array size was specified.
Array[100]:=10; (*
Array
is an array variable with an array
size of 100*)
Conversion cannot convert
from %s to %s
A numeric equation in which
the data type of the operation
result does not match the vari-
able at the substitution desti-
nation and a variable that is
different from the data type
was substituted.
Y:=ABS(X); (*X is an INT type variable, Y is a UINT type
variable*)
Division by Zero
The numeric expression con-
tains division by 0.
End of comment not found
The comment does not have a
closing parenthesis and aster-
isk “*)” corresponding to the
opening parenthesis and
asterisk “(*” of the comment.
(*
comment
Invalid Literal Format '%s'
The numeric format is illegal.
X:=123_; (*There is no numeral after underscore*)
X:=1__23; (*The underscore is followed immediately by
another underscore*)
X:=2#301; Y:=8#90; (*A numeral that cannot be used with
binary or octal values has been used*)
Note
The underscore can be inserted between numerals
to make them easier to read. Placing 2#, 8#, and
16# at the beginning of the numeral expresses the
numerals as binary, octal, and hexadecimal values,
respectively.
Invalid Literal Value
The numeric value is illegal.
X:=1e2; (*an index was used for a numeric value that was
not a REAL data type*)
Note
“e” indicates an exponent of 10.
Invalid array index
A numeric equation with a
non-integer type operation
result or a non-integer vari-
able has been specified in the
array index.
Array[Index]:=10; (*
Index
is a WORD type variable*)
Invalid constant
A numeric equation with a
non-integer type operation
result, or a non-integer vari-
able or numeric value has
been specified in the integer
equation of a CASE state-
ment.
CASE A OF (*A is a REAL type variable*)
1: X:=1;
2: X:=2;
END_CASE;
Содержание CS1-H Series
Страница 3: ...iv...
Страница 5: ...vi...
Страница 7: ...viii TABLE OF CONTENTS...
Страница 15: ...xvi Application Precautions 4...
Страница 151: ...136 Procedures Section 3 2...
Страница 153: ...138 Data Types Appendix A...
Страница 177: ...162 External Variables Appendix C...
Страница 181: ...166 Revision History...