BITS
BITS starting signal number, number of signals = decimal value
Function
Arranges a group of external output signals or internal signals in a binary pattern. The signal
states are set ON/OFF according to the binary equivalent of the decimal value specified
Parameter
Starting signal number
Specifies the first signal to set the signal state
Number of signals
Specifies the number of signals to be set ON/OFF. The maximum number allowed is 16. To
set more than 16 signals, use BITS32 instruction, explained next
Decimal value
Specifies the decimal value used to set the desired ON/OFF signal states. The decimal value is
transformed into binary notation and each bit of the binary value sets the signal state starting from
the least significant bit. If the binary notation of this value has more bits than the number of
signals, only the state of the given number of signals (starting from the specified signal number)
is set and the remaining bits are ignored.
Example
recipe = BITS (i.recipe_select, 2)