#include "rsi.h"
#include "HelperFunctions.h"
void FinalVelocityMain()
{
using namespace RSI::RapidCode;
const int AXIS_NUMBER = 0;
const int USER_UNITS = 1048576;
const int RELATIVE_POSITION = 50;
const int VELOCITY = 10;
const int ACCELERATION = 100;
const int DECELERATION = 100;
const int JERK_PCT = 50;
const int FINAL_VELOCITY = 5;
char rmpPath[] = "C:\\RSI\\X.X.X\\";
SampleAppsCPP::HelperFunctions::CheckErrors(controller);
try
{
SampleAppsCPP::HelperFunctions::StartTheNetwork(controller);
SampleAppsCPP::HelperFunctions::CheckErrors(axis);
printf("\nFinal Velocity Example");
printf("\nSCurve Motion in progress...\n");
VELOCITY,
ACCELERATION,
DECELERATION,
JERK_PCT,
FINAL_VELOCITY);
controller->
OS->
Sleep(8000);
printf("\nSCurve Motion Done\n");
printf(
"\nMotor now spinning at a speed of %f revs/sec\n", axis->
ActualVelocityGet());
controller->OS->
Sleep(2500);
printf("\nMotor Stopped\n");
}
{
printf(
"%s\n", err.
text);
}
system("pause");
}