5-58
esp_enable_motor Enable Motor Power
Synopsis:
#include “esp6000.h”
int esp_enable_motor(long axis)
Arguments:
long axis
axis number from 1-6
Library Location:
\esp6000.dll
Description:
esp_enable_motor() enables motor power to specified axes. After this API call DC
motors will servo on target position and stepper motors will have torque applied.
NOTE
The AMP ENABLE signal is set TRUE on the 100-pin motor I/O connector.
All axes are automatically disabled after system initialization or reset.
Returns:
ESPOK, ESPERROR
Hint:
Usage Example:
#include “esp6000.h”
main()
{
long error, servotick;
double position;
if (!esp_init_system())
{
printf(“ESP6000 Not Initialized! \r\n”);
exit(-1);
}
/* enable motor power */
esp_enable_motor(2);
/* move axis 2 to absolute position -3.0 */
esp_move_absolute(2,-3.0);
while (!esp_move_done(2));
/* check error status */
esp_get_error_num(&error,&ServoTick)
;
if (error) printf(“Error %d Reported!”, error);
/* disable motor power */
esp_disable_motor(2);
}
See Also:
esp_disable_motor(), esp_get_motor_onoff_status()
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com