227
5-9-8 Interruption using notes and parameter address
LD M0 //HSC trigger condition M0 (also interruption counting condition)
CNT_AB HSC0 K2000 HD0 //HSC and 100-segment head address setting
LDP M1 //HSC reset trigger condition
RST HSC0 //HSC and 100-segment reset (also reset the interruption)
As shown in the above example (note: the interrupt sub-program is omitted, see the
application example in chapter 5-9-9). The data register HD0 sets the region starting address
for the set value of 100 segments, and then stores the set value of 100 segments in double-
word form. Attention should be paid to using high-speed counting interrupts:
The register after the last segment no needs to set 0, but should be reserved and
cannot be used for other purpose. For example, it has 3 segments, segment 1 is HD0,
segment 2 is HD2, segment 3 is HD4, then HD6 is reserved.
It is not allowed to set the interrupt setting value without writing the interrupt
program. Otherwise, errors will occur.
100-segment interrupt of high speed counter generate in turn, that is, if the first
interrupt does not occur, the second interrupt will not occur.
In high speed counting process, if the present counting value is changed by DMOV,
ADD instruction (DMOV K1000 HSCD0), the interruption value will not change at
this time. Please do not change the HSCD value when the high speed counter is
running.
tudonghoatoancau.com