#include "rsi.h"
#include "SampleAppsHelper.h"
void controllerInterruptsMain()
{
const int TIMEOUT = (5000);
try
{
while (controller->
OS->
KeyGet((int32_t)RSIWait::RSIWaitPOLL) < 0)
{
if (interruptType != RSIEventType::RSIEventTypeTIMEOUT)
{
printf("IRQ %ld\n", interruptType);
printf("\n");
}
else
{
printf("Timeout waiting for interrupts...\n");
}
}
}
{
printf(
"\n%s\n", err.
text);
}
system("pause");
}
void Delete(void)
Delete the MotionController and all its objects.
void InterruptEnableSet(bool enable)
Control interrupts for this class.
Represents the RMP soft motion controller. This class provides an interface to general controller con...
RapidCodeOS * OS
Provides access to operating system (Windows) features.
int32_t InterruptSourceNumberGet()
Get the number (or index) of the object (Axis, Motor, etc) that generated the interrupt.
int32_t InterruptSampleTimeGet()
Get the sample timer value when the last interrupt was generated.
const char *const InterruptNameGet()
Get the text name of an interrupt type.
RSIEventType InterruptWait(int32_t milliseconds)
Suspend the current thread until an interrupt arrives from the controller.
int32_t KeyGet(int32_t milliseconds)
Wait for a key to be pressed and return its value.
Represents the error details thrown as an exception by all RapidCode classes. This class contains an ...
RSIEventType
Event Types or Status Bits.
static void CheckErrors(RapidCodeObject *rsiObject)
Checks for errors in the given RapidCodeObject and throws an exception if any non-warning errors are ...
static void StartTheNetwork(MotionController *controller)
Starts the network communication for the given MotionController.