Indexing Example For Instruction With Limited Number Of Use - 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
In the case of constants
The indexing operation is explained in an example in which the
transfer destination in MOV instruction is indexed with the index
register V6 (as shown in the figure on the right).
Transfer K0 or K20 to the index register V6 in advance.
When X005 is set to ON, "K(6+0) = K6" if V6 is "0", and K6 is
transferred to D10.
When X005 is set to ON, "K(6+20) = K26" if V6 is "20", and K26 is
transferred to D10.
5.7.3

Indexing example for instruction with limited number of use.

By modifying the target device numbers using index registers V and Z, the target device numbers can be
changed using the program. In this way, an instruction with a limited number of uses per program can be
used with multiple devices.
Example using the TKY instruction (FNC 70)
Two groups of key entries (numeric keypad from 0 to
9) store the input data to D0 and D2. Although the
TKY instruction (FNC 70) can only be programmed
once, modifying the head device number of the input
data,
storage
information, the information can be input from the
two groups of keys (numeric keypad from 0 to 9).
Furthermore, even if V is changed while this
instruction is being executed, this change is invalid.
The change is invalid until the instruction is no longer
being driven.
destination
and
pressed
5 How to Specify Devices and Constants to Instructions
X004
X004
X005
X010
FNC 12
MOVP
FNC 12
MOVP
key
FNC 12
MOVP
X012
FNC 12
MOVP
FNC 12
MOVP
FNC 12
MOVP
X013
FNC 70
TKY
TKY
Input Data
Instruction
5.7 Indexing
FNC 12
K0
V6
MOVP
K0 → V6
FNC 12
K20
V6
MOVP
K20 → V6
FNC 12
K6V6
D10
MOVP
V6=0 : K6 (K6+0) → D10
V6=20 : K26(K6+20) → D10
(K0) → (V0)
K0
V0
K0
V1
(K0) → (V1)
(K0) → (V2)
K0
V2
(K16) → (V0)
K16
V0
K2
V1
(K2) → (V1)
(K20) → (V2)
K20
V2
X000V0
D0V1
M0V2
Data
Head Device
Head
Storage
Number of
Device
Destinati
Pressed Key
Number
on
Information
169
1
2
3
4
5
6
7
8
9
10

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec fx3ucMelsec fx3g

Table of Contents