Advanced Function Instruction
7-86
FUN102 D P
T→T
TABLE TO TABLE MOVE
FUN102 D P
T→T
Ts :
EN
Move control
Ladder symbol
102DP.T T
Td :
END Move to end
ERR Pointer errorPointer increment PAU
Pointer clear
CLR
L :
Pr :
Ts : Starting number of source table register
Td : Starting number of destination table
register
L : Table (Ts and Td) length
Pr : Pointer 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
2
∣
2048
V、Z
P0~P9
Ts ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○
Td ○ ○ ○ ○ ○ ○ ○ ○* ○* ○ ○
L ○ ○* ○ ○
Pr ○ ○ ○ ○ ○ ○ ○ ○* ○* ○
z When move control "EN" = 1 or "EN↑" ( P instruction) have a transition from 0 to 1, the register Tspr pointed
by pointer Pr within the source table will be moved to a register Tdpr, which also pointed by the pointer Pr in the
destination table. Before execution, it will first check the input signal of pointer clear "CLR". If "CLR" is 1, it will
first clear Pr to 0 and then do the move (in this case Ts0→Td0). After the move action has been completed it
will then check the value of pointer Pr. If the Pr value has already reached L-1 (point to the last register on the
table), then it will set the move-to-end flag "END" to 1 and finish executing of this instruction. If the Pr value is
less than L-1, it will check the status of "INC". If "INC" is 1, then the Pr value will be increased by 1 before
execution. Besides, pointer clear "CLR" can execute independently, and will not be influenced by other input.
z The effective range of the pointer is 0 to L-1. Beyond this range, the pointer error flag "ERR" will be set to 1,
and this instruction will not be carried out.
EN
R 0 END
Td :
R 10
L :
Pr :
INC
CLR
ERR
X0
102P.T T
T
S :
10
R 20
z The diagram at left below is the status before execution.
When X0 from 0→1, the content of R5 in Ts table will copy to
R15 and pointer R20 will be increased by 1.
Pr Pr
R20 5 R20 6
Ts Td Td
R0 1111
R10
0000
R10
0000
R1 1111
R11
0000
R11
0000
R2 1111
R12
0000
R12
0000
R3 1111
R13
0000
R13
0000
R4 1111
R14
8888
R14
8888
R5 1111
R15
0000
R15
1111
R6 1111
R16
0000
R16
0000
R7 1111
R17
0000
X0=
Ö
R17
0000
R8 1111
R18
0000
R18
0000
R9 1111
R19
0000
R19
0000
Before execution result