5 -7
As shown in the above diagram, you only need to change the V value to change the operand address. After combining
the index addressing with the FBs-PLC function instructions, a powerful and highly efficient control application can be
achieved by using very simple instructions. Using the program shown in the diagram below as an example, you only need
to use a block move instruction (BT_M) to achieve a dynamic block data display, such as a parking management system.
Index Register(P0~P9) Introduction
In indirect addressing application, Rxxxx register can combine V
、
Z & P0
~
P9 for index addressing; Dxxxx register can't
combine V
、
Z for index addressing, but P0
~
P9 are allowed.
When V
、
Z index register being combined with the Rxxxx register,
for example, R0 with V
、
Z, the instruction format is R0V(where V=100, it means R100) or R0Z(where Z=500, it means
R500); when P0
~
P9 index register being combined with the Rxxxx register, the instruction format is RPn (n=0
~
9) or
RPmPn (m,n=0
~
9), for example RP5 (where P5=100, it means R100) or RP0P1(where P0= 100, P1=50, it means150).
When P0
~
P9 index register being combined with the Dxxxx register, the instruction format is DPn (n=0
~
9) or DPmPn
(m,n=0
~
9), for example DP3 (where P3=10, it means D10) or DP4P5 (where P4=100, P5=1, it means D101).
It can combine both P0
~
P9 index register, for example P2=20, P3=30, when Rxxxx or Dxxxx register combines both
index register, RP2P3 will point to R50, DP2P3 will point to D50, it means the summation of both index register for indirect
addressing.
EN
EN
EN
U/S
X23
X23
M1924
BR
L :
4
11P.(+)
P2
4
P2
Sa :
D :
Sb :
D=0
CY
103.BT_M
RP3
R2000
Ts :
Td :
08.MOV
100
P2
D :
S :
1. Index register P2=100 while power up or first run.
2. When X23 changes from 0
Æ
1, FUN103 will perform the
table movement, the source starts from R100 (P2=100),
the destination starts from R2000, the amount is 4.
Coping the content of R100~R103 for R2000~R2003 at
first execution, coping the content of R104~R107 for
R2000~R2003 at second execution…
3. Increasing the P2 index register by 4 to point to next 4
Содержание 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 ...