Measure a voltage.
Module RB8509 is a 8-channel 12-bit analog to digital converter (ADC).
The module has eight analog inputs and a trigger input to start a data acquisition. A data acquisition can also be started by a software trigger.
Module RB8509 contains the following parts:
The following variations of this module are known to exist:
The module's front-panels look as follows.
8-channel 4-channel +----------------------+ +-----------+ | A/D Converter 12-bit | | 12-bit ADC| | | | | | Adc 0 Adc 4 | | | | (o) x (o) x | | | | | | ch0 (o) | | Adc 1 Adc 5 | | | | (o) x (o) x | | ch1 (o) | | | | | | Adc 2 Adc 6 | | ch2 (o) | | (o) x (o) x | | | | | | ch3 (o) | | Adc 3 Adc 7 | | | | (o) x (o) x | | trg (o) | | | | | | RULBUS | | RULBUS | +----------------------+ +-----------+
At production time, the ADC is configured for unipolar or bipolar operation and its input voltage range is defined as 10 or 20V.
The following table shows the volt-per-bit values for the various input voltage ranges.
Voltage range | volt-per-bit bipolar ----------------------+-------------------------- 0 .. 10.2375 V | 2.5 mV 0 -5.12 .. 5.1175 V | 2.5 mV 1 -10.24 .. 10.235 V | 5 mV 1
rb8509_adc12 "name" { address = 0xC0 bipolar = true volt_per_bit = 5e-3 }
When the Rulbus configuration file is read, ADCs are configured as follows:
Among others, there are functions to select channel and gain and to acquire and obtain the input voltage of the selected input.
int32 handle; const int channel = 0; float32 voltage = 0; rb8509_adc12_open( &handle, "adc" ); rb8509_adc12_setChannel( handle, channel ); rb8509_adc12_autoscale ( handle ); rb8509_adc12_getVoltage( handle, &voltage ); rb8509_adc12_close( handle )
Open and close | |
EXPORT int32 RDL_API | rb8509_adc12_open (int32 *pHandle, CCstr name) |
open an ADC. | |
EXPORT int32 RDL_API | rb8509_adc12_close (int32 handle) |
close an ADC | |
Channel selection | |
EXPORT int32 RDL_API | rb8509_adc12_getChannel (int32 handle, int32 *pChannel) |
get currently selected channel [0..7]. | |
EXPORT int32 RDL_API | rb8509_adc12_setChannel (int32 handle, int32 channel) |
select channel [0..7]. | |
Gain selection | |
EXPORT int32 RDL_API | rb8509_adc12_getGain (int32 handle, int32 *pGain) |
get currently selected gain [1,2,4,8]. | |
EXPORT int32 RDL_API | rb8509_adc12_setGain (int32 handle, int32 gain) |
select gain [1,2,4,8]. | |
EXPORT int32 RDL_API | rb8509_adc12_autoscale (int32 handle) |
determine and set amplifier gain to fit current signal. | |
Data acquisition | |
EXPORT int32 RDL_API | rb8509_adc12_convert (int32 handle) |
start an analog to digital conversion. | |
EXPORT int32 RDL_API | rb8509_adc12_isReady (int32 handle, int32 *pFlag) |
true if result is available; flag is reset by reading result. | |
EXPORT int32 RDL_API | rb8509_adc12_getVoltage (int32 handle, float32 *pVoltage) |
issue software trigger and return input-voltage measured, may return 1 on timeout; OR wait for external trigger and return input-voltage measured. | |
EXPORT int32 RDL_API | rb8509_adc12_getValue (int32 handle, int32 *pValue) |
issue software trigger and return conversion value, may return 1 on timeout; OR wait for external trigger and return conversion value. | |
Triggering | |
EXPORT int32 RDL_API | rb8509_adc12_getExtTriggerLevel (int32 handle, int32 *pFlag) |
the current external trigger level. | |
EXPORT int32 RDL_API | rb8509_adc12_isEnabledExtTrigger (int32 handle, int32 *pFlag) |
true if external trigger-input is enabled. | |
EXPORT int32 RDL_API | rb8509_adc12_enableExtTrigger (int32 handle, int32 flag) |
enable or disable external trigger-input. | |
Configuration | |
EXPORT int32 RDL_API | rb8509_adc12_isBipolar (int32 handle, int32 *pFlag) |
true if ADC has bipolar configuration. | |
EXPORT int32 RDL_API | rb8509_adc12_getVoltperbit (int32 handle, float32 *pVpb) |
the ADC's input sensitivity configuration. |