![](https://pdfstore-manualsonline.prod.a.ki/pdfasset/3/8d/38d56254-54fe-46e3-85ae-d3f5260e1091/38d56254-54fe-46e3-85ae-d3f5260e1091-bg71.png)
FX Series Programmable Controllers Devices in Detail 4
4-39
4.13.1 Modifying a Constant
Constants can be modified
ust as easil
as data re
isters or bit devices. If, for example, the
constant K20 was actuall
written K20V the final result would equal:
K20 + the contents of V
Example:
4.13.2 Misuse of the Modifiers
Modif
in
Kn devices when Kn forms part of a device description such as KnY is not possible,
i.e. while the followin
use of modifiers is permitted;
K3Z
K1M10V
Y20Z
Statements of the form:
K4ZY30
are not acceptable.
• Modifiers cannot be used for parameters entered into an
of the 20 basic instructions,
i.e. LD, AND, OR etc.
4.13.3 Using Multiple Index Registers
The use of multiple index re
isters is
sometimes necessar
in lar
er pro
rams or
pro
rams which handle lar
e quantities of
data. There is no problem from the PLC’s
point of view in usin
both V and Z re
isters
man
times throu
h out a pro
ram. The point
to be aware of is that it is sometimes
confusin
for the user or a maintenance
person readin
such pro
rams, as it is not
alwa
s clear what the current value of V or Z
is.
Example:
V = 10 (K10)
Z = 20 (K20)
D5V = D15 (D5 + V = D5 + 10 = D15)
D15Z = D35 (D15 + Z = D15 + 20 = D35)
D40Z = D60 (D40 + Z = D40 + 20 = D60)
Both V and Z re
isters are initiall
set to K10 and K20 respectivel
.
The contents of D15 is added to that of D35 and store in D60.
V is then reset to 0 (zero) and both V and Z are used in the double word addition (DADD).
The contents of D1, D0 are then added to D3, D2 and then finall
stored in D25, D24.
If V = 3276 then K20V
K
20
V
(3276)
3296
X0
D40Z
X2
ADD D 5V
D 15Z
MOV K10 V
X1
MOV K20 Z
M8000
MOV K0 V
D 4Z
X3
DADD
D 0 D 2