213
As shown above, when M0 is ON, HSC0 begins to count the pulse input of X0 port; when M1
changes fromOFF to ON, HSC0 is reset, and the count value in HSCD0 (double words) is
cleared.
5-7-4 Read HSC value [DMOV]
1)Instruction Summary
Read HSC value to the specified register;
Normally ON/OFF,
rising/falling edge
2)Operands
Specify the read/written register
3)Suitable Soft Components
*Notes: D includes D, HD; TD includes TD, HTD; CD includes CD, HCD, HSCD, HSD;
DM includes DM, DHM; DS includes DS, DHS. M includes M,HM,SM;S includes S,HS;
T includes T,HT;C includes C, HC.
When the trigger condition is established, the high-speed count value in the accumulative
register HSCD0 (double words) corresponding to HSC0 of the high-speed counter is read
into the data register D10 (double words).
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.
Program example:
tudonghoatoancau.com