Download Print this page

Batch Read In Word Units (Command: Wr, Qr) - Mitsubishi MELSEC Q Series Reference Manual

With melsec communication protocol
Hide thumbs Also See for MELSEC Q Series:

Advertisement

5.2.5 Batch read in word units (command: WR, QR)

[Control procedure]
When using WR (ACPU common command)
When using QR (AnA/AnUCPU common command)
(Data name)
External device
side
(Example)
(Data name)
Programmable controller CPU side
(Example)
5 - 26
The example shown in this section explain the control procedure for batch reading bit
device memory (16 bit units) and word device memory (word units) using the WR and
QR commands.
The order and contents of data items for the parts marked with " " shown in the
control procedure differ depending on the communication format.
Refer to a detailed explanation in Section 5.1.
(Read conditions)
1)
Message wait is 0 ms.
2) Read 32 points from X040 to X05F and 2 points from the current
values of T123 and T124 (2 words for both).
(1) Reading the bit device memory
Head device
Q
R
0
X
0
0
0
0
51
52
30
58
30
30
30
30
H
H
H
H
H
H
H
H
Character area A
(Specify the range of the devices to be read)
POINT
(1) When reading the bit device memory, designate the number of device points
within the following range:
• 1  Number of device points  32
• Head device number + number of device points  16 - 1  maximum device
number
(2) The WR and QR commands are in word units. When reading 32 points from
X40 to X5F, the number of device point designated is "02" (16 points are
designated as 1).
5 WHEN COMMUNICATING USING THE A COMPATIBLE 1C FRAMES
: 5 characters (in the following case, X0040 is designated)
: 7 characters
Number of points to be read
Number of
device points
2 characters
(hexadecimal)
Four characters are used for one device point.
H
L
Thus, one word data is expressed by a 4-digit value
(hexadecimal).
4
0
0
2
34
30
30
32
H
H
H
H
1
31
H
1
2
3
0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1
X
X
X
4
4
4
to
F
E
D
Data for the number
of device points
Characters for the
number of device
points
2
3
4
A
B
C
D
32
33
34
41
42
43
44
H
H
H
H
H
H
H
Character area B
4
A
B
X
X
X
X
X
X
X
4
4
4
4
5
5
5
to
3
2
1
0
F
E
D
(Data read)
The order of data items is the same as when
using both the WR and QR commands.
C
D
X
X
X
X
5
5
5
5
3
2
1
0
5 - 26

Hide quick links:

Advertisement

loading