SPLat Logo

WaitOn ii+

NOTICE: SPLat Controls has moved. We are now at 1/85 Brunel Rd, Seaford, 3198. map

WaitOn ii+

PC = (input ii on) ? (PC + 1) : (PC)

(A FastTrack instruction)

Waits until the nominated input number ii turns on. If the input is already on when this instruction is executed, your program will simply go on to the next instruction. If the input is off, the program will wait until it turns on, with no time limit. You should therefore take care when using this instruction not to produce a situation where your program can "hang up" because the expected input never occurs. In a MultiTrack task this is not a problem.

This instruction uses debounced inputs. Debounce adds a delay of 8 to 20mS to the input response, in order to reject contact bounce (chattering) in mechanical input switches.

When this instruction is simulated the regular timers will count at an arbitrary rate.

+ 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 IasJ: precode.

Dialect restriction: This instruction is not implemented on boards prior to dialect D=7, but can be used on older boards via automatic translation by SPLat/PC.

See also WaitOnT WaitOff WaitOffT WaitOnK WaitOnKT