Functions And Operation Examples Of File 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.8.4

Functions and operation examples of file registers

A file register sets the initial value of a data register having the same device number.
Each file register stores 16-bit data (whose most significant bit specifies the positive or negative sign). Two
file registers combined can store 32-bit data (whose most significant bit specifies the positive or negative
sign).
Data registers D1000 and later can be specified as file registers by parameter setting.
→ For the maximum number of points to be specified as file registers, refer to Subsection 2.8.1.
• In parameter setting, 1 to 14 blocks can be specified. One block secures 500 file registers, and uses the
program memory area for 500 steps.
→ For the number of blocks to be specified as parameter setting, refer to Subsection 6.3.
• When some of data registers D1000 and later are specified as file registers, remaining unspecified data
registers can be used as data registers.
The program Capacity and file register points differs from one PLC to another.
This explanation here uses the FX
1. Operation of file registers
• The contents of the file register area [A] in the program memory set inside the built-in memory or an
optional memory are batch-transferred to the data register area [B] in the data memory inside the system
RAM when the PLC is powered ON or when the PLC mode is switched from "STOP" to "RUN".
If data registers in the area [A] are specified as file registers by parameter setting, the contents of the area
[A] in the program memory are batch-transferred to the area [B] in the data memory when the PLC is
powered ON or when the PLC mode is switched from "STOP" to "RUN". This means that the contents of
changes stored in the data memory are initialized.
If it is necessary to save the contents of changes caused by a sequence program and stored in the data
memory, update the contents of the area [A] to changed values using the same-number register update
function of the BMOV instruction described later.
D1000
500 points 14 blocks
(7000 points) maximum
• Difference between the BMOV instruction and other instructions
The table below shows difference between the BMOV instruction and other instructions for file registers
(D1000 and later).
Instruction
BMOV instruction
Other instructions
The contents of data registers specified as file registers are automatically copied from the file register area
[A] to the data register area [B] when the PLC is powered ON.
• When a file register is monitored from peripheral equipment, the contents of the data register area [B] in
the data memory are read.
When "file register current value change", "file register forced reset" or "PC memory all clear" is executed
from peripheral equipment, the contents of the file register area [A] in the program memory are changed,
and then the changed contents are automatically transferred to the data register area [B].
Accordingly, when overwriting of file registers is required, the program memory should be located in the
built-in memory or a memory cassette whose protect switch is set to OFF. (File registers stored in a
memory cassette cannot be overwritten from peripheral equipment if its protect switch is ON.)
and FX
3U
Built-in memory
or
memory cassette
Program
memory
Program/
When the PLC is
comment
powered ON
D1000
When the PLC
File register
mode is switched
from STOP to RUN
[A]
D7999
Description
Reads data from and writes data to the file register
area [A] in the program memory.
Read data from and write data to the data register area
[B] in the image memory in the same way as data
reading from and data writing to general data registers.
PLCs as examples.
3UC
System RAM
D 0
Data
memory
Data registers D1000 and later located
Data register
in the area [B] which are specified as
operands in instructions (except BMOV),
indirectly specified for timers or
Data register
counters or specified as devices in the
Write
RST instruction are handled in the same
way as general data registers, and the
[B]
contents of such data registers are read
Read
and written in the same way as general
Data register
data registers.
The remaining area can be used as general-purpose data registers.
Data writing to file registers using the BMOV instruction
is not available in FX
PLCs.
Use peripheral equipment for data writing.
Because the data register area [B] is provided in the
system RAM inside the PLC, their contents can be
arbitrarily changed without regard to restriction of the
optional memory type.
2 Devices in Detail
2.8 Data Register and File Register [D]
Remarks
/FX
(Ver. 2.30 or earlier)
0N
U
1
2
3
4
5
6
7
99

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec-lMelsec-fFx3sFx3gFx3gcFx3u ... Show all

Table of Contents