Ejemplo n.º 1
0
int TestPtToPtAndCoordOutPts()
{
	
	int iModule;
	int iError;
	double dX, dY, dZ;

	iError=InitNMCModule3Axis (iModule);

	g_stage.SetVel(3.0, 3.0, 3.0);
	g_stage.SetAccel(1.0, 1.0, 1.0);

//	g_stage.EnableAmp();
//	g_stage.ResetPos();
//	g_stage.SetPathStatus();

//Initialize path control module parameters
	g_stage.SetPathFreq(P_60HZ);
	g_stage.SetNumberOfPoints(75);
	g_stage.SetScale(15000.0, 15000.0, 15000.0);
	g_stage.SetPathAcceleration(0.175);
	g_stage.SetFeedrate(0.175);         //feedrate = 1.0 inches/second
	g_stage.SetTangentTolerance(10.0);  //continuous path tangent tolerence = 10 degrees
	g_stage.SetPathParams();     //acceleration = 1.0 inch/second/second
	g_stage.SetOrigin( 0.0, 0.0, 0.0 ); //set the origin to X = 0, Y = 0, Z = 0
	
//	g_stage.ClosePointsOut();

	return 0;
};
Ejemplo n.º 2
0
int InitPathParam(int pathFreq, int numberOfPts,
				  double xScale, double yScale, double zScale,
				  double pathAccel,
				  double feedrate)
{

//Initialize path control module parameters
	g_stage.SetPathFreq(pathFreq);
	g_stage.SetNumberOfPoints(numberOfPts);
	g_stage.SetScale(xScale, yScale, zScale);
	g_stage.SetPathAcceleration(pathAccel);
	g_stage.SetFeedrate(feedrate);
	g_stage.SetPathParams();     //acceleration = 1.0 inch/second/second


	g_stage.SetOrigin(0.0, 0.0, 0.0); //set the origin to X = 0, Y = 0, Z = 0
	g_stage.SetFeedrate(1.0);         //feedrate = 1.0 inches/second
	g_stage.SetTangentTolerance(10.0);  //continuous path tangent tolerence = 10 degrees

	return 0;
}