- Description:
- MotionHoldTypeSet sets the motion hold type.
- Parameters
-
type | Use RSIMotionAttrHoldType. |
Part of the Motion Configuration method group.
- Sample Code:
- MotionHoldByDigitalInput
const int DIGITAL_INPUTS_PDO_INDEX = 3;
axis.MotionHoldUserAddressSet(inputAddress);
axis.MotionHoldUserMaskSet(0x20000);
axis.MotionHoldUserPatternSet(0x20000);
axis.MoveRelative(10);
axis.MotionDoneWait();
axis.MoveRelative(10);
axis.MotionDoneWait();
axis.MoveRelative(10);
axis.MotionDoneWait();
axis.Abort();
axis.ClearFaults();
- Note
- To hold execution of motion, you can use Motion Hold.
If you need to hold execution based on a particular bit turning ON or OFF, use RSIMotionAttrHoldTypeUSER_ADDRESS. With RSIMotionAttrHoldTypeUSER_ADDRESS, the logic in the MotionController firmware goes something like this:
andResult = ( userAddressValue & mask);
if (andResult == pattern)
releaseHold();
If using RSIMotionAttrHoldTypeUSER_ADDRESS or GATE, be sure to set RSIMotionAttrMaskHOLD before starting motion.
If using RSIMotionAttrHoldTypeAXIS_POSITION_COMMAND be sure to set RSIMotionAttrMaskHOLD or LESS before starting motion.
- See also
- MotionHoldTypeGet
- Examples
- MotionHoldReleasedBySoftwareAddress.cpp.