TektronixMdo#
Controls a Tektronix MDO mixed-domain oscilloscope (4 analog channels) from Python. This class inherits from MeasmaticDevice.
method check_errors()#
Reads the device event queue ( ALLE? ) and raises an error if the oscilloscope reports one.
Example#
osci = measmatic.get_device('device-osci')
osci.check_errors()
method enable_channel(osciChannel: Any, enabled: bool)#
Switches the display/acquisition of a channel on or off.
Parameters#
| Name | Description |
|---|---|
| osciChannel | The channel of type Atv.Framework.Devices.Contracts.OsciChannel . |
| enabled | True to enable the channel, False to disable it. |
Example#
from Atv.Framework.Devices.Contracts import OsciChannel
osci = measmatic.get_device('device-osci')
osci.enable_channel(OsciChannel.Channel1, True)
method fetch_data(osciChannel: Any, time: Any, voltage: Any)#
Reads the recorded waveform of a channel. The number of samples equals the current record length; the voltage values are corrected by the voltage offset set via set_voltage_range_and_offset .
Parameters#
| Name | Description |
|---|---|
| osciChannel | The channel of type Atv.Framework.Devices.Contracts.OsciChannel . |
| time | Out parameter, returned as part of the result tuple. The sample times in seconds. |
| voltage | Out parameter, returned as part of the result tuple. The sample voltages in volts. |
Returns#
| Type | Description |
|---|---|
| float | The sample times in seconds. |
| float | The sample voltages in volts. |
Example#
from Atv.Framework.Devices.Contracts import OsciChannel
osci = measmatic.get_device('device-osci')
time, voltage = osci.fetch_data(OsciChannel.Channel1)
method get_number_of_channels()#
Gets the number of analog channels of the oscilloscope.
Returns#
| Type | Description |
|---|---|
| int | The number of channels (4 for this device). |
Example#
osci = measmatic.get_device('device-osci')
count = osci.get_number_of_channels()
method get_record_length()#
Queries the current record length (number of samples per acquisition) from the oscilloscope.
Returns#
| Type | Description |
|---|---|
| int | The record length in samples. |
Example#
osci = measmatic.get_device('device-osci')
length = osci.get_record_length()
method is_busy()#
Checks whether the oscilloscope is busy ( BUSY? ), e.g. while an acquisition is running.
Returns#
| Type | Description |
|---|---|
| bool | True if the oscilloscope is busy, otherwise False . |
Example#
osci = measmatic.get_device('device-osci')
busy = osci.is_busy()
method is_ready_for_acquisition()#
Checks whether the oscilloscope is armed and waiting for a trigger (trigger state READY ).
Returns#
| Type | Description |
|---|---|
| bool | True if the trigger state is READY , otherwise False . |
Example#
osci = measmatic.get_device('device-osci')
ready = osci.is_ready_for_acquisition()
method probe_calibrate(osciChannel: Any)#
Calibrates the probe connected to a channel if the probe is calibratable and not yet calibrated. Raises an error if the calibration fails.
Parameters#
| Name | Description |
|---|---|
| osciChannel | The channel of type Atv.Framework.Devices.Contracts.OsciChannel . |
Example#
from Atv.Framework.Devices.Contracts import OsciChannel
osci = measmatic.get_device('device-osci')
osci.probe_calibrate(OsciChannel.Channel1)
method probe_degauss(osciChannel: Any)#
Degausses the (current) probe connected to a channel if its degauss state is not yet PASSED . Raises an error if the degauss fails.
Parameters#
| Name | Description |
|---|---|
| osciChannel | The channel of type Atv.Framework.Devices.Contracts.OsciChannel . |
Example#
from Atv.Framework.Devices.Contracts import OsciChannel
osci = measmatic.get_device('device-osci')
osci.probe_degauss(OsciChannel.Channel1)
method reset()#
Resets the oscilloscope to its default state ( *RST ).
Example#
osci = measmatic.get_device('device-osci')
osci.reset()
method set_coupling(osciChannel: Any, coupling: Any)#
Sets the input coupling and termination of a channel.
Parameters#
| Name | Description |
|---|---|
| osciChannel | The channel of type Atv.Framework.Devices.Contracts.OsciChannel . |
| coupling | The coupling of type Atv.Framework.Devices.Contracts.OsciCoupling |
Example#
from Atv.Framework.Devices.Contracts import OsciChannel, OsciCoupling
osci = measmatic.get_device('device-osci')
osci.set_coupling(OsciChannel.Channel1, OsciCoupling.Dc50)
method set_record_length(recordLength: int)#
Sets the record length (number of samples per acquisition).
Parameters#
| Name | Description |
|---|---|
| recordLength | The record length in samples. |
Example#
osci = measmatic.get_device('device-osci')
osci.set_record_length(10000)
method set_time_range_and_offset(timeRange: float, timeOffset: float)#
Sets the horizontal (time) range and the trigger delay offset.
Parameters#
| Name | Description |
|---|---|
| timeRange | The full horizontal range in seconds (the time per division is derived from it). |
| timeOffset | The horizontal delay time in seconds. |
Example#
osci = measmatic.get_device('device-osci')
osci.set_time_range_and_offset(1e-6, 0.0)
method set_trigger(osciChannel: Any, level: float, coupling: Any = ...)#
Configures the edge trigger source channel, trigger level and trigger coupling.
Parameters#
| Name | Description |
|---|---|
| osciChannel | The trigger source channel of type Atv.Framework.Devices.Contracts.OsciChannel . |
| level | The trigger level in volts. |
| coupling | The trigger coupling of type Atv.Framework.Devices.Contracts.OsciTriggerCoupling Default: ... |
Example#
from Atv.Framework.Devices.Contracts import OsciChannel
osci = measmatic.get_device('device-osci')
osci.set_trigger(OsciChannel.Channel1, 1.5)
method set_trigger_edge_slope(slope: Any)#
Sets the slope of the edge trigger.
Parameters#
| Name | Description |
|---|---|
| slope | The slope of type Atv.Framework.Devices.Contracts.OsciTriggerSlope |
Example#
from Atv.Framework.Devices.Contracts import OsciTriggerSlope
osci = measmatic.get_device('device-osci')
osci.set_trigger_edge_slope(OsciTriggerSlope.Pos)
method set_trigger_mode(mode: Any)#
Sets the trigger mode.
Parameters#
| Name | Description |
|---|---|
| mode | The mode of type Atv.Framework.Devices.Contracts.OsciTriggerMode |
Example#
from Atv.Framework.Devices.Contracts import OsciTriggerMode
osci = measmatic.get_device('device-osci')
osci.set_trigger_mode(OsciTriggerMode.Normal)
method set_trigger_type_edge()#
Selects the edge trigger type.
Example#
osci = measmatic.get_device('device-osci')
osci.set_trigger_type_edge()
method set_voltage_range_and_offset(osciChannel: Any, voltRange: float, voltOffset: float)#
Sets the vertical (voltage) range and offset of a channel.
Parameters#
| Name | Description |
|---|---|
| osciChannel | The channel of type Atv.Framework.Devices.Contracts.OsciChannel . |
| voltRange | The full vertical range in volts (the volts per division are derived from it). |
| voltOffset | The vertical offset in volts. |
Example#
from Atv.Framework.Devices.Contracts import OsciChannel
osci = measmatic.get_device('device-osci')
osci.set_voltage_range_and_offset(OsciChannel.Channel1, 10.0, 0.0)
method start_continually_acquisition()#
Starts a continuous acquisition (run/stop mode).
Example#
osci = measmatic.get_device('device-osci')
osci.start_continually_acquisition()
method start_single_acquisition()#
Arms the oscilloscope for a single (sequence) acquisition.
Example#
osci = measmatic.get_device('device-osci')
osci.start_single_acquisition()
method stop_acquisition()#
Stops the acquisition.
Example#
osci = measmatic.get_device('device-osci')
osci.stop_acquisition()
method trigger()#
Forces a trigger event.
Example#
osci = measmatic.get_device('device-osci')
osci.trigger()
method wait_completed()#
Waits until the oscilloscope has completed all pending operations ( *OPC? ).
Example#
osci = measmatic.get_device('device-osci')
osci.wait_completed()