Section 5 — Programming
5-89
esp_get_all_adc Read All Analog-To-Digital Converter Channels
Synopsis:
#include “esp6000.h”
int esp_get_all_adc(float *DataArray, long *timestamp)
Arguments:
float DataArray
address of array where ADC data is to be stored
long timestamp
current servo counter value at time of acquisition
Library Location:
\esp6000.dll
Description:
esp_get_all_adc() reads all analog-to-digital converter channels 1-8.
The analog input range of each ADC channel is software-configurable for ranges of
±
10V,
±
5V,
±
2.5V, and
±
1.25V.
ADC channels are located on the analog I/O connector on the controller card.
16-bit, 100 kHz
A/D Converter
Six-Pole
Anti-alias
Filter
Programmable
Gain
Instrumentation
Amplifier
Sample Trigger
Control
(Timer or
Software Driven)
DSP
MUX
8 Single-
Ended
Input
Returns:
ESPOK, ESPERROR
Hint:
Usage Example:
#include “esp6000.h”
main()
{
long timestamp;
float DataArray[8];
if (!esp_init_system()) exit(-1);
/* Set ADC Gain */
esp_set_adc_gain(V10);
/* Set ADC Range */
esp_set_adc_range(UNIPOLAR);
/* Acquire All ADC Channels Data */
esp_get_all_adc(DataArray, ×tamp);
}
See Also:
esp_set_adc_range(), esp_set_adc_gain(), esp_get_adc ()
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com