10.1.11.1 Parameters for the Bit Position Function
Input/ Output
Choices
Description
enable flow
When the function is enabled, a bit search
operation is performed.
IN
I, Q, M, T, S, G, R, AI, AQ
IN contains the first word of the data to be
operated on.
ok
flow, none
The OK output is energized whenever enable is
energized.
POS
I, Q, M, T, G, R, AI, AQ
The position of the first nonzero bit found, or zero
if a nonzero bit is not found.
10.1.11.2 Example
In the example, if %I0001 is set, the bit string starting at %M0001 is searched until a bit
equal to 1 is found. Coil %Q0001 is turned on. If a bit equal to 1 is found, its location
within the bit string is written to %AQ001. If %I0001 is set, bit %M0001 is 0, and bit %
M0002 is 1, then the value written to %AQ001 is 2.
10.1.12 Bit Operation Functions Bit Sequencer
The Bit Sequencer function performs a bit sequence shift through an array of bits.
Starting Address
Reset
Address
OK Enable
BIT_
SEQ
R
ST
Direction
DIR
Number
STEP
The operation of the function depends on the previous value of the parameter EN:
R Current
Execution
EN Previous
Execution
EN Current
Execution
Bit Sequencer Execution
OFF OFF OFF
Bit sequencer does not execute.
OFF OFF ON
Bit sequencer
increments/decrements by 1.
OFF ON OFF
Bit sequencer does not execute.
OFF ON ON
Bit sequencer does not execute.
ON ON/OFF ON/OFF
Bit sequencer resets.
Instruction Set Reference GFK-1503E User Manual 135
For public disclosure