Console.WriteLine("📜 Motion Hold: via Digital Input");
const int DIGITAL_INPUTS_PDO_INDEX = 3;
try
{
{
Console.WriteLine("Network not started. Please start it before running this app.");
return;
}
Axis axis = controller.
AxisGet(Constants.AXIS_0_INDEX);
Console.WriteLine("\tFirst motion commanded (held until digital input triggers)");
Console.WriteLine("\tSecond motion commanded (held until digital input triggers)");
Console.WriteLine("\tThird motion commanded (no hold, executes immediately)");
Console.WriteLine($"\tFinal position: {axis.CommandPositionGet()}");
}
finally
{
}
static void AbortMotionObject(RapidCodeMotion motionObject)
Aborts motion on the given RapidCodeMotion object (Axis or MultiAxis), waits for motion to stop,...
static void CheckErrors(RapidCodeObject rsiObject)
Checks for errors in the given RapidCodeObject and throws an exception if any non-warning errors are ...
static void PhantomAxisReset(Axis phantomAxis)
Configures a phantom axis on the controller.
Helpers class provides static methods for common tasks in RMP applications.
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,...
Axis * AxisGet(int32_t axisNumber)
AxisGet returns a pointer to an Axis object and initializes its internals.
RSINetworkState NetworkStateGet()
static MotionController * Get()
Get an already running RMP EtherCAT controller.
uint64_t NetworkInputAddressGet(int32_t index)
void Delete(void)
Delete the MotionController and all its objects.
Represents the RMP soft motion controller. This class provides an interface to general controller con...
int32_t MotionDoneWait()
Waits for a move to complete.
void MotionHoldUserMaskSet(int32_t holdMask)
Sets the Motion Hold User bit mask.
void MotionHoldUserPatternSet(int32_t pattern)
Sets the Motion Hold User pattern bit mask.
void MotionAttributeMaskOffSet(RSIMotionAttrMask maskOff)
Turn off a particular motion attribute mask.
void MotionHoldTypeSet(RSIMotionHoldType type)
Set the motion hold type.
void MotionHoldUserAddressSet(uint64_t address)
Sets the Motion Hold User Address.
int32_t AmpEnableSet(bool enable, int32_t ampActiveTimeoutMilliseconds=AmpEnableTimeoutMillisecondsDefault, bool overrideRestrictedState=false)
Enable all amplifiers.
void MotionAttributeMaskOnSet(RSIMotionAttrMask maskOn)
Turn on a particular motion attribute mask.
RSINetworkState
State of network.
RSIMotionAttrMask
Attribute masks for motion. You cannot mix RSIMotionAttrMaskDELAY and RSIMotionAttrMaskAPPEND.
RSIMotionHoldType
Types for MotionHold attribute.