5 - 3 5 - 3
MELSEC-Q
5 BASIC USAGE
5.1.2 Setting the count method
The count method is set using the GX Developer intelligent function module switch
setting.
See Section 4.5 for details on the setting method.
5.1.3 Reading the present values
This section explains the methods of reading the present values stored in the buffer
memory or the count values when counter function selection is executed.
(1) When any function is used, the present value is stored into the buffer memory for
storing the present value. When the latch counter, sampling counter or periodic
pulse counter function is executed, the count value is stored into the buffer
memory for storing the counter function selection count value at the addresses
shown in the table below, aside from the buffer memory for storing the present
value.
Counter function selection count value
Description
Present
value
Latch count
value
Sampling
count value
Periodic pulse count
previous value
Periodic pulse count
present value
CH1 2
H
to 3
H
C
H
to D
H
E
H
to F
H
10
H
to 11
H
12
H
to 13
H
Buffer
memory
address
CH2 22
H
to 23
H
2C
H
to 2D
H
2E
H
to 2F
H
30
H
to 31
H
32
H
to 33
H
(2) Both the present values and counter function selection count values are stored in
the buffer memory as 32-bit signed binary values. In addition, since the contents
of the buffer memory are automatically updated by the count operation, the latest
count values can be read from the buffer memory.
POINT
When reading the present values or the counter function selection count values,
use the DFRO command and always read values in two-word units. When reading
the values in one-word units, if the count values are updated in the middle of read
processing, a mismatch may occur between the data contents of the lower and
higher words, possibly causing the system to read incorrect count values.
[Program example]
DFRO
H00 H02
D0
K1
X20
[Example of an undesirable program]
FROM
H00 H03
D1
K1
FROM
H00 H02
D0
K1
X20
Содержание QD62
Страница 1: ......
Страница 2: ......
Страница 13: ...A 11 A 11 MEMO ...
Страница 55: ...4 18 4 18 MELSEC Q 4 SETUP AND PROCEDURE BEFORE STARTING THE OPERATION MEMO ...
Страница 91: ...7 17 7 17 MELSEC Q 7 UTILITY PACKAGE GX Configurator CT Counter selection 1 Coincidence output Ring counter ...
Страница 97: ...8 5 8 5 MELSEC Q 8 PROGRAMMING 3 Program example a Set only when the linear counter is used ...
Страница 100: ...8 8 8 8 MELSEC Q 8 PROGRAMMING 2 Program example a Set only when the ring counter is used ...
Страница 127: ......
Страница 128: ......