EasyManua.ls Logo

FATEK FBs-CB2 - Page 187

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-23
FUN 48 P
DIST
NIBBLE DISTRIBUTE
FUN 48 P
DIST
S : Source data to be distributed
N : Number of nibbles to be distributed
D : Starting register storing distribution data
S, N, D 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
16-bit
+/-
number
VZ
P0~P9
S
N 1~4
D * *
z When distribution control "EN" = 1 or "EN" ( P instruction) has a transition from 0 to 1, will take N
successive nibbles starting from the lowest nibble NB0 within S, and distribute them in ascending order into
the 0 nibbles of N registers starting from D. The nibbles other than NB0 in each of the registers within D are
all set to zero. (A nibble is comprised by 4 bits. Starting from the lowest bit in a register, B0, each successive
4 bits form a nibble, so B0~B3 form nibble 0, B4~B7 form nibble 1, etc...)
z This instruction only provides WORD (16 bit) operand. Therefore there are usually only 4 nibbles can be
involved, so the effective value of N is 1~4. Beyond this range, will set the N value error flag "ERR" to 1, and
do not carry out this instruction.
X0
EN
S :
N :
3
ERR
D :
48P.DIST
WY 0
R 0
z The instruction at left writes NB0~NB2 from the WX0
register into the NB0 of the 3 consecutive registers
R0~R2.
N=3 NB3 NB2 NB1 NB0
X15 X11 X0 B15 B0
S WX0 0000 0100 0010 0001 D R0 0000 0000 0000 0001
NB3 NB2 NB1 NB0
D+1 R1 0 0 0 0 0000 0000 0010
D+2 R2 0 0 0 0 0000 0000 0100
Ö
X0
NB1NB3 are all set a "0 "

Other manuals for FATEK FBs-CB2

Related product manuals