dwfpy.analog_input.AnalogInputChannel

class AnalogInputChannel(module, channel)[source]

Bases: object

Represents an Analog Input channel.

Methods

get_data

Gets the acquired data samples.

get_noise

Gets the acquired noise samples.

get_sample

Gets the last ADC conversion sample.

setup

Sets up the channel for data acquisition.

Attributes

adc_bits

Gets the number bits used by the ADC.

attenuation

Gets or sets the channel attenuation.

bandwidth

Gets or sets the channel bandwidth in Hz.

coupling

Gets or sets the channel coupling.

coupling_info

Gets the supported channel coupling modes.

device

Gets the device.

enabled

Enables or disables the channel.

filter

Gets or sets the acquisition filter.

filter_info

Gets the supported acquisition filters.

impedance

Gets or sets the channel impedance in Ohms.

index

Gets the channel index.

label

Gets or sets the channel label.

module

Gets the Analog Input module.

offset

Gets or sets the channel offset in volts.

offset_max

Gets the maximum supported offset voltage.

offset_min

Gets the minimum supported offset voltage.

offset_steps

Gets the number of adjustable steps.

range

Gets or sets the channel range.

range_info

Gets the supported channel ranges.

range_max

Gets the maximum channel range.

range_min

Gets the minimum channel range.

range_steps

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

AnalogInputCoupling

property coupling_info: Tuple[AnalogInputCoupling, ...]

Gets the supported channel coupling modes.

Return type

Tuple[AnalogInputCoupling, ...]

property device: Device

Gets the device.

Return type

Device

property enabled: bool

Enables or disables the channel.

Return type

bool

property filter: FilterMode

Gets or sets the acquisition filter.

Return type

FilterMode

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

AnalogInput

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