3 - 3 3 - 3
3 HANDLING OF CHARACTERS AND NUMERIC VALUES IN ST PROGRAMS
3.2 Data Handling
In ST programs, the types of used data have been defined.
Sections 3.2 and 3.3 indicate the data types and their representation methods in ST
programs.
3.2.1 Data types
The following data types can be used in ST programs.
Data Type
Definition
Range
Type in Ladder
Type in C
Language
BOOL Boolean
type
TRUE•FALSE,1•0
*1
Bit bool
INT
Integer type
-32768 to 32767
Word
signed short
DINT Double
precision
integer type
-2147483648 to
2147483647
Double word
signed long
REAL
Real number type
-3.402823
+38
to
-1.175495
-38
, 0.0,
+1.175495
-38
to
+3.402823
+38
Real number
float
STRING Character
string
type
Up to 50 characters
can be defined.
Character string char
ARRAY
Array data type
Depends on the data
type of the specified
element.
Array
char[ ], etc.
STRUCT
Structured data type Depends on the data
type of the specified
element.
Structure struct
*1: K0, K1, H0 and H1 for specification of K and H cannot be used as the BOOL type.
Precautions when an operation result exceeds the data type range
When an operation result exceeds the data type range, correct result cannot
be obtained.
Содержание MELSEC L series
Страница 1: ...Programming Manual Structured Text ...
Страница 2: ......
Страница 73: ...4 33 4 33 4 ST PROGRAM EXPRESSIONS MEMO ...
Страница 297: ......