In addition to basic data types and derivative data types, there are also POU instance data
types. A POU instance data type is the data type of a function block instance. To create a func-
tion block instance, the instance name is registered as a variable and the function block definition
name is registered as a data type in the local variable table.
A list of the data types that you cannot use in different POUs is given below.
This section describes the data formats for bit string data, real number data, and text string data.
Bit String Data Format
Bit 0 is the least significant bit of a bit string variable. Bit values are represented by values of either 1
or 0. However, you can also represent the value of a single bit as a BOOL variable where 1 equals
TRUE and 0 equals FALSE.
Real Numbers (REAL and LREAL Data)
REAL and LREAL data have a real number data format. This section describes how to express real
numbers and how to perform data processing with real number data types.
Data Size
REAL data is 32 bits, while LREAL data is 64 bits.
Data Formats
The floating-point format is a way to express a real number as a combination of a sign, an exponent,
and a mantissa. To express a real number as shown below, the value of s is the sign, the value of e
is the exponent, and the value of f is the mantissa.
• REAL Data
Number = (1)
s
2
e127
(1+f 2
23
)
• LREAL Data
Number = (1)
s
2
e1023
(1+f 2
52
)
Restrictions on Using Data Types
POU type Type of variable
Unusable data types
Basic data types Derivative data types
Programs Internal variables None
Global variables None
FUN Input variables, output variables, and in-out
variables
None Unions
Internal variables None
Return values None A structure or union
FB Input variables, output variables, and in-out
variables
None Unions
Internal variables None
Bit String, Real Number, and Text String Data Formats
0
Bit 0Bit 7
One-bit extraction
BYTE#16#3B 0 1 1 1 0 1 1 TRUE