#include <iostream>
#include <fstream>
#include "rsi.h"
#include "HelperFunctions.h"
void pathMotionMain()
{
const int AXIS_X = 0;
const int AXIS_Y = 1;
const double UserUnits = 600000;
double running_x = 0;
double running_y = 0;
double line_A[2] = { running_x, running_y };
running_x += -5.746;
double line_B[2] = { running_x, running_y };
running_y += -2.537;
double line_C[2] = { running_x, running_y };
running_x += 1.025;
double line_D[2] = { running_x, running_y };
running_y += (-0.525);
double arc_center_A[2] = { running_x,running_y };
running_x += (0.525);
running_y += -1.875;
double line_E[2] = { running_x, running_y };
running_x += -0.525;
double arc_center_B[2] = { running_x,running_y };
running_y += -0.525;
running_x += -2.07;
double line_F[2] = { running_x, running_y };
running_y += 0.525;
double arc_center_C[2] = { running_x,running_y };
running_x += -0.525;
running_y += 1.875;
double line_G[2] = { running_x, running_y };
running_x += 0.525;
double arc_center_D[2] = { running_x,running_y };
running_y += 0.525;
running_x += 1.02;
double line_H[2] = { running_x, running_y };
running_y += 2.538;
double line_I[2] = { running_x, running_y };
running_x += -1.581;
double line_J[2] = { running_x, running_y };
running_x += -0.47;
running_y += -0.471;
double line_K[2] = { running_x, running_y };
try
{
axisX = controller->
AxisGet(AXIS_X);
axisY = controller->
AxisGet(AXIS_Y);
axisX->
HomeMethodSet(RSIHomeMethod::RSIHomeMethodCURRENT_POSITION);
axisY->
HomeMethodSet(RSIHomeMethod::RSIHomeMethodCURRENT_POSITION);
std::ofstream myfile;
myfile.open("path.csv");
myfile << "samples,x,y,\n";
}
myfile.close();
printf("path.csv");
}
{
printf(
"\n%s\n", err.
text);
}
system("pause");
}