dwfpy.analog_input.AnalogInput
- class AnalogInput(device)[source]
Bases:
objectAnalog Input module (Oscilloscope).
Methods
Configures the instrument and optionally starts the acquisition.
Force trigger of instrument.
Gets the acquisition state and optionally reads the data.
Starts a data recording.
Resets and configures all instrument parameters to default values.
Starts a scan-screen data acquisition.
Starts a scan-shift data acquisition.
Sets up a new data acquisition.
Sets up a channel for data acquisition.
Trigger upon a certain voltage level in the positive or negative slope of the waveform.
Trigger upon a positive or negative pulse width when measured at a certain voltage level.
Sets up a transition trigger.
Trigger upon a signal entering or exiting a window at certain voltage thresholds.
Starts a single data acquisition.
Waits for the specified acquisition state.
Attributes
Gets or sets the acquisition mode.
Gets the supported acquisition modes.
Returns True if the acquisition is auto triggered.
Gets or sets the buffer size.
Gets the maximum supported buffer size.
Gets the minimum supported buffer size.
Gets a collection of Analog Input channels.
Gets or sets the current timeout in seconds.
Gets the maximum count value.
Gets the count, frequency and tick values.
Gets the device.
Gets or sets the configured sample frequency in Hz.
Gets the maximum supported sample frequency.
Gets the minimum supported sample frequency.
Gets or sets the noise buffer size.
Gets the maximum supported noise buffer size.
Gets or sets the record length in seconds.
Gets information about the recording process: Returns (available_samples, lost_samples, corrupted_samples)
Gets the number of samples left in the acquisition.
Gets instrument trigger time information.
Gets the maximum timeout value.
Gets the trigger unit.
Gets the number of valid/acquired data samples.
Gets the buffer write pointer, which is needed in scan_screen acquisition mode to display the scan bar.
- property acquisition_mode: AcquisitionMode
Gets or sets the acquisition mode.
- Return type
- property acquisition_mode_info: Tuple[AcquisitionMode, ...]
Gets the supported acquisition modes.
- Return type
Tuple[AcquisitionMode,...]
- property auto_triggered: bool
Returns True if the acquisition is auto triggered.
Before calling this function, call the ‘read_status()’ function to read the data from the device.
- Return type
bool
- property buffer_size: int
Gets or sets the buffer size.
- Return type
int
- property buffer_size_max: int
Gets the maximum supported buffer size.
- Return type
int
- property buffer_size_min: int
Gets the minimum supported buffer size.
- Return type
int
- property channels: Tuple[AnalogInputChannel, ...]
Gets a collection of Analog Input channels.
- Return type
Tuple[AnalogInputChannel,...]
- configure(reconfigure=False, start=False)[source]
Configures the instrument and optionally starts the acquisition.
- Return type
None
- property counter: float
Gets or sets the current timeout in seconds.
- Return type
float
- property counter_max: float
Gets the maximum count value.
- Return type
float
- property counter_status: Tuple[float, float, int]
Gets the count, frequency and tick values.
- Return type
Tuple[float,float,int]
- property frequency: float
Gets or sets the configured sample frequency in Hz.
- Return type
float
- property frequency_max: float
Gets the maximum supported sample frequency.
- Return type
float
- property frequency_min: float
Gets the minimum supported sample frequency.
- Return type
float
- property noise_buffer_size: int
Gets or sets the noise buffer size.
- Return type
int
- property noise_buffer_size_max: int
Gets the maximum supported noise buffer size.
- Return type
int
- read_status(read_data=False)[source]
Gets the acquisition state and optionally reads the data.
- Return type
- record(sample_rate=None, length=None, buffer_size=None, callback=None, configure=False, start=False)[source]
Starts a data recording.
- sample_ratefloat, optional
The sampling rate in Hz.
- lengthfloat, optional
The recording length in seconds.
- buffer_sizeint or float, optional
The buffer size.
- configurebool, optional
If True, then the instrument is configured (default False).
- startbool, optional
If True, then the recording is started (default False).
- AnalogRecorder
The recorder instance.
- Return type
- property record_length: float
Gets or sets the record length in seconds.
- Return type
float
- property record_status: Tuple[int, int, int]
Gets information about the recording process: Returns (available_samples, lost_samples, corrupted_samples)
Before calling this function, call the ‘read_status()’ function to read the data from the device.
- Return type
Tuple[int,int,int]
- property remaining_samples: int
Gets the number of samples left in the acquisition.
Before calling this function, call the ‘read_status()’ function to read the data from the device.
- Return type
int
- reset()[source]
Resets and configures all instrument parameters to default values.
- Return type
None
- scan_screen(sample_rate=None, buffer_size=None, configure=False, start=False)[source]
Starts a scan-screen data acquisition.
- sample_ratefloat, optional
The sampling rate in Hz.
- buffer_sizeint or float, optional
The buffer size.
- configurebool, optional
If True, then the instrument is configured (default False).
- startbool, optional
If True, then the acquisition is started (default False).
- Return type
None
- scan_shift(sample_rate=None, buffer_size=None, configure=False, start=False)[source]
Starts a scan-shift data acquisition.
- sample_ratefloat, optional
The sampling rate in Hz.
- buffer_sizeint or float, optional
The buffer size.
- configurebool, optional
If True, then the instrument is configured (default False).
- startbool, optional
If True, then the acquisition is started (default False).
- Return type
None
- setup_acquisition(mode=None, sample_rate=None, buffer_size=None, record_length=None, configure=False, start=False)[source]
Sets up a new data acquisition.
- modestr or AcquisitionMode, optional
The sampling mode. Can be ‘single’, ‘scan-shift’, ‘scan-screen’, or ‘record’.
- sample_ratefloat, optional
The sampling rate in Hz.
- buffer_sizeint or float, optional
The buffer size.
- record_lengthfloat, optional
The record length in seconds.
- configurebool, optional
If True, then the instrument is configured (default False).
- startbool, optional
If True, then the acquisition is started (default False).
- Return type
None
- setup_channel(channel, range=None, offset=None, coupling=None, bandwidth=None, attenuation=None, impedance=None, filter=None, enabled=True)[source]
Sets up a channel for data acquisition.
- channelint
The channel to setup.
- 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
- setup_edge_trigger(channel, slope=None, level=None, hysteresis=None, position=None, hold_off=None, mode=None)[source]
Trigger upon a certain voltage level in the positive or negative slope of the waveform.
- channelint
The source channel used for triggering.
- slopestr or TriggerSlope, optional
The trigger slope. Can be ‘rising’, ‘falling’, or ‘either’.
- levelfloat, optional
The trigger level in Volts.
- hysteresisfloat, optional
The trigger hysteresis in Volts.
- positionfloat, optional
The horizontal trigger position in seconds.
- hold_offfloat, optional
The trigger hold-off time in seconds.
- modestr, optional
The trigger mode. Can be ‘normal’ or ‘auto’.
- Return type
None
- setup_pulse_trigger(channel, condition=None, length_condition=None, length=None, level=None, hysteresis=None, position=None, hold_off=None, mode=None)[source]
Trigger upon a positive or negative pulse width when measured at a certain voltage level.
- channelint
The source channel used for triggering.
- conditionstr, optional
The trigger condition. Can be ‘positive’ or ‘negative’.
- length_conditionstr, optional
The trigger length condition. Can be ‘less’, ‘timeout’, or ‘more’.
- lengthfloat, optional
The pulse length in seconds.
- levelfloat, optional
The trigger level in Volts.
- hysteresisfloat, optional
The trigger hysteresis in Volts.
- positionfloat, optional
The horizontal trigger position in seconds.
- hold_offfloat, optional
The trigger hold-off time in seconds.
- modestr, optional
The trigger mode. Can be ‘normal’ or ‘auto’.
- Return type
None
- setup_transition_trigger(channel, condition=None, length_condition=None, length=None, level=None, hysteresis=None, position=None, hold_off=None, mode=None)[source]
Sets up a transition trigger.
- channelint
The source channel used for triggering.
- conditionstr, optional
The trigger condition. Can be ‘rising’, ‘falling’, or ‘either’.
- length_conditionstr, optional
The trigger length condition. Can be ‘less’, ‘timeout’, or ‘more’.
- lengthfloat, optional
The transition length in seconds.
- levelfloat, optional
The trigger level in Volts.
- hysteresisfloat, optional
The trigger hysteresis in Volts.
- positionfloat, optional
The horizontal trigger position in seconds.
- hold_offfloat, optional
The trigger hold-off time in seconds.
- modestr, optional
The trigger mode. Can be ‘normal’ or ‘auto’.
- Return type
None
- setup_window_trigger(channel, condition=None, length=None, level=None, hysteresis=None, position=None, hold_off=None, mode=None)[source]
Trigger upon a signal entering or exiting a window at certain voltage thresholds.
- channelint
The source channel used for triggering.
- conditionstr, optional
The trigger condition. Can be ‘entering’ or ‘exiting’.
- lengthfloat, optional
The window length in seconds.
- levelfloat, optional
The trigger level in Volts.
- hysteresisfloat, optional
The trigger hysteresis in Volts.
- positionfloat, optional
The horizontal trigger position in seconds.
- hold_offfloat, optional
The trigger hold-off time in seconds.
- modestr, optional
The trigger mode. Can be ‘normal’ or ‘auto’.
- Return type
None
- single(sample_rate=None, buffer_size=None, continuous=True, configure=False, start=False)[source]
Starts a single data acquisition.
- sample_ratefloat, optional
The sampling rate in Hz.
- buffer_sizeint or float, optional
The buffer size.
- continuousbool, optional
If True, then the instrument is rearmed after the data is retrieved. (default True).
- configurebool, optional
If True, then the instrument is configured (default False).
- startbool, optional
If True, then the acquisition is started (default False).
- Return type
None
- property time: Tuple[int, int, int]
Gets instrument trigger time information.
Before calling this function, call the ‘read_status()’ function to read the data from the device.
- Return type
Tuple[int,int,int]
- property timeout_max: float
Gets the maximum timeout value.
- Return type
float
- property trigger: AnalogInputTrigger
Gets the trigger unit.
- Return type
- property valid_samples: int
Gets the number of valid/acquired data samples.
Before calling this function, call the ‘read_status()’ function to read the data from the device.
- Return type
int
- wait_for_status(status, read_data=False)[source]
Waits for the specified acquisition state.
- Return type
None
- property write_index: int
Gets the buffer write pointer, which is needed in scan_screen acquisition mode to display the scan bar.
Before calling this function, call the ‘read_status()’ function to read the data from the device.
- Return type
int