Data Types¶
When programming in CODESYS, you can use different data types or instances of function blocks. Moreover, you assign a data type to every identifier. The data type defines how much memory CODESYS reserves and how these values are interpreted.
The following group of data types are provided:
Standard data types
CODESYS supports all IEC 61131-3 data types.
Extensions to the IEC 61131-3 standard
Special Data Types ‘__UXINT’ and ‘__XWORD’
User-defined data types
You can create user-defined data types in two ways:
- DUT object in the POU window
- data type in a block in the declaration
Attention
Please note the recommendations for naming and object.
- Data Type ‘BOOL’
- Integer Data Types
- REAL / LREAL
- Data Type ‘STRING’
- Time Data Types
- Data Type ‘UNION’
- Data Type ‘ANY’ and ‘ANY_<type>’
- Data Type ‘LTIME’
- Data Type ‘WSTRING’
- Data Type ‘BIT’
- Special Data Types ‘__UXINT’ and ‘__XWORD’
- Pointer
- Reference
- Data Type ‘ARRAY’
- Structure
- Enumerations
- Subrange Types