4-80 Series 90-30/20/Micro Programmable Controllers Reference Manual September 1998 GFK-0467K
4
BITSEQ (BIT)
The Bit Sequencer (BITSEQ) function performs a bit sequence shift through an array of bits. The
BITSEQ function has five input parameters and one output parameter. The operation of the
function depends on the previous value of the parameter EN, as shown in the following table.
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.
The reset input (R) overrides the enable (EN) and always resets the sequencer. When R is active,
the current step number is set to the value passed in via the step number parameter. If no step
number is passed in, step is set to 1. All of the bits in the sequencer are set to 0, except for the bit
pointed to by the current step, which is set to 1.
When EN is active and R is not active, the bit pointed to by the current step number is cleared. The
current step number is either incremented or decremented, based on the direction parameter. Then,
the bit pointed to by the new step number is set to 1.
When the step number is being incremented and it goes outside the range of (1 step number
LEN), it is set back to 1.
When the step number is being decremented and it goes outside the range of (1 step number
LEN), it is set to LEN.
The parameter ST is optional. If it is not used, the BITSEQ operates as described above, except
that no bits are set or cleared. Basically, the BITSEQ then just cycles the current step number
through its legal range.

Memory Required for a Bit Sequencer

Each bit sequencer uses three words (registers) of %R memory to store the following information:
current step number word 1
length of sequence (in bits) word 2
control word word 3
When you enter a bit sequencer, you must enter a beginning address for these three words
(registers) directly below the graphic representing the function (see example on next page).