Installation manual

Publication 1747-RM001G-EN-P - November 2008
7-4 Application Specific Instructions
Effects on Index Register S:24
The shift operation clears the index register S:24 to zero.
Bit Shift Left (BSL)
Bit Shift Right (BSR)
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
When the rung goes from false-to-true, the processor sets the enable bit (EN
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).
The shift is completed immediately.
For wraparound operation, set the position of the bit address to the last bit of
the array or to the UL bit, whichever applies.
The figure below illustrates how the Bit Shift Left instruction works.
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.
EN
DN
BSL
Bit Shift Left
File #B3:1
Control R6:14
Bit Address I:1/4
Length 58<
BSL
EN
DN
BSR
Bit Shift Right
File #B3:2
Control R6:15
Bit Address I:1/6
Length 28<
BSR
Output Instructions
Fixed SLC
5/01
SLC
5/02
SLC
5/03
SLC
5/04
SLC
5/05
•••••
(EN)
(DN)
BSL
BIT SHIFT LEFT
File #B3:1
Control R6:14
Bit Address I:22/12
Length 58
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 73727170696867666564
Data block is shifted one bit at a time
from bit 16 to bit 73.
Source Bit
I:22/12
58 Bit Array #B3:1
Unload Bit
(R6:14/10)