Advanced Function Instruction
7 -8 5
FUN101
D
P
T
→
R
TABLE TO REGISTER MOVE
FUN101
D
P
T
→
R
Ts :
EN
Move control
Ladder symbol
101DP.T R
L :
END
Move to end
ERR
Pointer error
Pointer increment
PAU
Pointer clear
CLR
Pr :
Rd :
Ts : Source table starting register
L : Length of source table
Pr : Pointer register
Rd : Destination register
Ts, Rd 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/32bit
+/-
number
V
、
Z
P0~P9
Ts
○
○
○
○
○
○
○
○
○
○
○
○
○
L
○
○
*
○
○
Pr
○
○
○
○
○
○
○
○
*
○
*
○
2~2048
Rd
○
○
○
○
○
○
○
○
*
○
*
○
z
When move control "EN" = 1 or "EN
↑
" (
P
instruction) transition from 0 to 1, the value of the register Tspr
specified by pointer Pr within source table Ts (length is L) will be written into the destination register Rd. Before
executing, this instruction will first check the input signal of pointer clear "CLR". If "CLR" is 1, it will first clear Pr
and then carry out the move operation. After completing the move operation, it will then check the value of Pr.
If the Pr value has already reached L-1 (point to the last register in the table), then it sets the move-to-end flag
to 1, and finishes executing of this instruction. If Pr is less than L-1, it check the status of "INC". If "INC" is 1,
then it will increase Pr and finish the execution of this instruction. Besides, pointer clear "CLR" can execute
independently and is not influenced by other inputs.
z
The effective range of the pointer is 0 to L-1. Beyond this range the pointer error "ERR" will be set to 1 and this
instruction will not be carried out.
EN
R 0
END
INC
CLR
ERR
X0
101P.T R
T
S
:
L :
Pr :
9
Rd :
R 19
R 20
z
In the example at left, at the very beginning Pr = 7 and Ts
and Rd are as shown at left in the diagram below. When X0
have a transition from 0
→
1 twice, the results are shown at
right in the diagram below.
z
At the second time execution, the pointer has already
reached to the end so there will be no increment.
Ts
Pr
Pr
Pr
R0(T0)
1 1 1 1
7
R19
8
R19
8
R19
R1(T1)
2 2 2 2
R2(T2)
3 3 3 3
R3(T3)
4 4 4 4
Rd Rd Rd
R4(T4)
5 5 5 5
0000
R20
8 8 8 8
R20
9 9 9 9
R20
R5(T5)
6 6 6 6
R6(T6)
7 7 7 7
END END
END
R7(T7)
8 8 8 8
0
X0
=
(first)
Ö
0
X0
=
(second)
Ö
1
R8(T8)
9 9 9 9
Before execution
First time execution
Second time execution
Содержание FBs-CBE
Страница 78: ...MEMO ...
Страница 111: ...4 6 X0 X1 Node A Y0 Y1 Node B differential down Incerse differential up t Scan time Inverse t t ...
Страница 141: ...Basic Function Instruction 6 16 FUN 2 SKP SKIP START FUN 2 SKP Y2 Y1 Y0 T201 10S X0 X1 X2 0 10 0 ...
Страница 305: ...MEMO ...
Страница 348: ...MEMO ...