Section 5 — Programming
5-41
esp_stop Stop Specified Axes
Synopsis:
#include “esp6000.h”
int esp_stop(long axis)
Arguments:
long axis
axis number from 1-6, axis = 0 stops all axes
Library Location:
\esp6000.dll
Description:
esp_stop() causes all axes in motion to immediately decelerate using deceleration rate
previously set by esp_set_decel() function call.
NOTE
All moving axes will be stopped when axis parameter is equal to zero (0).
Returns:
ESPOK, ESPERROR
Hint:
Usage Example:
#include “esp6000.h”
main()
{
long error, servotick;
if (!esp_init_system()) exit(-1);
/* set axis 1 trajectory parameters */
esp_set_speed(1, 30.0);
esp_set_accel(1, 200.0);
esp_set_decel(1, 150.0);
esp_enable_motor(1);
/* set axis 1 to jog trajectory mode */
esp_set_traj_mode(1,JOG);
/* set axis 1 speed and direction */
esp_set_jog_speed(1, -20.0);
•
•
•
/* stop motion */
esp_stop(1);
}
See Also:
esp_stop_all()
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com