5-72
esp_set_motor_current
Set UniDrive Axis Motor Current
esp_get_motor_current
Get UniDrive Axis Motor Current
Synopsis:
#include “esp6000.h”
int esp_set_motor_current(long axis, float current)
int esp_get_motor_current(long axis, float current)
Arguments:
long axis
axis number from 1-6
float current
motor current from 0 through 8.0 amps
Library Location:
\esp6000.dll
Description:
esp_set_motor_current() API function call is used to set the Unidrive6000 motor
amplifier current for the specified axis. To take immediate effect this command should
be followed with the esp_update_unidrive() command.
CAUTION
Motor damage can occur if current is set too high. Please refer to motor specifica-
tions before setting value.
Returns:
ESPOK, ESPERROR
Hint:
Usage Example:
#include “esp6000.h”
main()
{
long error, servotick;
if (!esp_init_system())
{
printf(“ESP6000 Not Initialized! \r\n”);
exit(-1);
}
/* Change Axis-1 Motor Current */
esp_motor_current(1, 1.9);
/* Update Unidrive6000 Axis-1 */
esp_update_unidrive(1);
/* Save new settings to non-volatile memory */
esp_save_parameters();
/* check error status */
esp_get_error_num(&error,&ServoTick)
;
if (error) printf(“Error %d Reported!\r\n”, error);
}
See Also:
esp_update_unidrive(), esp_save_parameters()
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com