#include "rsi.h"
#include "HelperFunctions.h"
#include <thread>
void MotionHoldReleasedByPositionMain()
{
using namespace RSI::RapidCode;
const int HOLDING_AXIS_INDEX = 1;
const int MOVING_AXIS_INDEX = 0;
const double TRIGGER_POS = 5;
const int USER_UNITS = 1048576;
char rmpPath[] = "C:\\RSI\\X.X.X\\";
SampleAppsCPP::HelperFunctions::CheckErrors(controller);
try
{
SampleAppsCPP::HelperFunctions::StartTheNetwork(controller);
Axis *holdingAxis = controller->
AxisGet(HOLDING_AXIS_INDEX);
Axis *movingAxis = controller->
AxisGet(MOVING_AXIS_INDEX);
SampleAppsCPP::HelperFunctions::CheckErrors(holdingAxis);
SampleAppsCPP::HelperFunctions::CheckErrors(movingAxis);
std::this_thread::sleep_for(std::chrono::seconds(1));
}
{
printf(
"%s\n", err.
text);
}
system("pause");
}