5-12
esp_set_motor_type Set Axis Motor Type
esp_get_motor_type Report Axis Motor Type Setting
Synopsis:
#include “esp6000.h”
int esp_set_motor_type(long axis, long mtype)
int esp_get_motor_type(long axis, long *mtype)
Arguments:
long axis
axis number from 1-6
long mtype
possible motor types are (0)UNDEFINED, (1)DCSERVO,
(2)STEPPER
Library Location:
\esp6000.dll
Description:
esp_set_motor_type() defines the motor type or technology used to control the speci-
fied axis.
esp_get_motor_type() reports the motor type or technology used to control the speci-
fied axis.
This is necessary because the ESP6000 needs to apply different control algorithms for
different motor types. For example, DC servos are controlled via digital-to-analog
converter (DAC) whereas stepper motors are positioned via digital rate multiplier.
NOTE
It will not be possible to control an axis if its motor type is undefined or equal to
zero (0).
Motor type is automatically set for ESP-compatible stages.
Returns:
ESPOK, ESPERROR
Hint:
Verify motor/stage is a defined motor type.
Usage Example:
#include “esp6000.h”
main()
{
if (!esp_init_system()) exit(-1);
/* define axis 1 as DC servo */
esp_set_motor_type(1, DCSERVO);
/* Save new settings to non-volatile memory */
esp_save_parameters();
}
See Also:
esp_save_parameters()
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com