Esp_Set_Position(Long Axis, Double Position); Esp_Get_Position(Long Axis, Double *Position) - Newport ESP6000 User Manual

Motion controller/driver
Table of Contents

Advertisement

esp_set_position Set Position Count To Specified Value
esp_get_position Report Position Count
Synopsis:
Arguments:
Library Location:
Description:
Returns:
Usage Example:
See Also:
Section 5 — Programming
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
#include "esp6000.h"
int esp_set_position (long axis, double count)
int esp_get_position (long axis, double *count)
long axis
Axis number from 1-8. Channels 7 & 8 are auxiliary counters.
double count
position count or steps in user units
\esp6000.dll
esp_get_position() reports the current position count or steps for the specified axis.
If bit-8 of esp_set_feedback_config() command is set then esp_get_position() reports
encoder feedback in user units. If bit-8 is 0 and the axis motor type is stepper then
esp_get_position() reports step count in user units.
esp_set_position() sets the current position count to the value specified for the selected
axis.
ESPOK, ESPERROR
Hint:
Position count is normally set to zero (0) after a home search.
#include "esp6000.h"
main()
{
long error, servotick; double position;
if (!esp_init_system())
{
printf("ESP6000 Not Initialized! \r\n");
exit(-1);
}
/* report axis 1 position count */
esp_get_position(1,&position);
• • •
/* zero axis 1 position count */
esp_set_position(1, 0.0);
}
esp_find_home()
5-69

Advertisement

Table of Contents
loading

This manual is also suitable for:

Unidrive6000

Table of Contents