Section 5 — Programming
5-93
esp_get_daq_status Retrieve Data Acquisition Status
Synopsis:
#include “esp6000.h”
int esp_get_daq_status(*count)
Arguments:
long count
number of samples collected
Library Location:
\esp6000.dll
Description:
esp_get_daq_status() returns the number of acquisitions collected.
This function can be used to monitor the status of data acquisitions.
Returns:
ESPOK, ESPERROR
Hint:
Usage Example:
#include “esp6000.h”
main()
{
long error, servotick;
long Num, DaqStat, Mode, count;
float DataArray[512];
if (!esp_init_system())
{
printf(“ESP6000 Not Initialized! \r\n”);
exit(-1);
}
/* Set ADC Gain and Range*/
esp_set_adc_gain(V10);
esp_set_adc_range(BIPOLAR);
/* Set Acquisition Mode */
esp_set_daq_mode(1, 1, 1, 1, 2, 512);
esp_enable_daq();
esp_enable_motor(1);
esp_move_absolute(1,50.0);
while(!esp_daq_done())
/* Wait for DAQ End */
{
esp_get_daq_status(&count);
printf(“%d acquisitions collected.\r”,count);
}
esp_disable_daq();
/* Retrieve Data */
esp_get_daq_data(DataArray, &Num, &DaqStat);
/* check error status */
esp_get_error_num(&error,&ServoTick)
;
if (error) printf(“Error %d Reported!\r\n”, error);
}
See Also:
esp_get_daq_done(), esp_set_daq_mode(), esp_enable_daq(), esp_disable_daq(),
esp_get_daq_data()
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com