wait_for_completion#
method
- Z812.wait_for_completion(id='homed', MAX_WAIT_TIME=5)#
A blocking function to ensure a task has been finished.
Used to for the following functions: homing, moving, stopping, or updating limits. The id parameter must be specificed for the correct operation (“homed”, “moved”, “stopped”, or “limit_updated”).
If the task is not finished after MAX_WAIT_TIME, a RuntimeError is raised. If the id is “homed”, MAX_WAIT_TIME is ignored.
- Parameters:
- idstr, optional
must be either “homed”, “moved”, “stopped”, or “limit_updated” (default is “homed”).
- MAX_WAIT_TIMEint, optional
The maximum time to wait for the task to complete. Defaults to 5 seconds. Ignored if id is “homed” or if value is 0.
- Raises:
- RuntimeError
If the task is not finished after MAX_WAIT_TIME seconds.