Chapter 4. Ladder Diagram (LD) Programming70 PACSystems* RX7i, RX3i and RSTi-EP CPU Programmer's Reference Manual GFK-2950C4.2.3 Bit SequencerThe Bit Sequencer (BIT_SEQ) function performs a bit sequence shift through a series of contiguousbits.The operation of BIT_SEQ depends on the value of the reset input (R), and both thecurrent value and previous value of the enabling power flow input (EN):R CurrentExecutionEN PreviousExecutionEN CurrentExecutionBit Sequencer ExecutionON ON/OFF ON/OFF Bit sequencer resetsOFF OFF ON Bit sequencer increments/decrements by1OFF Bit sequencer does not executeON ON/OFF Bit sequencer does not executeThe reset input (R) overrides the enabling power flow (EN) and always resets the sequencer. When Ris active, the current step number is set to the value of the optional N operand. If you did not specifyN, the step number is set to 1. All bits in the bit sequencer, ST, are set to 0, except for the bit pointedto by the current step, which is set to 1.When EN is active and R is not active, and the previous EN was OFF, the bit pointed to by the currentstep number is cleared. The current step number is incremented or decremented, based on thedirection (DIR) operand. 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 Length), it is set back to 1.■ When the step number is being decremented and it goes outside the range of(1 step number Length), it is set to Length.The parameter ST is optional. If it is not used, BIT_SEQ operates as described above, except that nobits are set or cleared. The function just cycles the current step number through its allowed range.BIT_SEQ passes power to the right whenever it receives power.Note: Before using the BIT_SEQUENCER function block, the current step number (Word 1 in thecontrol block) must be set to an integer value between 1 and the length, as defined in thefunction block properties. Failure to properly initialize the step number in theBIT_SEQUENCER function block may result in the CPU going to STOP-HALT mode.Asserting the Reset parameter (R), before using the BIT SEQUENCER function block assuresthat the current step number is set to a valid value.