I've come back to this to add a timeout.
panic mode - I've used timers in a different way before ($TIMER_STOP[19] = FALSE etc). Your method looked much more elegant, but could find any documentation, and I got errors when using WAIT FOR TIMER_LIMIT[4.565]
The error was either ARRAY VARIABLE NOT DECLARED (if an integer), or EXPRESSION NOT EQUAL TO INT (if a float).
Am I missing something?