MPI 04.00 Reference >> mpiMotion
MPIMotionPathAttrMask
Definition
typedef enum MPIMotionPathAttrMask { MPIMotionPathAttrMaskNONE = 0, MPIMotionPathAttrMaskBEHAVIOR = 1 << 1, MPIMotionPathAttrMaskRELATIVE_MOVE = 1 << 2, MPIMotionPathAttrMaskID = 1 << 3, MPIMotionPathAttrMaskELEMENT_ID = 1 << 4, MPIMotionPathAttrMaskRETAIN = 1 << 5, MPIMotionPathAttrMaskEMPTY_COUNT = 1 << 6, MPIMotionPathAttrMaskLOW_COUNT = 1 << 7, MPIMotionPathAttrMaskNO_HANDSHAKE = 1 << 8, MPIMotionPathAttrMaskEXPECTED_AXES = 1 << 9, MPIMotionPathAttrMaskHOLD = 1 << 10, MPIMotionPathAttrMaskOUTPUT = 1 << 11, MPIMotionPathAttrMaskNO_WAIT = 1 << 12, } MPIMotionPathAttrMask;
Required Header: stdmpi.h
Change History: Updated in 04.00.01.
Description
MPIMotionPathAttrMask is used to specify which motion attributes to use and what members of MPIMotionPointToPointAttributes are valid.
BEHAVIOR | Used to select a non-default behavior for the motion. The behavior field of MPIMotionPathAttributes contains the type information. |
---|---|
ID | When starting the move, fill out the Move ID field of all of the commanded axes. The id field of MPIMotionPathAttributes contains the ID value to use. |
ELEMENT_ID | When starting each segment of the move, fill out the Element ID field of the appropriate axis. The elementId field of MPIMotionPathAttributes contains the ID value to use. |
RETAIN | Store the points in an internal buffer after execution. This feature is useful for backing up on path. |
EMPTY_COUNT | Controlls path-based deceleration when out of points. An E_STOP is triggered if the number of points in the controller’s buffer falls below the value of the emptyCount field of MPIMotionPathAttributes and if there are still points to be downloaded. If not set, the default value is 5. To disable path-based deceleration, set the value to zero. |
LOW_COUNT | Controls fetching of new points from the host into the controller’s buffer. If all of the points will not fit into the buffer, the value of the lowCount field of MPIMotionPathAttributes is used as the number of points below which to trigger the fetch. If not set, the LOW_COUNT default value is 4. Note FrameBufferSize is configurable. By default frameBufferSize is 128. Therefore, if no changes are made, LOW_COUNT default is 32. |
NO_HANDSHAKE | Does NOT wait for the handshake between the MPI and controller to begin the motion trajectory profile execution. This attribute is useful for faster function call return times, typically in single threaded or time critical applications. |
EXPECTED_AXES | Specify the number of expected axes. This is checked against the number of currently mapped axes, and if they don’t match an error will result. The expectedAxes field of MPIMotionPathAttributes contains the number of expected axes. |
HOLD | Prevent the move from executing until a specific trigger condition is met. The groupHold field of MPIMotionPathAttributes contains the configuration data. |
OUTPUT | Set or clear bits during the move. The outputCount and outputs fields of MPIMotionPathAttributes contain the configuration data. |
NO_WAIT | Does NOT wait for the controller to acknowledge the commanded move, does NOT wait for the controller to return an error code, and applies the conditions for NO_HANDSHAKE.
This attribute is useful for faster function call return times, typically in single threaded or time critical applications. WARNING! NO_WAIT causse the MPI to ignore return codes from the controller during the move command profile calculation and loading. Your application will NOT know if the move profile failed to start due to a Profile Error, Frame Buffer Overflow, Illegal Delay time, or other error condition. To work around the missing error reporting, your application should check for a MOTION_START and MOTION_DONE event to determine if the axis moved. WARNING! NO_WAIT prevents the move command from reporting the auto-start condition if the AUTOSTART_NOTIFY is specified. |
Remarks
If you specify both NO_HANDSHAKE and NO_WAIT the MPI applies the NO_WAIT attribute, which includes the NO_HANDSHAKE logic.
If your application calls mpiMotionStatus(…) immediately after commanding a move with the NO_HANDSHAKE or NO_WAIT attribute, the state is reported as MPIStateIDLE until the controller begins the profile execution and the state transitions to MPIStateMOVING. It is strongly recommended to use notify/events, instead of polling motion/axis/motor status