#include "rsi.h"
#include "HelperFunctions.h"
void UserLimitPositionOneConditionMain()
{
using namespace RSI::RapidCode;
const int AXIS_NUMBER = 0;
const int POSITION = 5;
const int USER_UNITS = 1048576;
const int VELOCITY = 1;
const int ACCELERATION = 10;
const int DECELERATION = 10;
const int POSITION_INDEX = 0;
const int OUTPUT_INDEX = 0;
const int NODE_INDEX = 0;
char rmpPath[] = "C:\\RSI\\X.X.X\\";
SampleAppsCPP::HelperFunctions::CheckErrors(controller);
try
{
SampleAppsCPP::HelperFunctions::StartTheNetwork(controller);
SampleAppsCPP::HelperFunctions::CheckErrors(axis);
int userLimit = 1;
int condition = 0;
double limitValue = 10 * USER_UNITS;
condition,
limitValue);
int duration = 0;
triggerType,
action,
AXIS_NUMBER,
duration);
unsigned int andMask = output0->
MaskGet();
unsigned int orMask = output0->
MaskGet();
unsigned long outputAddress = output0->
AddressGet();
bool enableOutput = true;
andMask,
orMask,
outputAddress,
enableOutput);
printf("Waiting for axis to reach specified position\n");
{
}
system("pause");
}
{
printf(
"%s\n", err.
text);
}
system("pause");
}