MPIMotionAttrHold
Definition
typedef struct MPIMotionAttrHold {
MPIMotionAttrHoldType type;
union {
long gate;
struct {
long number;
long mask;
long pattern;
} motor;
struct {
MPIMotionAttrHoldLogicType logic;
long number;
long position;
} axis;
struct {
long *address;
long mask;
long 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;
long index;
long 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
