EasyManua.ls Logo

FATEK FBs-CB2 - MBSHF MATRIX BIT SHIFT (FUN128 MBSHF)

FATEK FBs-CB2
348 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Advanced Function Instruction
7-111
FUN128 P
MBSHF
MATRIX BIT SHIFT
FUN128 P
MBSHF
Ms :
EN
Shift control
Ladder symbol
128P.MBSHF
OTB Shift out bit
Fill-in bit INC
Left/Right direction
CLR
L :
Md :
Ms : Starting register of source matrix
Md : Starting register of destination
matrix
L : Length of matrix (Ms and Md)
Ms, Md may combine with V, Z, P0~P9
to serve indirect address application
WX WY WM WS TMR CTR HR IR OR SR ROR DR K XR
Range
Ope-
rand
WX0
WX240
WY0
WY240
WM0
WM1896
WS0
WS984
T0
T255
C0
C255
R0
R3839
R3840
R3903
R3904
R3967
R3968
R4167
R5000
R8071
D0
D4095
2
256
VZ
P0~P9
Ms
Md * *
L *
Ms
Shift
left
1 bit
OTB
INB
Md
L
z When shift control "EN" = 1 or "EN" ( P instruction) has a
transition from 0 to 1, source matrix Ms will be retrieved
and completely shifted one position to the left (when L/R =
1) or one position to the right (when L/R = 0). The space
caused by the shift (with a left shift it will be M
0
, and with a
right shift it will be M
16L-1
), is replaced by the status of fill-in
bit "INB". The status of the bits popped out (with a left shift
it will be M
16L-1
, and with a right shift it will be M
0
) will
appear at the output bit "OTB". Then the results of this
shifted matrix will be filled into the destination matrix Md.
z The program at left is an example where Ms and Md are
the same matrix. When X0 goes from 01, Ms will be
completely retrieved and moved to the left (because L/R =
1) by 1 bit. It will then be stored back to Md, and the results
are shown at right in the diagram below.
X0
EN
OTBMs :
R 0
128P.MBSHF
L : 5
Md :
R 0
INB
L/R
X0
L
Ms Md
OTB
INB
Shift
right
1 bit
Ms15
Ms
Ms0
Md15
Md
Md0
R0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
R0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
R1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
R1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0
R2
1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0
R2
1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 1
R3
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
R3
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
R4
0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
R4
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0
Ms79
Ms64
X0=
Ö
Md79
Md64
Before execution After execution

Other manuals for FATEK FBs-CB2

Related product manuals