|
Function BIT
With the BIT-function it is possible to get the value of a single bit from a channel value. This is important for some kinds of hardware which supplies the state of digital inputs in a single value, one bit for each input but not in separated channels.
The syntax of the formula is
BIT ( channelnumber , bitnumber )
Parameter 1 (channelnumber) is
K123 Value to be examined is the value of the channel itself H123 Value to be examined is the value of the hardwarechannel
Parameter 2 (bitnumber) is
00 ... 31 Number of bit from 0 to max. 31
The result of the function is 0 or 1 depending on the bit to examined.
Use for :
- Masked reading of a bit in an J.Bus address
- Masked reading of a bit of a CAN-Bus Indientifier.
- Displaying of a digital state of channel which is read as an analog inputs
|