class spirack.D4a_module(spi_rack, module)
D4a module interface class. This class does the low level interfacing with the D4a module. When creating an instance, it requires a SPI_rack class passed as a parameter. At initialization the ADC filters will be set to ‘sinc3’ at 1.67 SPS.
The module contains two independent 24-bit analog to digital converters. They can be individually configured and triggered. The filter settings determine the data rate and resolution. For an overview of settings, see the D4a module page.
Parameters:
single_conversion_trig_and_read(adc)
Performs one ADC acquisition on the given ADC and returns the signal voltage. It will both trigger the ADC and wait for the result. While the code is waiting for data all other operations are blocked.
Parameters:
Returns - the value of the input signal, in Volts
get_ADC_ID(adc)
This function allows to check the communication withethe D4a module. It is offered for debug purposes.
Parameters:
Returns - a fixed value of 3294 (decimal), 0CDX (hex) upon successful communication
select_measurement_type(adc, measurement_type)
Selects the signaling type and source for measurements on the selected ADC. The options are single-ended signals via the front-panel or differential signals via the back-plane A third option, grounding, is useful for test purposes.
Parameters:
set_filter(adc, filter_type, filter_setting)
The two filter parameters determine the filter response (cutoff frequency), the 50 Hz / 60 Hz rejection and the resolution. See the filter table on the website to determine which setting is correct for your application.
Parameters:
offset_calibration_with_module_reference(adc)
Performs a fresh offset calibration operation which re-aligns the 0V point of the ADC range. This function is completely self-sufficient and does not require any change to the input signal. Since the D4a initialization utilizes a tested pre-set default value, further calibration is expected to be only marginally useful and only in cases where environmental conditions are far from typical.
Parameters:
offset_calibration_with_external_reference(adc)
Performs a fresh offset calibration operation which re-aligns the 0V point of the ADC range. This function relies on a 0V level on the input signal, which must be provided by the user. Since the D4a initialization utilizes a tested pre-set default value, further calibration is expected to be only marginally useful and only in cases where environmental conditions are far from typical.
Parameters:
gain_calibration_with_module_reference(adc)
Performs a fresh gain calibration operation which re-aligns the gain factor (Vout/Vin) of the ADC range. This function is completely self-sufficient and does not require any change to the input signal. Since the D4a initialization utilizes a tested pre-set default value, further calibration is expected to be only marginally useful and only in cases where environmental conditions are far from typical.
Parameters:
gain_calibration_with_external_reference(adc)
Performs a fresh gain calibration operation which re-aligns the gain factor (Vout/Vin) of the ADC range. This function relies on a precise 3.5V level on the input signal, which must be provided by the user. Since the D4a initialization utilizes a tested pre-set default value, further calibration is expected to be only marginally useful and only in cases where environmental conditions are far from typical.
Parameters:
configure_sync_mode(adc, ext_enable)
Select a trigger mode (sync mode) for the selected ADC. In the conversion-enabled mode the ADC is normally ready to operate and will perform conversions only as instructed by software commands. In the conversion-disabled mode ('triggered-operation' mode) the ADC is normally in stand-by and will perform an conversion only when an 'enable' signal is provided. Therefore this signal is alternatively referred to as a 'trigger', which can initiate a conversion independent of a software command. A call to read the result needs to follow to access the data.
Parameters:
set_sync_signal(user_sync_value)
This function gives the user a software-based method to set the trigger mode (sync mode) of the module. This function affects the complete module (both input channels). The 'trigger' signal can be also provided as a physical signal via the 'TRIG' connector on the front panel. It also affects the complete module. The two methods interact as an OR logic - either of the methods is enough to set the sync status of the module to the conversion-disabled mode ('triggered-operation' mode).
Parameters:
read_unified_sync_signal()
Reads the trigger signal (sync signal) in the module. This value is an OR of the current 'TRIG' value with the last value given via software.
Returns - the sync value of the module
| Attribute | Info |
|---|---|
module |
the module number set by the user (must coincide with hardware) |
filter_setting |
current filter setting |
filter_type |
currently set filter_type: either sinc3 or sinc5 |