MPIMotionAttrHold
Definition
typedef struct MPIMotionAttrHold { MPIMotionAttrHoldType type; union { int32_t gate; struct { int32_t number; int32_t mask; int32_t pattern; } motor; struct { MPIMotionAttrHoldLogicType logic; int32_t number; int32_t position; } axis; struct { int32_t *address; int32_t mask; int32_t pattern; } user; } source; double timeout; } MPIMotionAttrHold;
Required Header: stdmpi.h
Change History: Modified in 04.00.
Description
MPIMotionAttrHold combines existing MPIMotionAttrHold and MPIMotionAttrHoldSource, and moves logic type from attributes to the structure itself.
Sample Code
The following code takes a set of position, velocity, and acceleration values and starts a multi-axis coordinated move.
void startMove(MPIMotion motion, double position, double velocity, double acceleration) { MPI_RESULT returnValue; int32_t index; int32_t axisCount; double *pos; mpiMotionAxisCount(motion, &axisCount); pos = malloc(sizeof(double) * axisCount); for(index = 0; index < axisCount; index++) { pos[index] = position; } returnValue = mpiMotionSimpleTrapezoidalCartesian(motion, pos, velocity, acceleration); msgCHECK(returnValue); free(pos); }
See Also
MPIMotionAttrHoldType | MPIMotionAttrHoldSource | MPIMotionAttrMask