215
When the trigger condition is established, The value in the double-word data register D20 is
written into the accumulative register HSCD0 (double-word) corresponding to the HSC0 of
the high-speed counter, and the original data is replaced.
High-speed counter can not directly participate in any application instructions or data
comparison instructions (such as DMUL, LD > etc.) except DMOV, but can only be carried
out after reading and writing into other registers.
As high speed counter is double words counter, so it must use 32-bit instruction DMOV.
DMOV often uses together with high speed counter.
5-7-6 The difference between HSC and normal counter
Although the instructions of high-speed counter use "CNT" in the same way as those of
ordinary counter, their functions are quite different.
When M0 is changed from OFF to ON once, the value of common counter is added 1.
The high-speed counter trigger condition must be in the normally closed state when counting,
which is equivalent to the high-number counter being activated, but the value of the high-
number counter does not change. Only when the corresponding external signal input terminal
receives the signal, the high-number counter counts. If the external signal input terminal has
signal input and its trigger condition is not closed, the high-number counter will not count.
The difference is shown in the following table:
Count the OFF to ON times of M0, when
the counting value reaches 2000, C0 is ON.
When M0 is ON, count the X0 input signal,
when the counting value reaches 2000,
HSC0 is ON, M0 should be always ON
when counting.
5-8 HSC Example
The following takes XD3-60 as an example to show the programming method of HSC.
CNT HSC0 K2000
M0
M1
RST HSC0
When the M0 is ON, HSC0 counts the rising edge of the OFF to ON of the input X0 port at
high speed.
When M1 rising edge comes, reset HSC0 high-speed counter and HSCD0 (double word).
Single-phase increasing mode
tudonghoatoancau.com