Indexing; Indexing In Basic Instructions - Mitsubishi Electric MELSEC FX3U Programming Manual

Melsec fx series programmable logic controllers
Table of Contents

Advertisement

FX
/FX
/FX
Series Programmable Controllers
3G
3U
3UC
Programming Manual - Basic & Applied Instruction Edition
5.7

Indexing

The functions and structures of index registers are explained in detail in "4.10 Index Register [V and Z]".
Refer to Section 4.10 in advance.
5.7.1

Indexing in basic instructions

In the case of bit devices
Bit devices [X, Y, M (except special auxiliary relays), T, and C (C0 to C199)] used in LD, LDI, AND, ANI, OR,
ORI, OUT, SET, RST, PLS, and PLF instructions can be indexed with index registers.
The figure shown on the right explains an indexing operation with
the index register Z(0) for X000 and M0 in the LD instruction.
Transfer K5 or K10 to the index register Z(0) in advance.
If Z(0) is "5", "X(0+5) = X005". When X005 turns ON, Y000 turns ON
and "M(0+5) = M5". When M5 turns ON, Y001 turns ON.
If Z(0) is "10", "X(0+10) = X012
turns ON and "M(0+10) = M10". When M10 turns ON, Y001 turns
ON.
*1.
Refer to the caution 3) below.
• The index registers Z0 to Z7 and V0 to V7 can be used for
indexing.
• In OUT instruction for a timer or counter, the timer number (or
counter number) and the device specified for the set value can be
indexed.
Cautions
1) 32-bit counters and special auxiliary relays cannot be indexed
with index registers.
2) It is not permitted to use 16-bit counters as 32-bit counters by executing indexing.
3) When an octal device number of X or Y is indexed with an index register, the contents of the index
register are converted into octal, and then added to the device number.
For example, when the value of an index register added to the input X000 is changed in the order "K0 →
K8 → K16", the device number converted into octal is added to the input X000 and the input number is
changed in the order "X(000+0) = X000 → X(000+8) = X10 → X(000+16) = X20".
In the case of word devices and constants
The set value of word devices used in OUT instruction of T and C(0~199) can be indexed with index registers.
The indexing operation is explained in an example in which the set
value D0 of T0 used in the index register V2 indexes OUT
instruction(as shown in the right figure).
Transfer K0 or K10 to the index register V2 in advance.
When X001 is set to ON, "D(0+0) = D0" if V2 is "0", and T0 operates
with the set value D0.
When X001 is set to ON, "D(0+10) = D10" if V2 is "10", and T0
operates with the set value D10.
Caution
1) When a 32-bit counter is used in OUT instruction, the set value
cannot be indexed with an index register.
166
5 How to Specify Devices and Constants to Instructions
*1
*1
". When X012
turns ON, Y000
X030
FNC 12
K5
MOVP
K5 → Z(0)
X030
FNC 12
K10
MOVP
K10 → Z(0)
X000Z(0)
M0Z(0)
Z(0)=5 : X005=ON → Y000=ON
M5=ON → Y001=ON
=ON → Y000=ON
Z(0)=10 : X012
*2
M10=ON → Y001=ON
*2 Refer to the caution 3).
X030
FNC 12
K0
MOVP
K0 → V2
X030
FNC 12
K10
MOVP
K10 → V2
X001
V2 = 0 : The set value of T0 is the
present value of D0.
V2 = 10 : The set value of T0 is the
present value of D10.
5.7 Indexing
Z(0)
Z(0)
Y000
Y001
V2
V2
T 0
D0V2

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec fx3ucMelsec fx3g

Table of Contents