5-66
esp_set_resolution Set Axis Resolution
esp_get_resolution Report Axis Resolution Setting
Synopsis:
#include “esp6000.h”
int esp_set_resolution(long axis, float resolution, long units)
int esp_get_resolution(long axis, float *resolution, long *units)
Arguments:
long axis
axis number from 1-6
float resolution
define mechanical resolution
long units
define user units as ENCODER_COUNT (0), MOTOR_STEP (1),
MILLIMETER (2), MICROMETER (3), INCHES (4), MILLI_INCHES (5),
MICRO_INCHES (6), DEGREE (7), GRADIAN (8), RADIAN (9),
MILLIRADIAN (10), MICRORADIAN (11)
NOTE
ESP6000 motion UNITS are treated as labels only for user convenience. No
conversion is performed when units of measurement are changed from one unit to
another. Users will have to re-enter all affected motion parameters (e.g., speed)
when units are changed.
Resolution and units are automatically set the first time an ESP-compatible stage
is detected on that axis.
Library Location:
\esp6000.dll
Description:
esp_set_resolution() defines the mechanical resolution for the specified axis.
Returns:
ESPOK, ESPERROR
Hint:
No need to change resolution with ESP-compatible stages present
Usage Example:
#include “esp6000.h”
main()
{
long error, servotick;
if (!esp_init_system()) exit(-1);
/* define axis 1 resolution equal to 0.001 mm */
esp_set_resolution(1, 0.001, MILLIMETER);
/* check error status */
esp_get_error_num(&error,&ServoTick)
;
if (error) printf(“Error %d Reported!\r\n”, error);
}
See Also:
esp_set_speed(), esp_set_decel(), esp_set_accel(), esp_set_jerk()
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com