This instruction is like the WaitOnK instruction, but with a built in time limit of tttt x 10mS. tttt is given in multiples of 10mS, up to a maximum of 32,767 x 10mS for dialects before 16, and 16,777,215 x 10mS for dialects 16 and later. When the instruction has executed, the next line of code should test the value in X to determine the outcome. X will be true if the expected event (an OFF to ON input transition on input ii) occurred. If the transition did not occur, X will be False.
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.
From dialect 16 this instruction becomes non-blocking when executed inside a MultiTrack task. When encountered in a MultiTrack task, it will always yield the processor the first time it is executed and continue yielding until the time has expired or the input condition is met.
WaitOnKT instruction clears any latched transition, so a new OFF to ON transition would be required for a second
WaitOnKT to return a True value.
+ From dialect 16 the address argument will be jndexed when executed inside a MultiTrack task and will be indexed if the instruction is preceded by the
On SPlat 8 bit controllers (green boards) you cannot use
WaitOnKT inside a
However on SPLat 32 bit controllers (black boards) there is no such restriction. On these boards you can use any combination of these instructions at any time. There are full details on other 32 bit board enhacements.
Dialect exclusions: Not available in dialects before 9.
InputK WaitOn WaitOnT WaitOff WaitOffT WaitOnK Pause