Q-Code User Manual
Ver. 7.0 2021/11/30
187
4.10.5 CMP_CNT_OFF
Close the Counter function.
Note: NY4 / NY5 / NY5+ / NY6A / NY7 / NY9T / NX1 do not support this function.
Ex.
TR2
:
CMP_CNT_OFF
; Close the Counter function.
4.11 Counter Command
Counter Command
-
4.11.1 TMR_ON
Activate Timer function. It needs to specify count times.
TMR_On(Time)
TMR_On(Ch, Time)
Ch:
timer channel, 0 ~ 3.
Time:
time to count.
Note:
1. NY4 / NY5 / NY7 / NY9T / NX1 do not support this command.
2. NY6 does not support Ch parameter.
3. In NY6, the smallest unit of 1.00ms ~ 2.00ms is 64us and 2.01ms ~ 4.00ms is 256us. If they’re
not divisible by each time, every interrupt time will have errors.
4. In NY5+, time parameter accepts 64 ~ 256us.
5. In NY5+, only 1 channel of Timer can be activated. Activating one channel of Timer will also
close all other channels.
Ex.
Open Timer function. It’s interrupted once per 1.5ms. If the interrupt occurs, system will execute
INT_TMR.
TR1: TMR_ON(1.5ms)
; Open Timer function and interrupt once per
1.5ms.
INT_TMR:!PA
; If Timer is interrupted, the PA output is inverted
immediately.
4.11.2 TMR_OFF
Close the Timer function.
TMR_Off
TMR_Off(Ch)
Ch:
timer channel, 0 ~ 3.