Auxiliary Axes
The Linear, CenterAndLengthCircular, CenterAndEndCircular, ThroughAndEndCircular, LengthAndEndCircular, RadiusAndEndCircular, and ThroughAndEnd3DCircular segments allow up to maxPathIntplLookaheadAuxiliaryAxes auxiliary axes to be specified.
Adding auxiliary axes will not affect the motion of the other axes in the interpolation. The auxiliary axes will linearly interpolate with the motion of the other axes in the interpolation to move to the specified target positions.
Auxiliary axes must be one of the axes specified to the SetPathIntplLookaheadConfiguration function when configuring the path interpolation with look ahead channel. The axis is specified using the axis member of the PathIntplLookaheadConfiguration class.
Auxiliary Axes Example
The following sample code executes a 3D circular interpolation with auxiliary axes.
//Create the path interpolation with look ahead buffer
wmxlib_AdvancedMotion->advMotion->CreatePathIntplLookaheadBuffer(0, 1000);
//Configure the path interpolation with look ahead channel
AdvMotion::PathIntplLookaheadConfiguration conf;
conf.axisCount = 4;
conf.axis[0] = 0;
conf.axis[1] = 1;
conf.axis[2] = 2;
conf.axis[3] = 3;
conf.compositeVel = 1000;
conf.compositeAcc = 4000;
wmxlib_AdvancedMotion->advMotion->SetPathIntplLookaheadConfiguration(0, &conf);
//Add the path interpolation with look ahead commands
AdvMotion::PathIntplLookaheadCommand path;
path.numPoints = 2;
path.point[0].type = AdvMotion::PathIntplLookaheadSegmentType::ThroughAndEnd3DCircular;
path.point[0].data.throughAndEnd3DCircular.axis[0] = 0;
path.point[0].data.throughAndEnd3DCircular.axis[1] = 1;
path.point[0].data.throughAndEnd3DCircular.axis[2] = 2;
path.point[0].data.throughAndEnd3DCircular.throughPos[0] = 707.1;
path.point[0].data.throughAndEnd3DCircular.throughPos[1] = 292.9;
path.point[0].data.throughAndEnd3DCircular.throughPos[2] = 0;
path.point[0].data.throughAndEnd3DCircular.endPos[0] = 1000;
path.point[0].data.throughAndEnd3DCircular.endPos[1] = 1000;
path.point[0].data.throughAndEnd3DCircular.endPos[2] = 0;
path.point[0].data.throughAndEnd3DCircular.auxiliaryAxisCount = 1;
path.point[0].data.throughAndEnd3DCircular.auxiliaryAxis[0] = 3;
path.point[0].data.throughAndEnd3DCircular.auxiliaryTarget[0] = 500;
path.point[1].type = AdvMotion::PathIntplLookaheadSegmentType::ThroughAndEnd3DCircular;
path.point[1].data.throughAndEnd3DCircular.axis[0] = 0;
path.point[1].data.throughAndEnd3DCircular.axis[1] = 1;
path.point[1].data.throughAndEnd3DCircular.axis[2] = 2;
path.point[1].data.throughAndEnd3DCircular.throughPos[0] = 292.9;
path.point[1].data.throughAndEnd3DCircular.throughPos[1] = 707.1;
path.point[1].data.throughAndEnd3DCircular.throughPos[2] = 0;
path.point[1].data.throughAndEnd3DCircular.endPos[0] = 0;
path.point[1].data.throughAndEnd3DCircular.endPos[1] = 0;
path.point[1].data.throughAndEnd3DCircular.endPos[2] = 0;
path.point[1].data.throughAndEnd3DCircular.auxiliaryAxisCount = 1;
path.point[1].data.throughAndEnd3DCircular.auxiliaryAxis[0] = 3;
path.point[1].data.throughAndEnd3DCircular.auxiliaryTarget[0] = 1000;
wmxlib_AdvancedMotion->advMotion->AddPathIntplLookaheadCommand(0, &path);
//Execute path interpolation with look ahead
wmxlib_AdvancedMotion->advMotion->StartPathIntplLookahead(0);
//Wait for the path interpolation with look ahead to complete
AdvMotion::PathIntplLookaheadStatus pathStatus;
wmxlib_AdvancedMotion->advMotion->GetPathIntplLookaheadStatus(0, &pathStatus);
while(pathStatus.remainCommandCount > 0) {
Sleep(10);
wmxlib_AdvancedMotion->advMotion->GetPathIntplLookaheadStatus(0, &pathStatus);
}
//Move the axes to Idle state
wmxlib_AdvancedMotion->advMotion->StopPathIntplLookahead(0);
//Wait until the path interpolation with look ahead is in Stopped state
wmxlib_AdvancedMotion->advMotion->GetPathIntplLookaheadStatus(0, &pathStatus);
while(pathStatus.state != AdvMotion::PathIntplLookaheadState::Stopped) {
Sleep(10);
wmxlib_AdvancedMotion->advMotion->GetPathIntplLookaheadStatus(0, &pathStatus);
}
//Free the path interpolation with look ahead buffer (normally, the buffer should only be freed at the end of the application)
wmxlib_AdvancedMotion->advMotion->FreePathIntplLookaheadBuffer(0);
The following plots show the position, velocity, and acceleration of each axis when the above sequence is executed from position (0, 0).
