dwfpy.analog_input.AnalogInputChannel
- class AnalogInputChannel(module, channel)[source]
Bases:
objectRepresents an Analog Input channel.
Methods
Gets the acquired data samples.
Gets the acquired noise samples.
Gets the last ADC conversion sample.
Sets up the channel for data acquisition.
Attributes
Gets the number bits used by the ADC.
Gets or sets the channel attenuation.
Gets or sets the channel bandwidth in Hz.
Gets or sets the channel coupling.
Gets the supported channel coupling modes.
Gets the device.
Enables or disables the channel.
Gets or sets the acquisition filter.
Gets the supported acquisition filters.
Gets or sets the channel impedance in Ohms.
Gets the channel index.
Gets or sets the channel label.
Gets the Analog Input module.
Gets or sets the channel offset in volts.
Gets the maximum supported offset voltage.
Gets the minimum supported offset voltage.
Gets the number of adjustable steps.
Gets or sets the channel range.
Gets the supported channel ranges.
Gets the maximum channel range.
Gets the minimum channel range.
Gets the number of channel range steps.
- property adc_bits: int
Gets the number bits used by the ADC.
- Return type
int
- property attenuation: float
Gets or sets the channel attenuation.
- Return type
float
- property bandwidth: float
Gets or sets the channel bandwidth in Hz.
- Return type
float
- property coupling: AnalogInputCoupling
Gets or sets the channel coupling.
- Return type
- property coupling_info: Tuple[AnalogInputCoupling, ...]
Gets the supported channel coupling modes.
- Return type
Tuple[AnalogInputCoupling,...]
- property enabled: bool
Enables or disables the channel.
- Return type
bool
- property filter: FilterMode
Gets or sets the acquisition filter.
- Return type
- property filter_info: Tuple[FilterMode, ...]
Gets the supported acquisition filters.
- Return type
Tuple[FilterMode,...]
- get_data(first_sample=0, sample_count=- 1, raw=False)[source]
Gets the acquired data samples.
Before calling this function, call the ‘read_status()’ function to read the data from the device.
- get_noise(first_sample=0, sample_count=- 1)[source]
Gets the acquired noise samples.
Before calling this function, call the ‘read_status()’ function to read the data from the device.
- get_sample()[source]
Gets the last ADC conversion sample.
Before calling this function, call the ‘read_status()’ function to read the data from the device.
- Return type
float
- property impedance: float
Gets or sets the channel impedance in Ohms.
- Return type
float
- property index: int
Gets the channel index.
- Return type
int
- property label: str
Gets or sets the channel label.
- Return type
str
- property module: AnalogInput
Gets the Analog Input module.
- Return type
- property offset: float
Gets or sets the channel offset in volts.
- Return type
float
- property offset_max: float
Gets the maximum supported offset voltage.
- Return type
float
- property offset_min: float
Gets the minimum supported offset voltage.
- Return type
float
- property offset_steps: int
Gets the number of adjustable steps.
- Return type
int
- property range: float
Gets or sets the channel range.
- Return type
float
- property range_info: Tuple[float, ...]
Gets the supported channel ranges.
- Return type
Tuple[float,...]
- property range_max: float
Gets the maximum channel range.
- Return type
float
- property range_min: float
Gets the minimum channel range.
- Return type
float
- property range_steps: int
Gets the number of channel range steps.
- Return type
int
- setup(range=None, offset=None, coupling=None, bandwidth=None, attenuation=None, impedance=None, filter=None, enabled=True)[source]
Sets up the channel for data acquisition.
- rangefloat, optional
The channel range in Volts.
- offsetfloat, optional
The channel offset in Volts.
- couplingstr or AnalogInputCoupling, optional
The channel coupling. Can be ‘dc’ or ‘ac’.
- bandwidthfloat, optional
The channel bandwidth in Hz.
- attenuationfloat, optional
The channel attenuation.
- impedancefloat, optional
The channel impedance in Ohms.
- filterstr or FilterMode, optional
The channel acquisition filter. Can be ‘decimate’, ‘average’, or ‘min-max’.
- enabledbool, optional
If True, then the channel is enabled (default True).
- Return type
None