MotionController Axis MultiAxis IO IOPoint NetworkNode RsiError
Sample Apps Changelog

RapidCode API

◆ InterruptWait()

RSIEventType InterruptWait ( int32  milliseconds)
pure virtualinherited

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
millisecondsMilliseconds 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:
// -- C++ -- //
{
printf("Waiting for motion to complete\r");
}
// -- C# -- //
{
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.