APIs, concepts, guides, and more

◆ PhantomAxisReset()

void PhantomAxisReset ( Axis phantomAxis)
static
Parameters
phantomAxisAxis object of type RSIMotorTypePHANTOM.
Code Snippet
public static void PhantomAxisReset(Axis phantomAxis)
{
if (phantomAxis.MotorTypeGet() != RSIMotorType.RSIMotorTypePHANTOM)
{
throw new Exception(@$"Axis {phantomAxis.NumberGet()} is not configured as a phantom axis.
Please ensure the axis is set to phantom before calling PhantomAxisConfigure.");
}
// abort any motion
AbortMotionObject(phantomAxis);
// disable all limits (not used for phantom axes)
phantomAxis.ErrorLimitActionSet(RSIAction.RSIActionNONE);
phantomAxis.HardwareNegLimitActionSet(RSIAction.RSIActionNONE);
phantomAxis.HardwarePosLimitActionSet(RSIAction.RSIActionNONE);
phantomAxis.HomeActionSet(RSIAction.RSIActionNONE);
phantomAxis.SoftwareNegLimitActionSet(RSIAction.RSIActionNONE);
phantomAxis.SoftwarePosLimitActionSet(RSIAction.RSIActionNONE);
// set position tolerances to max value for immediate MotionDone
double POSITION_TOLERANCE_MAX = Double.MaxValue / 10.0;
phantomAxis.PositionToleranceCoarseSet(POSITION_TOLERANCE_MAX);
phantomAxis.PositionToleranceFineSet(POSITION_TOLERANCE_MAX);
// set sample apps default motion parameters
phantomAxis.UserUnitsSet(1);
phantomAxis.DefaultVelocitySet(100);
phantomAxis.DefaultAccelerationSet(1000);
phantomAxis.DefaultDecelerationSet(1000);
phantomAxis.DefaultJerkPercentSet(0);
phantomAxis.PositionSet(0);
}

Definition at line 144 of file _helpers.cs.