RSIEventType InterruptWait ( long  milliseconds  )  [inherited]

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:
   // -- C++ -- //
  while(axis->InterruptWait(RSIWaitFOREVER) != RSIEventTypeMOTION_DONE)
  {
    printf("Waiting for motion to complete\r");
  }
   // -- C# -- //
  while(axis.InterruptWait(RSIWaitFOREVER) != RSIEventTypeMOTION_DONE)
  {
    Console.Write("Waiting for motion to complete\r");
  }
See also:
RapidCodeMotion::InterruptEnableSet, MotionController::InterruptEnableSet, RapidCodeMotion::InterruptWake, MotionController::InterruptWake
Examples:
Capture.cpp, controllerInterrupts.cpp, customHome.cpp, HomeThreads.cs, IOPointInterrupts.cs, RecorderInterrupts.cs, userLimit.cpp, and userLimitGainChangeBasedOnPosition.cpp.