5-80
esp_set_ki Set PID Integral Gain (Ki)
esp_get_ki Report PID Integral Gain (Ki) Setting
Synopsis:
#include “esp6000.h”
int esp_set_ki(long axis, float ki)
int esp_get_ki(long axis, float *ki)
Arguments:
long axis
axis number from 1-6
float kp
integral gain
Library Location:
\esp6000.dll
Description:
esp_set_ki() sets the integral gain (ki) of the PID servo filter.
esp_get_ki() reports the integral gain (ki) setting.
NOTE
If necessary, use the ESP-tune utility to optimize servo PID and feedforward
parameters.
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);
}
/* set PID gain */
esp_set_kp(1,100.0);
esp_set_kd(1,200.0);
esp_set_ki(1,50.0);
esp_set_il(1,50.0);
/* transfer PID to working registers */
esp_update_filter();
/* save parameters to ESP6000 Flash EPROM */
esp_save_parameters();
/* check error status */
esp_get_error_num(&error,&ServoTick) ;
if (error) printf(“Error %d Reported!”, error);
}
See Also:
esp_set_kd(), esp_set_moving_kp(), esp_set_il(), esp_update_filter()
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com