Advanced Function Instruction
7-84
FUN100 D P
R→T
REGISTER TO TABLE MOVE
FUN100 D P
R→T
Rs :
L :
EN
Move control
Ladder symbol
100DP.R T
Td :
END Move to end
ERR Pointer errorPointer increment PAU
Pointer clear
CLR
Pr :
Rs : Source data , can be constant or register
Td : Source register for destination table
L : Length of destination table
Pr : Pointer register
Rs, Td can associate with V, Z, P0~P9 index
register as indirect addressing
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
Rs ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○
Td ○ ○ ○ ○ ○ ○ ○ ○* ○* ○ ○
L ○ ○* ○ 2~2048
Pr ○ ○ ○ ○ ○ ○ ○ ○* ○* ○
● When move control "EN" = 1 or "EN↑" ( P instruction) transition from 0 to 1, the contents of the source
register Rs will be written onto the register Tdpr indicated by the pointer Pr within the destination table Td
(length is L). Before executing, this instruction will first check the pointer clear "CLR" input signal. If "CLR" is
1, it will first clear the pointer Pr, and then carry out the move operation. After the move has been completed,
it will then check the Pr value. If the Pr value has already reached L-1 (point to the last register in the table)
then it will only set the move-to-end flag "END" to 1, and finish execution of this instruction. If the Pr value is
less than L-1, then it must again check the pointer increment "INC" input signal. If "INC" is 1, then Pr value
will be also increased. Besides, pointer clear "CLR" is able to operate independently, without being
influenced by other input.
● 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 performed.
X1
EN
INC
CLR
END
ERR
100P.R T
R
S :
Td :
Pr :
L :
R 10
R 0
8
R 50
z The example at left at the very beginning pointer Pr = 4,
the entire content of table Td is 0, and the Rs value is
8888. The diagram below shows the operation results
when X1 have the transition of 0→1 twice.
z Because INC is 1, Pr will increase by 1 each time the
instruction is executed.
Pr Pr Pr
4 R50 5 R50 6 R50
Td Td Td
0000 R10(T0) 0000 R10 0000 R10
0000 R11(T1) 0000 R11 0000 R11
Rs 0000 R12(T2) 0000 R12 0000 R12
R0 8888 0000 R13(T3) 0000 R13 0000 R13
0000 R14(T4) 8888 R14 8888 R14
0000 R15(T5) 0000 R15 8888 R15
0000 R16(T6) 0000 R16 0000 R16
0000 R17(T7)
X0=
(First)
Ö
0000 R17
X0=
(Second)
Ö
0000 R17
Before First time result Second time result