Section 5 — Programming
5-37
esp_move_done Return Move Completion Status
Synopsis:
#include “esp6000.h”
int esp_move_done(long axis)
Arguments:
long axis
axis number from 1-6, axis=0 tests for all axes
Library Location:
\esp6000.dll
Description:
esp_move_done() returns the moving/not moving status of the specified axis 1 - 6.
If axis parameter = 0 then the returned value is the combined logical OR of all axes.
This function returns 0 (ESPNOTDONE) while the axis has not completed the move
and a 1 (ESPDONE) when finished.
Returns:
ESPDONE, ESPNOTDONE
Hint:
Usage Example:
#include “esp6000.h”
main()
{
long error, servotick;
double position;
if (!esp_init_system())
{
printf(“ESP6000 Not Initialized! \r\n”);
exit(-1);
}
/* enable motor power */
esp_enable_motor(2);
/* move axis 2 to absolute position -3.0 */
esp_move_absolute(2,-3.0);
while (!esp_move_done(2));
/* check error status */
esp_get_error_num(&error,&ServoTick)
;
if (error) printf(“Error %d Reported!\r\n”, error);
}
See Also:
esp_home_done()
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com