User manual
Publication LOGIX-AP010B-EN-P - May 2010 89
Software Conversions Instructions Chapter 3
Shift Operations
S5 has the following instructions that will shift the contents of the accumulator
to the left/right by the number of bits specified by the parameter.
This functionality can be achieved in RSLogix 5000 Ladder by using the Bit
Field Distribute (BFD) function. In this function the following parameters are
specified.
The BFD function provides greater flexibility than the S5 shift instructions
because with the S5 shift instructions it is only possible to shift the entire
contents of a register while with the RSLogix 5000 BFD function it is possible
to shift any specified subset of bits.
Instruction Description
SLW Shifts the contents of the accumulator ACCU1-L (word) to the
left by the number of bits specified in the parameter.
SLD Shifts the contents of the accumulator ACCU1 (double word) to
the left by the number of bits specified in the parameter.
SRW Shifts the contents of the accumulator ACCU1-L (word) to the
right by the number of bits specified in the parameter.
SRD Shifts the contents of the accumulator ACCU1 (double word) to
the right by the number of bits specified in the parameter.
Parameter Description
Source the register that contains the bit to be shifted
Source bit the number of the lowest bit to be moved
Destination the register that contains the bits after the shift is performed
Length number of bits to be shifted