Storage Area For Reading And Writing Data - Mitsubishi QD51 Programming Manual

Logic controller
Hide thumbs Also See for QD51:
Table of Contents

Advertisement

4 THE EXCHANGE BETWEEN THE PLC AND BUFFER MEMORY

4.2.6 Storage area for reading and writing data

When an integer array is
designated, the data is stored
and set from element 0.
Data cannot be stored or set
from other than element 0.
4 - 15
The method in which data is read and written from the PLC device must be specified.
Integer type variables, array/character type variables, and arrays can be used as data
storage areas. If arrays are to be used, the arrays must be defined with the DIM
instruction.
(1) When using integer type variables and integer type arrays as a
data storage area
(a) Bit devices
Bit devices are handled in bit units or word units. The following describes
each of them.
• Bit units
When bit units are designated, one point of ON/OFF data of the device
number for each variable will be stored and set in the least significant bit
of the variable for the specified number of points.
The status of the least significant bit is "0" when the corresponding device
is OFF and "1" when it is ON.
X23
toX20X1F
1 0 1
1
1 0 1
1
• Word Units
When bit devices are designated using word units, the 16 points of
ON/OFF data for each variable will be paired with each bit and stored and
set from the lower bit in the variable.
The status of the each bit is "0" when the corresponding device is OFF
and "1" when it is ON.
to
M79
M72M71
to
X18
X17
to
X10
0 0 0
0
1 1 1
1
0 1 1
0
Accesses 20 bits of data from
X10 using integer array A%( ).
to
M64
One word (16 bits) of data is accessed
from M60 using integer variable M%( ).
The following instructions are used to operate data using bit units corresponding
to the bit device in the BASIC program.
• When the data stored in an integer array is referenced
• When the data is set in an integer array
MELSEC-Q
b15
to
b8 b7
1
A% (0)
X11
0
A% (1)
X13
Ignores bits other than
the least significant bit
of one byte.
b15
to
b8 b7
M%(0)
M75
to
M68 M67
......
........................
to
b0
0
Corresponds
to X10
1
Corresponds
to X12
to
b0
to
Corresponds
to M60
RDSET instruction
WTSET instruction
4 - 15

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ad51h-s3Qd51-r24A1sd51s

Table of Contents