Basics
40
1.4 Data types
In Control FPWIN Pro, variable declarations require a data type. All data types conform to IEC61131-3.
For details, please refer to the Programming Manual or to the online help of Control FPWIN Pro.
1.4.1 Elementary data types
Keyword Data type Range Reserved
memory
Initial value
BOOL Boolean 0 (FALSE)
1 (TRUE)
1 bit 0
WORD Bit string of length 16 0–65535 16 bits 0
DWORD Bit string of length 32 0–4294967295 32 bits 0
INT Integer -32768–32,767 16 bits 0
DINT Double integer -2147483648– 2147483647 32 bits 0
UINT Unsigned integer 0–65,535 16 bits 0
UDINT Unsigned double
integer
0–4294967295 32 bits 0
REAL Real number -3.402823466*E38–
-1.175494351*E-38
0.0
+1.175494351*E-38–
+3.402823466*E38
32 bits 0.0
T#0s–T#327.67s 16 bits
1)
TIME Duration
T#0s–T#21474836.47s 32 bits
1)
T#0s
DATE_AND_TIME Date and time DT#2001-01-01-00:00:00–
DT#2099-12-31-23:59:59
32 bits DT#2001-01-01-00
:00:00
DATE Date D#2001-01-01–D#2099-12-31 32 bits D#2001-01-01
TIME_OF_DAY Time of day TOD#00:00:00–TOD#23:59:59 32 bits TOD#00:00:00
STRING Variable-length
character string
1–32767 bytes (ASCII) depending
on PLC memory size
2 words for the
head + (n+1)/2
words for the
characters
''
1)
Depending on PLC type
1.4.1.1 BOOL
Variables of the data type BOOL are binary variables. They can only have the value 0 or 1, and always have a
width of 1 bit.
The condition 0 corresponds to FALSE (e.g. initial value in the POU header) and means that the variable is
switched off. In this case we also speak of the variable not being set.
The condition 1 corresponds to TRUE (e.g. initial value in the POU header) and means that the variable is
switched on. In this case we also speak of the variable being set.
The default initial value, e.g. for the variable declaration in the POU header or in the global variable list = 0
(FALSE). In this case the variable is not set during the PLC program start. If this is not the case, the initial value
may also be set to TRUE.