Indexing In Instructions - Mitsubishi Electric MELSEC-Q Structured Programming Manual

Hide thumbs Also See for MELSEC-Q:
Table of Contents

Advertisement

FXCPU Structured Programming Manual
[Device & Common]
3.7.2

Indexing in instructions

Indication of instructions allowing indexing
In the explanation of instructions, operands allowing indexing are indicated as shown in the table below.
Bit Device
Operand
System User
type
X Y M T C S D .b KnX KnY KnM KnS T C D
In the case of bit devices
The right figure shows an example of the indexing
operation in which the comparison result M0 in the
CMP instruction is indexed with the index register
V1.
Transfer K0 or K5 to the index register V1 in
advance.
When X001 is set to ON, the comparison result is
output to M0 to M2.
When M0 is ON and if V1 is "0", Y000 (= Y000+0)
is activated.
When M0 is ON and if V1 is "5", Y005 (= Y000+5)
is activated.
When M1 is ON and if V1 is "0", Y010 (= Y010+0)
is activated.
When M2 is ON and if V1 is "0", Y020 (= Y020+0)
is activated.
When M2 is ON and if V1 is "5", Y025 (= Y020+5)
is activated.
• For available index registers, refer to Section
2.10.
In the case of word devices
1. Indexing of operands in a 16-bit instruction
The right figure shows an example of the indexing
operation in which the transfer destination D0 in
the MOV instruction is indexed with the index
register V3.
Transfer K0 or K10 to the index register V3 in
advance.
When X001 is set to ON and if V3 is "0", K500 is
transferred to D0 (D (0+0) = D0).
When X001 is set to ON and if V3 is "10", K500 is
transferred to D10 (D (0+10) = D10).
134
→ FX Structured Programming Manual [Basic & Applied Instruction]
Word Device
Digit Specification
System User
3 How to Specify Devices and Constants in Instructions
Special
Index
Unit
R
V Z Modifier K
U \G
Indicated by " "
X000
EN
s
K0
X000
EN
s
K5
X001
EN
s1
D0
D1
s2
M0
Y000V1
M1
Y010V1
M2
Y020V1
V1=0
D0>D1
M0=ON
Y000=ON Y005=ON
D0=D1
M1=ON
Y010=ON Y015=ON
D0<D1
M2=ON
Y020=ON Y025=ON
X000
EN
s
K0
X000
EN
s
K10
X001
EN
s
K500
V3=0 : K500
D0 (D0+0)
V3=10 : K500
D10 (D0+10)
3.7 Indexing
Others
Const
Real
Character
Pointer
ant
Number
String
H
E
" "
MOVP
ENO
d
V1
MOVP
ENO
d
V1
CMP
ENO
d
M0
V1=5
MOVP
ENO
K0
V3
d
V3
MOVP
ENO
K10
V3
d
V3
MOVP
ENO
d
D0V3
P

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec-lMelsec-fFx3sFx3gFx3gcFx3u ... Show all

Table of Contents