Console.WriteLine("📜 Motion Hold: via Position");
const double TRIGGER_POSITION = 1;
const int MOVING_AXIS_TARGET = 10;
const int HOLDING_AXIS_TARGET = 2;
try
{
Helpers.PhantomAxisReset(holdingAxis);
Helpers.PhantomAxisReset(movingAxis);
Console.WriteLine($"\tHolding axis commanded to move to {HOLDING_AXIS_TARGET}, but motion is held");
Console.WriteLine($"\tMoving axis to {MOVING_AXIS_TARGET} to release hold...");
Console.WriteLine($"\tHolding axis final position: {holdingAxis.CommandPositionGet()} (expected: {HOLDING_AXIS_TARGET})");
Console.WriteLine($"\tMoving axis final position: {movingAxis.CommandPositionGet()} (expected: {MOVING_AXIS_TARGET})");
Helpers.AbortMotionObject(holdingAxis);
Helpers.AbortMotionObject(movingAxis);
}
finally
{
controller.Delete();
}
Constants used in the C# sample apps.
const int AXIS_0_INDEX
Default: 0.
const int AXIS_1_INDEX
Default: 1.
void MoveRelative(double relativePosition, double vel, double accel, double decel, double jerkPct)
Command a relative point-to-point S-Curve motion.
Represents a single axis of motion control. This class provides an interface for commanding motion,...
static MotionController * Get()
Get an already running RMP EtherCAT controller.
Represents the RMP soft motion controller. This class provides an interface to general controller con...
void MotionHoldAxisPositionSet(double position)
Sets the Axis position.
int32_t MotionDoneWait()
Waits for a move to complete.
void MotionHoldTypeSet(RSIMotionHoldType type)
Set the motion hold type.
void MotionHoldAxisNumberSet(int32_t number)
Sets the Axis number for Motion Hold.
int32_t AmpEnableSet(bool enable, int32_t ampActiveTimeoutMilliseconds=AmpEnableTimeoutMillisecondsDefault, bool overrideRestrictedState=false)
Enable all amplifiers.
int32_t NumberGet()
Get the axis number.
void MotionAttributeMaskOnSet(RSIMotionAttrMask maskOn)
Turn on a particular motion attribute mask.
void MotionHoldAxisLogicSet(RSIUserLimitLogic logic)
Set the logic when holding for Axis ActualPosition.
RSIUserLimitLogic
Logic options for User Limits.
RSIMotionAttrMask
Attribute masks for motion. You cannot mix RSIMotionAttrMaskDELAY and RSIMotionAttrMaskAPPEND.
RSIMotionHoldType
Types for MotionHold attribute.
Helpers namespace provides utility functions for common tasks in RMP applications.