Get Bit
The Get Bit action copies the value of
a bit from a source variable.
Input tab
Parameter | Description |
---|---|
Input Value | The variable from which to get a bit value. The input variable can be of any data type. However, a STRING variable should not be used as the length of the string is embedded in the first 4 bytes. |
Bit Number | The position of the bit in the input
variable, where 0 is the low-order bit
position. |
Output tab
Parameter | Description |
---|---|
Bit Value | Specifies the destination variable for the Bit Get action. The destination variable can be any type, but the value returned by the Get Bit action will always be a 0 or a 1. |
Routing tab
The Routing tab has On Result options
different from the standard Success and Failure
routes:
Parameter | Description |
---|---|
True | The route to take when the returned bit value is 1. |
False | The route to take when the returned bit value is 0. |
Failure | The route to take if the action fails. |
Example Get Bit
You can use the Get Bit action to retrieve the value of a bit in an integer variable (such as an INT2). Bit 0 always represents the least significant bit, and bit 15 represents the most significant bit.
The example Input tab shows how to get
the value of bit 15 from D[10].
The Output tab is used to store the result
in D[16]