5-36
esp_find_home Invoke Axis Home Search
Synopsis:
#include “esp6000.h”
int esp_find_home(long axis, mode)
Arguments:
long axis
axis number from 1-6
long mode
define homing mode as HOMEONLY(0), HOMEINDEX (1)
Library Location:
\esp6000.dll
Description:
esp_find_home() invokes specified homing algorithm on the designated axis.
In all homing modes the controller attempts to reduce, or eliminate, mechanical backlash
by always approaching the final position from the same direction.
HOMEONLY - During this mode the axis finds the home signal transition.
HOMEINDEX - During this mode the axis finds the index signal immediately following
the home signal.
NOTE
Only one axis can be in homing mode at any one time.
At the end of a successful homing sequence the axis position counter is automati-
cally set to position count zero (0). All absolute motion commands will then be
referenced to this position.
Returns:
ESPOK, ESPERROR
Hint:
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_home_done()
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com