NumericBitAnd performs a logical AND on the bit equivalent of the StatusNumeric “In” value against the bit equivalent of
its StatusNumeric “Mask” slot value. It may be useful in cases where boolean information is mapped into integer values. It
is available in the Util folder of the kitControl palette, along with the closely-related NumericBitOr and NumericBitXor
As an example, some manufacturers multiplex binary data into a single numerical point by converting the bits from hexadecimal to decimal format. To obtain the status of the individual binary data, the number must be converted back from decimal to hex format. Each digit of the hex number represents a particular binary parameters state (0 = false, 1 = true). The NumericBitAnd object converts a StatusNumeric input to hex value and compares it against the mask value. Any digits with a value of 1 in the mask and the input will result in a corresponding value of 1 in the same digit of the output.
In the example shown in Figure 32:
Input decimal 65553 converts to a hex value of 10011
Mask decimal 65536 converts to a hex value of 10000
The resulting hex value is 10000
Copyright © 2000-2014 Tridium Inc. All rights reserved.