Bit number (general)

If a bit number must be specified in a parameter, in most cases this is exactly the bit that is meant, e.g. to trigger a function. In some cases, however, this can also mean the first bit of a series. The least significant bit must then always be specified. The subsequent high-order bits are then also evaluated for the series.

Bit counting always starts at 0. If an integer variable is used as the reference, bit 0 is always the least significant bit.

example: If only the least significant bit is set in an integer variable, the decimal value is 1.

Attention: The bit numbering in EASY UI Designer refers to the determination of the least significant bit in a PC processor architecture. The numbering may be reversed on different controllers, in which case bit 0 is the most significant bit.

The value range for the bit number depends on the data type of the reference variable:

Data type

Value range

VT_BOOL, VT_BIT

0

VT_I1, VT_UI1

0..7

VT_I2, VT_UI2

0..15

VT_I4, VT_UI4

0..31

other

For all other data types, bit addressing makes no sense, as the addressed bit does not have a clearly definable state.