Appendix Requirements 10.4.1 Standard Data Types 10.4.1.1 BOOL BOOL type variables may be given the values TRUE and FALSE. A BOOL type variable is true, if the least significant bit in the memory is set (e.g. 2#00000001 ). If no bit is set in the memory, the variable is FALSE (2#00000000). All other values canґt be inter- peted accurately and be displayed (***INVALID: 16#xy *** in the Online View). Such problems may appear, if for example overlapped memory ranges are used in the PLC program. Example: The boolean variable is in the same memory range as the byte variable. PROGRAM MAIN VAR bBool AT%MB0 : BOOL; nByte AT%MB0 : BYTE := 3; bIsTRUE : BOOL; END_VAR TwinCAT 2 PLC Control 296 Version:
1.0 Standard Data Types User-defined Data Types BOOL [} 296] ARRAY [} 300] BYTE [} 297] POINTER [} 301] WORD [} 297] ENUM [} 301] (enumerated data types) DWORD [} 297] STRUCT [} 302] (structures) SINT [} 297] ALIAS [} 304] (derived dayta types) USINT [} 298] Sub-range data types [} 304] INT [} 298] UINT [} 298] DINT [} 298] UDINT [} 298] LINT (64 bit integer, currently not supported by TwinCAT) ULINT (Unsigned 64 bit integer, currently not supported by TwinCAT) REAL [} 298] LREAL [} 299] STRING [} 299] TIME [} 299] TIME OF DAY [} 299] (TOD) _ _ DATE [} 299] DATE AND TIME [} 300] (DT) Type Memory use BOOL 8 Bit