Bit Access

You can directly specify a bit within an integer variable in expressions and diagrams using this notation:

Variable.BitNo

Where:

Variable: is the name of an integer variable.

BitNo: is the number of the bit in the integer.

The variable can have one of these data types:

Bits

Data Type

8-bits from .0 to .7

BYTE, SINT, USINT

16-bits from .0 to .15

INT, UINT, DWORD

32-bits from .0 to 31

DINT, DWORD, UDINT

64-bits from .0 to .63

LINT, LWORD, ULINT

0 (zero) always represents the less significant bit.