LoopIfTiming tttttt,LLLL [D>=16]
PC = (elapsed time < (tttttt*10ms)) ? LLLL : (PC + 1)
Compares the current system time with the value captured by a previous MarkTime
instruction in the same MultiTrack task. If the elapsed time is less than tttttt
times 10mS, jumps to line LLLL
, otherwise "falls through" to the next instruction. tttttt
is a value between 0 and 16,777,215. A fatal error will occur if this instruction is executed outside of a task in the MultiTrack task queue.
From dialect 20 some controllers allow you to program the 10mS basic "tick" interval over the range 1mS to 255mS via a setting in the CPU device. See the CPU device documentation for your controller.
For a 10ms tick, the maximum time is:
16777216 * 0.010 = 167772.16 seconds
= 46hr 36min 12sec
Note
SPLat 8 bit controllers (green boards) do not support the use of task timers if Multitrack multi-tasking is not running. In addition, on these controllers you cannot use Pause, WaitOnT, WaitOffT or WaitOnKT between a MarkTime and its corresponding fSTSinceMark or LoopIfTiming.
SPLat 32 bit controllers (black boards) have none of these restrictions. So you can use task timers on a SPLat 32 bit controller even if you are single tasking and can use any of the Pause or Wait instructions together with MarkTime and its siblings. There are full details on other 32 bit board enhacements.
See MultiTrack tutorial.
Dialect exclusions: Not available in dialects before 16.