6.5 Variables
V
ariables are declared in the main pane of POU objects for programs.
6.5.1 Standard Data Types
GM Programmer allows the following data types to be used as standard data types.
Type Data type Range Size (in bits)
Truth BOOL TRUE (1) and FALSE (0) 8
Integer BYTE 0 to 255 8
Integer WORD 0 to 65535 16
Integer DWORD 0 to 4,294,967,295 32
Integer LWORD
0 to 2
64
-1
64
Integer SINT -128 to 127 8
Integer USINT 0 to 255 8
Integer INT -32,768 to 32,767 16
Integer UINT 0 to 65535 16
Integer DINT -2,147,483,648 to 2,147,483,647 32
Integer UDINT 0 to 4,294,967,295 32
Integer LINT
-2
63
to 2
63
-1
64
Integer ULINT
0 to 2
64
-1
64
Floating-point
number
REAL -3.402823e+38 to 3.402823e+38 32
Floating-point
number
LREAL
-1.7976931348623158 e +308 to
1.7976931348623158e+308
64
Character
string
STRING
(Number of
characters + 1)
× 8
Character
string
WSTRING
(Number of
characters + 1)
× 16
Time TIME 0 to 4,294,967,295 32
Time LTIME 0 to 213503d23h34m33s709ms551us615ns 64
Time TIME_OF_DAY
0 (00:00:00:000) to
4294967295 (1
1:59:59 PM:999)
32
Date DATE
0 (1970-01-01) to
4294967295 (2106-02-07)
32
Date and time DATE_AND_TIME
0 (1970-01-01,00:00:00) to
4294967295 (2106-02-07,06:28:15)
32
6.5 Variables
6-18 WUME-GM1RTXOP-01