G'day, folks 😄
The program I'm developing interacts with a set of thermocouples via the serial port. Different subroutine calls are used to open the port, to collect data through it, and to close the port. However, if any of these calls fails to complete (for example, thermocouples are not connected) then the program 'hangs', requiring intervention by the Task Manager. This can be highly frustrating for an operator, particularly if they've just searched the entire building looking for the Task Manager's office.
I'm wondering if the delay function %dl ...
ia=winio@('%dl', interval, cb_func)
... can be used to avoid operator agitation by limiting the time allowed for the call to complete. The call would be contained within the call-back function cb_func (see above code). The code as written above would produce repeated calls to cb_func. The trick will be to make just one call to cb_func. Perhaps if cb_func has a return value of zero?
Eric