Bit shift (sl), Inputs, Figure 10.20—bit shift function block – Watlow LogicPro User Manual
Page 156

Chapter 10: Function Blocks
LogicPro User’s Guide
140
Watlow Anafaze
Doc.# 28002-00 Rev 3.00
CNT is the LIFO count Variable. The value of this Variable
indicates the number of integers in the stack.
OUTP is the LIFO output Variable. This Variable holds the
value unloaded from the stack. The range of values this
Variable can assume is from -32,768 to 32,767, including 0
for INT type Variables and -2,147,483,648 to 2,147,483,647,
including 0 for LONG type Variables. If this Variable is
exceeds these ranges, unpredictable results will occur.
Bit Shift (SL)
The Bit Shift (SL) function block, shown in Figure 10.20,
creates and manipulates a synchronous bit shift register.
SL moves the contents of the shift register one bit to the left
upon a False to True transition of the shift bit (SHFT). The
value of the input bit (BIT) then is the first bit in the shift
register. The size of the shift register is determined by the
integer value of SIZE. Once the register is filled by shifting in
the number of bits equal to the size of the register, the next
False to True transition of the shift bit causes the last bit of the
register to shift into the output bit (Q). A True condition of the
clear bit (CLR) clears the shift register.
Figure 10.20 Bit Shift Function Block
Inputs
SHFT is the SL shift bit. As long as the clear bit is False, each
False to True transition of this bit shifts the contents of the
register one position to the left in the register. The value of the
input bit fills in the first position of the register and the last
value in the register is placed in the output bit. In a program
using Ladder logic, the value of SHFT is determined by the
Boolean evaluation of elements placed between the left power
rail and SHFT in the function block. In FBD programs, the
value of SHFT is determined by the Variable connected to
SHFT. If no contacts are placed on the rung before SHFT, the
default value of SHFT is True; however nothing can ever be
shifted since there is never a transition. The SHFT bit has the