6F3B0253
170 T1-16S User’s Manual
7. Instructions

FUN 075 DSR Bi-directional shift register

Expression
Data input D DSR Q Output
Shift input S (n)
Enable input E
Direction input L A
Function
While the enable input (E) is ON, this instruction shifts the data of the bit table, size n starting with
A, 1 bit when the shift input (S) is ON. The shift direction is determined by the state of the direction
input (L).
When L is OFF, the direction is right (lower address direction).
When L is ON, the direction is left (upper address direction).
The state of the data input (D) is stored in the highest bit if right shift, and stored in the lowest bit A
if left shift. The pushed out bit state is stored in the carry flag (CF = S050).
When the enable input (E) is OFF, all bits in the table and the carry flag are reset to OFF.
Execution condition
Enable
input Operation Output CF
OFF Resets all bits in the bit table O FF Reset
ON S = O N L = ON Shift lef t execution Highest bit state Set or reset
L = OFF Shift right execution Lowest bit stat e Set or reset
S = OFF No execution Highest bit state
Operand
Name Device Register Constant Index
X Y R S T. C. XWYWRWSW T C D I J K
ALeading device √√√
nDevice size 1 - 64
Example