An operand of data type BOOL represents integer value and contains one of the following values:
- 1
- 0
The following table shows the properties of data type BOOL:
Length (bits) | Format | Value range | Examples of value input | |
---|---|---|---|---|
Constants | Absolute and symbolic addresses | |||
8 | Integers1) (decimal system) | Signed integers: -128 to +127 Unsigned integers: 0 to 255 |
15 BYTE#15 BYTE#10#15 B#15 |
IB2 MB10 DB1.DBB4 Tag_Name |
8 | Binary numbers | 2#0 to 2#1111_1111 | 2#0000_1111 BYTE#2#0000_1111 * B#2#0000_1111 |
IB2 MB10 DB1.DBB4 * Tag_Name |
8 | Octal numbers | 8#0 to 8#377 | 8#17 BYTE#8#17 * B#8#17 |
IB2 MB10 DB1.DBB4 * Tag_Name |
8 | Hexadecimal numbers | 16#0 to 16#FF | 16#0F BYTE#16#0F * B#16#0F |
IB2 MB10 DB1.DBB4 * Tag_Name |
1) The value range depends on the relevant interpretation or conversion.
NOTE
The BYTE data type cannot be compared for more than or less than. It can only be supplied with the same decimal data that can be processed by the SINT and USINT data types.