Functions And Operation Examples Of Extension Registers - 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. Initialization using GX Works2
Select [Online] → [Clear PLC memory ...] in GX Works2, and clear [Data device].
Note that this operation initializes the contents of timers, counters, data registers, file registers and extension
registers.
2.9.5

Functions and operation examples of extension registers

Extension registers can be used in various controls handling numeric data in the same way as data registers.
This subsection explains representative operation examples among various applications.
For the full use of extension registers, refer to the explanation on sequence instruction offered separately.
1. Extension registers in sequence instructions (basic instructions)
• Specifying the set value of a timer or counter
2. Extension registers in sequence instructions (applied instructions)
Operation examples using the MOV instruction
• Changing the current value of a counter
• Reading the current value of a counter
• Storing a numeric value to extension registers
16-bit type
32-bit type
• Transferring the contents of a data register to an extension register
106
→ FX Structured Programming Manual [Basic & Applied Instruction]
OUT_T
EN
ENO
TCoil
TC2
R0
TValue
OUT_C
EN
ENO
CCoil
CC10
R20
CValue
MOV
EN
ENO
s
d
R5
MOV
EN
ENO
s
d
CN10
MOV
EN
ENO
s
d
K200
DMOV
EN
ENO
s
d
K80000
MOV
EN
ENO
s
d
D10
2.9 Extension Register [R] and Extension File Register [ER]
A counter or timer operates while regarding the
contents of a specified extension register as its set
value.
The current value of the counter C2 is changed to the
contents of R5.
CN2
The current value of the counter C10 is transferred to
R4.
R4
"200 (decimal value)" is transferred to R10.
R10
"80000 (decimal value)" is transferred to R10 and R11.
Because a numeric value larger than "32767" is 32-bit
data, a 32-bit operation (double-D instruction) is
R10
required.
When an extension register on the low-order side (R10)
is specified, an extension register on the high-order
side (R11) is automatically occupied.
The contents of D10 are transferred to R20.
R20
2 Devices in Detail

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec-lMelsec-fFx3sFx3gFx3gcFx3u ... Show all

Table of Contents