.

mpiMotionMemoryGet

Declaration

 
long mpiMotionMemoryGet(MPIMotion   motion,
                        void        *dst,
                        const void  *src,
                        long        count) 
 

Required Header: stdmpi.h
Change History: Modified in the 03.03.00

Description

mpiMotionMemoryGet copies count bytes of a Motion's (motion) memory (starting at address src) to application memory (starting at address dst).

 
Return Values
MPIMessageOK  

Sample Code


/* motionEStopRempVel(...) demonstrates how to read the 
EStopRamp velocity on a motion object directly through memory. 
mpiMotionMemory(...) obtains the motion control memory pointer. 
The pointer's address is then passed into mpiMotionMemoryGet(...)
to obtain the EStopRamp velocity. 
Note: MEIXmpMotionSupervisor *memory must be casted as (void *) 
in mpiMotionMemory(...).
*/

long motionEStopVelGet(MPIMotion   motion,
                       float       *EStopRampVel)
{
   MEIXmpMotionSupervisor *memory;
   long                   returnValue;

   /* Get MS control memory pointer */
   returnValue =
      mpiMotionMemory(motion, 
                     (void *)&memory);

   /* Get MS EStopRamp velocity */
   if(returnValue == MPIMessageOK)
   {
      returnValue = 
         mpiMotionMemoryGet(motion,
                            EStopRampVel,
                            &memory->FeedRate.EStopRamp.Vel,
                            sizeof(&memory->FeedRate.EStopRamp.Vel));
   }
   return returnValue;
}

See Also

mpiMotionMemorySet | mpiMotionMemory

 

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