Structure Of Data Registers And File Registers; Functions And Operation Examples Of Data 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.2

Structure of data registers and file registers

1) 16-bit type
One (16-bit) data register or file register can store a numeric value within the range from -32768 to
+32767.
High order
0
b15
Sign
0 : Positive
1 : Negative
A numeric value can be read from or written to a data register by an instruction usually.
Or a numeric value can be directly read from or written to a data register from a display unit, display
module or programming tool.
2) 32-bit type
Two serial data registers or file registers can express 32-bit data.
- A data register having a larger device number handles high-order 16 bits, and a data register having a
smaller device number handles low-order 16 bits.
- In the index type, V handles high-order 16 bits, and Z handles low-order 16 bits.
- Two serial data registers or file registers can store a numeric value within the range from -2,147,483,648
to +2,147,483,647.
High order
b31
Sign
0 : Positive
1 : Negative
In the case of 32-bit type, when a data register or file register on the low-order side (Example: D0) is
specified, the subsequent number on the high-order side (Example: D1) is automatically occupied.
Either an odd or even device number can be specified for the low-order side, but it is recommended to
specify an even device number for the low-order side under consideration of the monitoring function of
display units, display modules and programming tools.
2.8.3

Functions and operation examples of data registers

Data registers store numeric data.
Each data register stores 16-bit data (whose most significant bit specifies the positive or negative sign). Two
data registers combined can store 32-bit data (whose most significant bit specifies the positive or negative
sign).
1. General type and latched (backed-up) type data registers
• Once data is written to a data register, it does not change unless other data overwrites it.
When the PLC mode switches from "RUN" to "STOP" or when the power is interrupted, however, all data
stored in general type data registers are cleared to "0".
If the special auxiliary relay M8033 has been driven in advance, data are held even when the PLC mode
switches from "RUN" to "STOP".
• Latched (backed-up) type data registers hold their contents even when the PLC mode switches from
"RUN" to "STOP" or when the power is interrupted.
• The contents of data registers are latched (backed up) by a battery, EEPROM, etc. built in the PLC.
• When using fixed latched (backed-up) type data registers as general type registers, provide the following
reset circuit using the RST or ZRST instruction at the head step in a program.
M8002
Initial pulse
96
D 0(16-bit type)
1
0
1
0
1
0
1
0
1
0
D 1(High-order 16 bits)
0
1
0
1
0
1
0
1
0
1
0
ZRST
EN
ENO
d1
d2
Low order
1
0
1
0
1
b0
D 0(Low-order 16 bits)
1
0
1
0
1
1
1
1
1
0
→ For details on each backup method, refer to Section 2.6.
Data stored in D512 to D999 are cleared to "0".
D512
D999
→ For file registers, refer to Subsection 2.8.4.
2 Devices in Detail
2.8 Data Register and File Register [D]
0
0
0
1
1
1
1
0
0
0
0
Low order
b0

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec-lMelsec-fFx3sFx3gFx3gcFx3u ... Show all

Table of Contents