Section 5 — Programming
5-25
esp_set_dac_offset Set Axis DAC Offset Compensation
esp_get_dac_offset Report Axis DAC Offset Compensation Setting
Synopsis:
#include “esp6000.h”
int esp_set_dac_offset(long axis, float offset)
int esp_get_dac_offset(long axis, float *offset)
Arguments:
long axis
axis number from 1-6
float offset
DAC offset from +1.0 volt to -1.0 volt
Library Location:
\esp6000.dll
Description:
esp_set_dac_offset() defines DAC offset compensation for the specified axis. DAC
offset takes affect immediately after the command is processed by the DSP.
Save DAC offset to non-volatile flash memory with the save_parameters() command.
This will cause the DSP to automatically use this value after system reset or reboot.
esp_get_dac_offset() reports the present DAC offset compensation used for the speci-
fied axis.
DAC offset compensation is necessary on servo axes to prevent motor drift during motor
off conditions.
Returns:
ESPOK, ESPERROR
Hint:
Usage Example:
#include “esp6000.h”
main()
{
if (!esp_init_system())
{
printf(“ESP6000 Not Initialized! \r\n”);
exit(-1);
}
/* Set Axis 1 DAC Offset */
esp_set_dac_offset(1, -0.075);
/* Save Offset To Non-volatile Memory */
esp_save_parameters();
}
See Also:
esp_save_parameters()
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com