Indexing Example For Instructions Whose Number Of Times Of Use Is Restricted - 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.3

Indexing example for instructions whose number of times of use is restricted

By indexing the target device number with index registers V and Z, it is possible to change the target device
number for each program. When this method is applied to an instruction whose number of times of use is
restricted, it is regarded as if a same instruction is used multiple times in the program.
Example of indexing operation using the TKY instruction
Two sets of key entries (of 0 to 9 given from the
ten-key pad) store the input data to D0 and D2.
The TKY instruction can be programmed only
once, but two sets of key entries of 0 to 9 are
available by indexing the head device number for
input data, the head device number for input data
storage destination and the head device number
for turning ON the key entry information.
Even if V is changed while the TKY instruction is
executed, such a change is invalid. To make the
change valid, turn OFF the execution of the TKY
instruction.
3 How to Specify Devices and Constants in Instructions
MOVP
X012
EN
K0
s
MOVP
EN
s
K0
MOVP
EN
s
K0
X012
MOVP
EN
s
K16
MOVP
EN
K2
s
MOVP
EN
s
K20
X013
TKY
EN
s
X000V0
Head device
number for
input data
3.7 Indexing
ENO
(K0)
(V0)
d
V0
ENO
(K0)
(V1)
d
V1
ENO
(K0)
(V2)
d
V2
ENO
(K16)
(V0)
d
V0
ENO
(K2)
(V1)
d
V1
ENO
(K20)
(V2)
d
V2
ENO
D0V1
d1
Head device
d2
M0V2
number for
data storage
destination
Head device number
for key entry information
137
1
2
3
4
5
6
7

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec-lMelsec-fFx3sFx3gFx3gcFx3u ... Show all

Table of Contents