2.10.2 Functions And Structures; 2.10.3 Indexing Of Devices - Mitsubishi Electric MELSEC-Q Structured Programming Manual

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

Advertisement

FXCPU Structured Programming Manual
[Device & Common]

2.10.2 Functions and structures

1. 16-bit type
Index registers have the same structure as data registers.
16-bit type
V
V0 to V7 :8 points
2. 32-bit type
Make sure to use Z0 to Z7 when indexing a device used in a 32-bit applied instruction or handling a numeric
value beyond the 16-bit range.
32-bit type
V0 (high-order side) Z0 (low-order side)
V1 (high-order side) Z1 (low-order side)
V2 (high-order side) Z2 (low-order side)
V3 (high-order side) Z3 (low-order side)
V4 (high-order side) Z4 (low-order side)
V5 (high-order side) Z5 (low-order side)
V6 (high-order side) Z6 (low-order side)
V7 (high-order side) Z7 (low-order side)

2.10.3 Indexing of devices

Available devices and contents of indexing are as described below.
Decimal devices and numeric values: M, S, T, C, D, R, KnM, KnS, P and K
For example, when "V0 = K5" is specified and "D20V0" is executed, an instruction is executed for the device
number D25 (D20 + 5).
Constants can be indexed also. When "K30V0" is specified, an instruction is executed for the decimal value
K35 (30 + 5).
Octal devices: X, Y, KnX and KnY
For example, when "Z1 = K8" is specified and "X0Z1" is executed, an instruction is executed for the device
X10 (X0 + 8: Octal addition).
When indexing a device whose device number is handled in octal, a numeric value converted into octal is
added for the contents of V and Z.
Accordingly, note that X0Z1 indicates X12, and does not indicate X10 when "Z1 = K10" is specified.
Hexadecimal values: H
For example, when "V5 = K30" is specified, a constant H30V5 is handled as "H4E (30H + K30)". When "V5 =
H30" is specified, a constant H30V5 is handled as "H60 (30H + 30H)".
116
16-bit type
Z
Z0 to Z7 :8 points
This is because FX PLCs handle Z as the low-order side of a 32-bit
register as shown in combinations of V and Z in the left figure. Even if
V0 to V7 (on the high-order side) is specified, indexing is not executed.
When index registers are specified as a 32-bit device, both V (high-
order side) and Z (low-order side) are referred to at the same time. If a
numeric value used for another purpose remains in V (high-order
side), consequently the numeric value here becomes extremely large,
and an operation error occurs.
Example of writing data to 32-bit index registers
Even if an index value used in a 32-bit instruction does not exceed the
16-bit numeric range, use a 32-bit operation instruction such as DMOV
for writing a numeric value to Z as shown above so that both V (high-
order side) and Z (low-order side) are overwritten at the same time.
DMOV
EN
ENO
K300
s
→ For indexing method and cautions, refer to Section 3.7.
2 Devices in Detail
2.10 Index Register [V and Z]
K300
(V2,Z2)
d
Z2

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec-lMelsec-fFx3sFx3gFx3gcFx3u ... Show all

Table of Contents