.

mpiAxisOriginSet

Declaration

 
long mpiAxisOriginSet(MPIAxis  axis,
                      double   origin) 
  Required Header: stdmpi.h

Description

mpiAxisOriginSet sets the value of the origin of an Axis (axis) to origin.

 
axis a handle to the Axis object.
origin value to which the Axis Origin will be set
   
 
Return Values  
MPIMessageOK  

Sample Code


/* Set axis actual position to be zero by changing origin */
void zeroPosition(MPIMotion motion, MPIAxis axis) { double actualPosition;
double commandPosition;
double originValue;
long returnValue;
returnValue =
mpiMotionPositionGet(motion,
&actualPosition,
&commandPosition);
msgCHECK(returnValue);

/* Always do a ConfigGet before a ConfigSet */
returnValue =
mpiAxisOriginGet(axis,
&originValue);
msgCHECK(returnValue);

returnValue =
mpiAxisOriginSet(axis,
originValue+actualPosition);
msgCHECK(returnValue);
/* Now actual position is 0 */
}

See Also

mpiAxisOriginGet | Using the Origin Variable | Controller Positions

 

       Legal Notice  |  Tech Email  |  Feedback
      
Copyright ©
2001-2010 Motion Engineering