#include "rsi.h"
#include "SampleAppsHelper.h"
#include "SampleApps.h"
int HardwareLimits::Run()
{
const int AXIS_COUNT = 1;
const int AXIS_NUMBER = 0;
const double USER_UNITS = 1048576;
const bool ACTIVE_HIGH = true;
const bool ACTIVE_LOW = false;
const double HW_POS_DURATION_TIME = 0.01;
const double HW_NEG_DURATION_TIME = 0.01;
USE_HARDWARE = false;
const std::string rmpPath = "C:\\RSI\\X.X.X\\";
if (USE_HARDWARE)
{
}
else
{
}
try
{
printf("Hardware Limits Example\n");
printf("\nAll Hardware Limit characteristicpp set\n");
}
{
printf(
"\n%s\n", err.
text);
return -1;
}
return 0;
}
void HardwareNegLimitActionSet(RSIAction action)
Set the action that will occur when the Hardware Negative Limit Event triggers.
void HardwareNegLimitDurationSet(double seconds)
Set the duration required before the Hardware Negative Limit event triggers.
void HardwarePosLimitActionSet(RSIAction action)
Set the action that will occur when the Hardware Positive Limit Event triggers.
RSIAction HardwarePosLimitActionGet()
Get the action that will occur when the Hardware Positive Limit Event triggers.
void HardwarePosLimitTriggerStateSet(bool state)
sets the trigger state.
double HardwareNegLimitDurationGet()
Get the duration required before the Hardware Negative Limit event triggers.
bool HardwarePosLimitTriggerStateGet()
trigger state return.
void HardwarePosLimitDurationSet(double seconds)
Set the duration required before the Hardware Positive Limit event triggers.
bool HardwareNegLimitTriggerStateGet()
Trigger state return.
double HardwarePosLimitDurationGet()
Get the duration required before the Hardware Positive Limit event triggers.
RSIAction HardwareNegLimitActionGet()
Get the action that will occur when the Hardware Negative Limit Event triggers.
void HardwareNegLimitTriggerStateSet(bool state)
Sets the trigger state.
Represents a single axis of motion control. This class provides an interface for commanding motion,...
Axis * AxisGet(int32_t axisNumber)
AxisGet returns a pointer to an Axis object and initializes its internals.
void Delete(void)
Delete the MotionController and all its objects.
Represents the RMP soft motion controller. This class provides an interface to general controller con...
Represents the error details thrown as an exception by all RapidCode classes. This class contains an ...
static void SetupControllerForHardware(MotionController *controller)
Sets up the controller for hardware use by resetting it and starting the network.
static void CheckErrors(RapidCodeObject *rsiObject)
Checks for errors in the given RapidCodeObject and throws an exception if any non-warning errors are ...
static void SetupControllerForPhantoms(MotionController *controller, int axisCount, std::vector< int > axisNums)
Sets up the controller for phantom axes, including configuring specified axes as phantom.