Mitsubishi Electronics OD62 TV Mount User Manual


 
6 - 2 6 - 2
MELSEC-Q
6 CONVENIENT USAGE
6.1.1 Reading the counter function selection count value
The counter function selection count values are stored when the counter function
selection is executed.
When the latch counter, the sampling counter, or the periodic pulse counter function is
performed, each count value is stored in the buffer memory listed in the table below.
Counter function selection count value
Contents
Present
value
Latch count
value
Sampling
count value
Periodic pulse
count previous
value
Periodic pulse
count present
value
CH1
Un\G2,
Un\G3
Un\G12,
Un\G13
Un\G14,
Un\G15
Un\G16,
Un\G17
Un\G18,
Un\G19
Buffer
memory
address
CH2
Un\G34,
Un\G35
Un\G44,
Un\G45
Un\G46,
Un\G47
Un\G48,
Un\G49
Un\G50,
Un\G51
The present value and the counter function selection count values are stored in the
buffer memories in 32-bit signed binary.
Also, 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
(1) When reading the present and counter function selection count values, use the
DFRO instruction and always read values in two-word units. When reading
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]
H00 H0E D0
K1
X20
DFRO
[Example of an undesirable program]
H00 H0F D1 K1
H00 H0E D0
K1
X20
FROM
FROM
(2) Although the latch count value and present periodic pulse count value are
stored in different addresses, the same values are always stored (updated at
the same time). Thus, when the latch counter function or periodic pulse
counter function is executed, the present periodic pulse count value and latch
count value do not retain their previous values.
6