Suspend the current thread until an interrupt arrives from the controller.
- Description:
- InterruptWait suspends the current thread until an interrupt arrives from the controller. This is commonly used while waiting for specific interrupts such as Motion Done, velocity reached, or recorder done. Please see RSIEventType for options. You can specify an extact wait time or use RSIWait.
- Parameters
-
milliseconds | Milliseconds to wait -or- an RSIWait value to return immediately or wait forever. |
- Returns
- (RSIEventType) Event which takes place or RSIEventTypeTIMEOUT event after time elapses.
- Sample Code:
{
printf("Waiting for motion to complete\r");
}
{
Console.Write("Waiting for motion to complete\r");
}
- Note
- InterruptWait will return logged Interrupts until there are none in the FIFO buffer. Then it begin waiting with a timeout for the next.
- See also
- RapidCodeMotion::InterruptEnableSet, MotionController::InterruptEnableSet, RapidCodeMotion::InterruptWake, MotionController::InterruptWake
- Examples
- ControllerInterrupts.cpp, CustomHome.cpp, UserLimitCommandPositionDirectSet.cs, UserLimitDigitalInputEStopStorePosition.cs, UserLimitDigitalInputOneCondition.cpp, UserLimitDigitalInputOneCondition.cs, UserLimitDigitalInputTwoCondition.cpp, UserLimitGainChangeBasedOnPosition.cpp, UserLimitPositionOneCondition.cpp, and UserLimitPositionOneCondition.cs.