Newport ESP6000 User Manual page 159

Motion controller/driver
Table of Contents

Advertisement

esp_get_daq_status Retrieve Data Acquisition Status
Synopsis:
Arguments:
Library Location:
Description:
Returns:
Usage Example:
See Also:
Section 5 — Programming
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
#include "esp6000.h"
int esp_get_daq_status(*count)
long count
number of samples collected
\esp6000.dll
esp_get_daq_status() returns the number of acquisitions collected.
This function can be used to monitor the status of data acquisitions.
ESPOK, ESPERROR
Hint:
#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);
}
esp_get_daq_done(), esp_set_daq_mode(), esp_enable_daq(), esp_disable_daq(),
esp_get_daq_data()
5-93

Advertisement

Table of Contents
loading

This manual is also suitable for:

Unidrive6000

Table of Contents