5-40
esp_get_motion_status Report Motion Status For All Axes (Continued)
Usage Example:
#include “esp6000.h”
main()
{
long error, servotick, mstat;
double position;
if (!esp_init_system())
{
printf(“ESP6000 Not Initialized! \r\n”);
exit(-1);
}
/* enable motor power */
esp_enable_motor(1);
esp_enable_motor(2);
/* move axis 2 to absolute position -3.0 */
esp_move_absolute(1,+5.0);
esp_move_absolute(2,-3.0);
esp_get_motion_status(&mstat);
/* loop while axis 1 & 2 are still moving */
while(mstat && 0x03)
esp_get_motion_status(&mstat);
/* check error status */
esp_get_error_num(&error,&ServoTick) ;
if (error) printf(“Error %d Reported!”, error);
}
See Also:
esp_move_done()
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com