5-38
esp_home_done Return Home Search Completion Status
Synopsis:
#include “esp6000.h”
bool esp_home_done(long axis)
Arguments:
long axis
axis number from 1-6, axis = 0 tests for all axes
Library Location:
\esp6000.dll
Description:
esp_home_done() returns the home search 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 ESPNOTDONE (0) while the axis is homing. ESPDONE (1)
is returned when the axis is no longer in homing mode.
Returns:
ESPDONE, ESPNOTDONE
Hint:
Query for possible motion/system errors after homing.
Usage Example:
#include “esp6000.h”
main()
{
long error, servotick;
if (!esp_init_system())
{
printf(“ESP6000 Not Initialized! \r\n”);
exit(-1);
}
/* Enable Axis 2 Motor Power */
esp_enable_motor(2);
/* Set Axis Home Speed */
esp_set_home_speed(2,20.0);
/* Begin Home Search On Axis 2 */
esp_find_home(2,1);
/* Wait For Home Search Completion */
while (!esp_home_done(2));
/* check error status */
esp_get_error_num(&error,&ServoTick)
;
if (error) printf(“Error %d Reported!\r\n”, error);
}
See Also:
esp_set_home_speed(), esp_find_home()
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com