5-70
esp_set_microstep_factor
Set Microstep Factor
esp_get_microstep_factor
Report Microstep Factor Setting
Synopsis:
#include “esp6000.h”
int esp_set_microstep_factor(long axis, long factor)
int esp_get_microstep_factor(long axis, long *factor)
Arguments:
long axis
axis number from 1-6
long factor
microstepping factor 1 - 255
Library Location:
\esp6000.dll
Description:
esp_set_microstep_factor() provides the controller with the step motor microstepping
factor used on the motor driver. This API function call enables the ESP6000 to properly
calculate the number of step pulses to output in order to achieve desired encoder-based
position.
esp_get_microstep_factor() reports present microstepping factor setting in ESP6000
memory.
Returns:
ESPOK, ESPERROR
Hint:
Microstep factor is automatically set with ESP-compatible stepper stages.
Usage Example:
#include “esp6000.h”
main()
{
long error, servotick;
if (!esp_init_system() )
{
printf(“ESP6000 Not Initialized! \r\n”);
exit(-1);
}
/* Define Axis-1 Microstep Resolution */
esp_set_microstep_factor(1, 10);
/* Full-step resolution */
esp_set_fullstep_resolution(1, 0.001);
/* Save new settings to non-volatile memory */
esp_save_parameters();
/* check error status */
esp_get_error_num(&error,&ServoTick)
;
if (error) printf(“Error %d Reported!\r\n”, error);
}
See Also:
esp_set_fullstep_resolution()
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com