Effects On Index Register S:24; Bit Shift Left (Bsl) - Allen-Bradley SLC 500 Series Reference Manual

Hide thumbs Also See for SLC 500 Series:
Table of Contents
7-4
Application Specific Instructions

Bit Shift Left (BSL)

Bit Shift Right (BSR)
BSL
BSL
Bit Shift Left
File
#B3:1
Control
R6:14
Bit Address
I:1/4
Length
58<
BSR
BSR
Bit Shift Right
File
#B3:2
Control
R6:15
Bit Address
I:1/6
Length
28<
Fixed SLC
SLC
SLC
5/01
5/02
5/03
Output Instructions
Publication 1747-RM001G-EN-P - November 2008

Effects on Index Register S:24

The shift operation clears the index register S:24 to zero.
BSL and BSR are output instructions that load data into a bit array one bit at a
time. The data is shifted through the array, then unloaded one bit at a time.
Use BSL
EN
When the rung goes from false-to-true, the processor sets the enable bit (EN
DN
bit 15) and the data block is shifted to the left (to a higher bit number) one bit
position. The specified bit at the bit address is shifted into the first bit position.
The last bit is shifted out of the array and stored in the unload bit (UL bit 10).
EN
The shift is completed immediately.
DN
For wraparound operation, set the position of the bit address to the last bit of
the array or to the UL bit, whichever applies.
SLC
SLC
5/04
5/05
The figure below illustrates how the Bit Shift Left instruction works.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32
63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48
INVALID
If you wish to shift more than one bit per scan, you must create a loop in your
application using the JMP, LBL, and CTU instructions.
BSL
BIT
SHIFT
LEFT
File
#B3:1
Control
R6:14
Bit
Address
I:22/12
Length
58
Data block is shifted one bit at a time
from bit 16 to bit 73.
73 72 71 70 69 68 67 66 65 64
Unload Bit
(R6:14/10)
(EN)
(DN)
Source Bit
I:22/12
58 Bit Array #B3:1
Table of Contents
loading

Table of Contents