Skip to content

Commit

Permalink
fix: Updated the measurement source selection command for the MDO3K, …
Browse files Browse the repository at this point in the history
…MDO4K, MSO4K and DPO4K models to work properly. (#173)

Co-authored-by: Shashank P <[email protected]>
  • Loading branch information
v12ganesh and u625355 authored Mar 28, 2024
1 parent 008e2b2 commit 49e87e9
Show file tree
Hide file tree
Showing 11 changed files with 103 additions and 23 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ Things to be included in the next release go here.

- Updated the `get_model_series()` function to only warn the user if the model is not found in the `SupportedModels` enumeration. This also eliminates false warnings during unit tests.

### Fixed

- Updated the measurement source selection command for the MDO3K, MDO4K, MSO4K and DPO4K models to work properly.

______________________________________________________________________

## v1.2.1 (2024-02-27)
Expand Down
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""The measurement commands module.
These commands are used in the following models:
DPO4K, DPO4KB, MDO3K, MSO4K, MSO4KB
DPO4K, DPO4KB, MDO3K, MDO4K, MDO4KB, MDO4KC, MSO4K, MSO4KB
THIS FILE IS AUTO-GENERATED, IT SHOULD NOT BE MANUALLY MODIFIED.
Expand Down Expand Up @@ -44,6 +44,8 @@
- MEASUrement:MEAS<x>:MAXimum?
- MEASUrement:MEAS<x>:MEAN?
- MEASUrement:MEAS<x>:MINImum?
- MEASUrement:MEAS<x>:SOUrce1 {CH<x>|MATH|R<x>|D<x>|HIStogram|RF_AMPlitude|RF_FREQuency|RF_PHASe}
- MEASUrement:MEAS<x>:SOUrce1?
- MEASUrement:MEAS<x>:STATE {OFF|ON|<NR1>}
- MEASUrement:MEAS<x>:STATE?
- MEASUrement:MEAS<x>:STDdev?
Expand Down Expand Up @@ -2370,6 +2372,45 @@ class MeasurementMeasItemState(SCPICmdWrite, SCPICmdRead):
"""


class MeasurementMeasItemSource1(SCPICmdWrite, SCPICmdRead):
"""The ``MEASUrement:MEAS<x>:SOUrce1`` command.
**Description:**
- This command sets or queries the measurement source. The measurement number
and source are specified by x. For delay or phase measurements, This command
specifies the waveform to measure 'from'. This is equivalent to setting the
'From:' waveform in the 'Measure Delay' side menu or the 'Measure Phase' side menu.
**Usage:**
- Using the ``.query()`` method will send the ``MEASUrement:MEAS<x>:SOUrce1?`` query.
- Using the ``.verify(value)`` method will send the ``MEASUrement:MEAS<x>:SOUrce1?`` query
and raise an AssertionError if the returned value does not match ``value``.
- Using the ``.write(value)`` method will send the ``MEASUrement:MEAS<x>:SOUrce1 value``
command.
**SCPI Syntax:**
::
- MEASUrement:MEAS<x>:SOUrce1 {CH<x>|MATH|R<x>|D<x>|HIStogram|RF_AMPlitude|RF_FREQuency|RF_PHASe}
- MEASUrement:MEAS<x>:SOUrce1?
**Info:**
- ``CH<x>`` is an analog channel to use as the source waveform. x has a minimum of 1 and a
maximum of 4.
- ``MATH`` is the math waveform.
- ``REF<x>`` is a reference waveform to use as the source waveform. x has a minimum of 1 and
a maximum of 4.
- ``D<x>`` is a digital channel to use as the source waveform. (MSO/MDO4000/B models only as
well as MDO3000 and MDO400C models with option MDO3MSO or MDO4MSO installed.) x has a
minimum of 0 and a maximum of 15.
- ``HIStogram`` indicates the histogram is the object to be measured.
- ``RF_AMPlitude`` are the RF time domain traces. (MDO4000/B/C models only.).
- ``RF_FREQuency`` are the RF time domain traces. (MDO4000/B/C models only.).
- ``RF_PHASe`` are the RF time domain traces. (MDO4000/B/C models only.).
""" # noqa: E501


class MeasurementMeasItemMinimum(SCPICmdRead):
"""The ``MEASUrement:MEAS<x>:MINImum`` command.
Expand Down Expand Up @@ -2637,6 +2678,7 @@ class MeasurementMeasItem(ValidatedDynamicNumberCmd, SCPICmdRead):
- ``.maximum``: The ``MEASUrement:MEAS<x>:MAXimum`` command.
- ``.mean``: The ``MEASUrement:MEAS<x>:MEAN`` command.
- ``.minimum``: The ``MEASUrement:MEAS<x>:MINImum`` command.
- ``.source1``: The ``MEASUrement:MEAS<x>:SOUrce1`` command.
- ``.state``: The ``MEASUrement:MEAS<x>:STATE`` command.
- ``.stddev``: The ``MEASUrement:MEAS<x>:STDdev`` command.
- ``.type``: The ``MEASUrement:MEAS<x>:TYPe`` command.
Expand All @@ -2651,6 +2693,7 @@ def __init__(self, device: Optional["PIDevice"], cmd_syntax: str) -> None:
self._maximum = MeasurementMeasItemMaximum(device, f"{self._cmd_syntax}:MAXimum")
self._mean = MeasurementMeasItemMean(device, f"{self._cmd_syntax}:MEAN")
self._minimum = MeasurementMeasItemMinimum(device, f"{self._cmd_syntax}:MINImum")
self._source1 = MeasurementMeasItemSource1(device, f"{self._cmd_syntax}:SOUrce1")
self._state = MeasurementMeasItemState(device, f"{self._cmd_syntax}:STATE")
self._stddev = MeasurementMeasItemStddev(device, f"{self._cmd_syntax}:STDdev")
self._type = MeasurementMeasItemType(device, f"{self._cmd_syntax}:TYPe")
Expand Down Expand Up @@ -2767,6 +2810,46 @@ def minimum(self) -> MeasurementMeasItemMinimum:
"""
return self._minimum

@property
def source1(self) -> MeasurementMeasItemSource1:
"""Return the ``MEASUrement:MEAS<x>:SOUrce1`` command.
**Description:**
- This command sets or queries the measurement source. The measurement number
and source are specified by x. For delay or phase measurements, This command
specifies the waveform to measure 'from'. This is equivalent to setting the
'From:' waveform in the 'Measure Delay' side menu or the 'Measure Phase' side menu.
**Usage:**
- Using the ``.query()`` method will send the ``MEASUrement:MEAS<x>:SOUrce1?`` query.
- Using the ``.verify(value)`` method will send the ``MEASUrement:MEAS<x>:SOUrce1?``
query and raise an AssertionError if the returned value does not match ``value``.
- Using the ``.write(value)`` method will send the ``MEASUrement:MEAS<x>:SOUrce1 value``
command.
**SCPI Syntax:**
::
- MEASUrement:MEAS<x>:SOUrce1 {CH<x>|MATH|R<x>|D<x>|HIStogram|RF_AMPlitude|RF_FREQuency|RF_PHASe}
- MEASUrement:MEAS<x>:SOUrce1?
**Info:**
- ``CH<x>`` is an analog channel to use as the source waveform. x has a minimum of 1 and
a maximum of 4.
- ``MATH`` is the math waveform.
- ``REF<x>`` is a reference waveform to use as the source waveform. x has a minimum of 1
and a maximum of 4.
- ``D<x>`` is a digital channel to use as the source waveform. (MSO/MDO4000/B models
only as well as MDO3000 and MDO400C models with option MDO3MSO or MDO4MSO installed.)
x has a minimum of 0 and a maximum of 15.
- ``HIStogram`` indicates the histogram is the object to be measured.
- ``RF_AMPlitude`` are the RF time domain traces. (MDO4000/B/C models only.).
- ``RF_FREQuency`` are the RF time domain traces. (MDO4000/B/C models only.).
- ``RF_PHASe`` are the RF time domain traces. (MDO4000/B/C models only.).
""" # noqa: E501
return self._source1

@property
def state(self) -> MeasurementMeasItemState:
"""Return the ``MEASUrement:MEAS<x>:STATE`` command.
Expand Down Expand Up @@ -3417,13 +3500,10 @@ class MeasurementImmedSource1(SCPICmdWrite, SCPICmdRead):
"""The ``MEASUrement:IMMed:SOUrce1`` command.
**Description:**
- For SOURce1: This command specifies the source for all single channel measurements. For
- This command specifies the source for all single channel measurements. For
delay or phase measurements, this command specifies the waveform to measure 'from'. This
is equivalent to setting the 'From:' waveform in the 'Measure Delay' side menu or the
'Measure Phase' side menu. SOUrce is equivalent to SOURCE1. For SOUrce2: This command
specifies the waveform to measure 'to' when taking a delay measurement or phase
measurement. This is equivalent to setting the 'To:' waveform in the 'Measure Delay' side
menu or the 'Measure Phase' side menu.
'Measure Phase' side menu.
**Usage:**
- Using the ``.query()`` method will send the ``MEASUrement:IMMed:SOUrce1?`` query.
Expand All @@ -3445,8 +3525,7 @@ class MeasurementImmedSource1(SCPICmdWrite, SCPICmdRead):
- ``MATH`` is the math waveform.
- ``D0 - D15`` is the digital waveform to use as the source waveform. (On models with option
3-MSO installed.).
- ``HIStogram`` indicates the histogram as the object to be measured. HIStogram only applies
to SOUrce1; it is not available for SOUrce2.
- ``HIStogram`` indicates the histogram as the object to be measured.
"""


Expand Down Expand Up @@ -3665,13 +3744,10 @@ def source1(self) -> MeasurementImmedSource1:
"""Return the ``MEASUrement:IMMed:SOUrce1`` command.
**Description:**
- For SOURce1: This command specifies the source for all single channel measurements.
- This command specifies the source for all single channel measurements.
For delay or phase measurements, this command specifies the waveform to measure
'from'. This is equivalent to setting the 'From:' waveform in the 'Measure Delay' side
menu or the 'Measure Phase' side menu. SOUrce is equivalent to SOURCE1. For SOUrce2:
This command specifies the waveform to measure 'to' when taking a delay measurement or
phase measurement. This is equivalent to setting the 'To:' waveform in the 'Measure
Delay' side menu or the 'Measure Phase' side menu.
menu or the 'Measure Phase' side menu.
**Usage:**
- Using the ``.query()`` method will send the ``MEASUrement:IMMed:SOUrce1?`` query.
Expand All @@ -3693,8 +3769,7 @@ def source1(self) -> MeasurementImmedSource1:
- ``MATH`` is the math waveform.
- ``D0 - D15`` is the digital waveform to use as the source waveform. (On models with
option 3-MSO installed.).
- ``HIStogram`` indicates the histogram as the object to be measured. HIStogram only
applies to SOUrce1; it is not available for SOUrce2.
- ``HIStogram`` indicates the histogram as the object to be measured.
""" # noqa: E501
return self._source1

Expand Down Expand Up @@ -4082,6 +4157,7 @@ def meas(self) -> Dict[int, MeasurementMeasItem]:
- ``.maximum``: The ``MEASUrement:MEAS<x>:MAXimum`` command.
- ``.mean``: The ``MEASUrement:MEAS<x>:MEAN`` command.
- ``.minimum``: The ``MEASUrement:MEAS<x>:MINImum`` command.
- ``.source1``: The ``MEASUrement:MEAS<x>:SOUrce1`` command.
- ``.state``: The ``MEASUrement:MEAS<x>:STATE`` command.
- ``.stddev``: The ``MEASUrement:MEAS<x>:STDdev`` command.
- ``.type``: The ``MEASUrement:MEAS<x>:TYPe`` command.
Expand Down
2 changes: 1 addition & 1 deletion src/tm_devices/commands/_dpo4k_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

from ._1jzp7o_mdodpo.trigger import Trigger
from ._1kozfv_dpo.search import Search
from ._1l5u97_mdomsodpo.measurement import Measurement
from ._1lcv3a_msodpomdo.message import Message
from ._1lcv3a_msodpomdo.setup_1 import SetupItem
from ._1ltpwt_mdomsodpo.actonevent import Actonevent
Expand Down Expand Up @@ -59,6 +58,7 @@
from ._1mlt9u_mdomsodpo.deskew import Deskew
from ._1mlt9u_mdomsodpo.display import Display
from ._1mlt9u_mdomsodpo.mask import Mask
from ._1mlt9u_mdomsodpo.measurement import Measurement
from ._1mlt9u_mdomsodpo.recall import Recall
from ._1mlt9u_mdomsodpo.select import Select
from ._1mq0z9_msodpo.rf import Rf
Expand Down
2 changes: 1 addition & 1 deletion src/tm_devices/commands/_dpo4kb_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

from tm_devices.drivers.pi.pi_device import PIDevice

from ._1l5u97_mdomsodpo.measurement import Measurement
from ._1la1ym_msomdodpo.trigger import Trigger
from ._1lcv3a_msodpomdo.message import Message
from ._1lcv3a_msodpomdo.setup_1 import SetupItem
Expand Down Expand Up @@ -59,6 +58,7 @@
from ._1mlt9u_mdomsodpo.deskew import Deskew
from ._1mlt9u_mdomsodpo.display import Display
from ._1mlt9u_mdomsodpo.mask import Mask
from ._1mlt9u_mdomsodpo.measurement import Measurement
from ._1mlt9u_mdomsodpo.recall import Recall
from ._1mlt9u_mdomsodpo.select import Select
from ._1mq0z9_msodpo.rf import Rf
Expand Down
2 changes: 1 addition & 1 deletion src/tm_devices/commands/_mdo3k_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from tm_devices.drivers.pi.pi_device import PIDevice

from ._1l4fot_mdomso.cursor import Cursor
from ._1l5u97_mdomsodpo.measurement import Measurement
from ._1lcv3a_msodpomdo.message import Message
from ._1lcv3a_msodpomdo.setup_1 import SetupItem
from ._1ltpwt_mdomsodpo.actonevent import Actonevent
Expand Down Expand Up @@ -57,6 +56,7 @@
from ._1mlt9u_mdomsodpo.deskew import Deskew
from ._1mlt9u_mdomsodpo.display import Display
from ._1mlt9u_mdomsodpo.mask import Mask
from ._1mlt9u_mdomsodpo.measurement import Measurement
from ._1mlt9u_mdomsodpo.recall import Recall
from ._1mlt9u_mdomsodpo.select import Select
from ._1nmc1o_msodpomdo.clearmenu import Clearmenu
Expand Down
2 changes: 1 addition & 1 deletion src/tm_devices/commands/_mdo4k_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

from tm_devices.drivers.pi.pi_device import PIDevice

from ._1kjd62_mdo.measurement import Measurement
from ._1kjd62_mdo.rf import Rf
from ._1la1ym_msomdodpo.trigger import Trigger
from ._1lcv3a_msodpomdo.message import Message
Expand Down Expand Up @@ -59,6 +58,7 @@
from ._1mlt9u_mdomsodpo.deskew import Deskew
from ._1mlt9u_mdomsodpo.display import Display
from ._1mlt9u_mdomsodpo.mask import Mask
from ._1mlt9u_mdomsodpo.measurement import Measurement
from ._1mlt9u_mdomsodpo.recall import Recall
from ._1mlt9u_mdomsodpo.select import Select
from ._1nmc1o_msodpomdo.clearmenu import Clearmenu
Expand Down
2 changes: 1 addition & 1 deletion src/tm_devices/commands/_mdo4kb_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from tm_devices.drivers.pi.pi_device import PIDevice

from ._1jzp7o_mdodpo.trigger import Trigger
from ._1kjd62_mdo.measurement import Measurement
from ._1kjd62_mdo.rf import Rf
from ._1l4fot_mdomso.cursor import Cursor
from ._1lcv3a_msodpomdo.message import Message
Expand Down Expand Up @@ -59,6 +58,7 @@
from ._1mlt9u_mdomsodpo.deskew import Deskew
from ._1mlt9u_mdomsodpo.display import Display
from ._1mlt9u_mdomsodpo.mask import Mask
from ._1mlt9u_mdomsodpo.measurement import Measurement
from ._1mlt9u_mdomsodpo.recall import Recall
from ._1mlt9u_mdomsodpo.select import Select
from ._1nmc1o_msodpomdo.clearmenu import Clearmenu
Expand Down
2 changes: 1 addition & 1 deletion src/tm_devices/commands/_mdo4kc_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

from ._1kdqwg_mdo.search import Search
from ._1kdqwg_mdo.trigger import Trigger
from ._1kjd62_mdo.measurement import Measurement
from ._1kjd62_mdo.rf import Rf
from ._1l4fot_mdomso.cursor import Cursor
from ._1lcv3a_msodpomdo.message import Message
Expand Down Expand Up @@ -60,6 +59,7 @@
from ._1mlt9u_mdomsodpo.deskew import Deskew
from ._1mlt9u_mdomsodpo.display import Display
from ._1mlt9u_mdomsodpo.mask import Mask
from ._1mlt9u_mdomsodpo.measurement import Measurement
from ._1mlt9u_mdomsodpo.recall import Recall
from ._1mlt9u_mdomsodpo.select import Select
from ._1nmc1o_msodpomdo.clearmenu import Clearmenu
Expand Down
2 changes: 1 addition & 1 deletion src/tm_devices/commands/_mso4k_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

from tm_devices.drivers.pi.pi_device import PIDevice

from ._1l5u97_mdomsodpo.measurement import Measurement
from ._1la1ym_msomdodpo.trigger import Trigger
from ._1lcv3a_msodpomdo.message import Message
from ._1lcv3a_msodpomdo.setup_1 import SetupItem
Expand Down Expand Up @@ -59,6 +58,7 @@
from ._1mlt9u_mdomsodpo.deskew import Deskew
from ._1mlt9u_mdomsodpo.display import Display
from ._1mlt9u_mdomsodpo.mask import Mask
from ._1mlt9u_mdomsodpo.measurement import Measurement
from ._1mlt9u_mdomsodpo.recall import Recall
from ._1mlt9u_mdomsodpo.select import Select
from ._1mq0z9_msodpo.rf import Rf
Expand Down
2 changes: 1 addition & 1 deletion src/tm_devices/commands/_mso4kb_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from tm_devices.drivers.pi.pi_device import PIDevice

from ._1l4fot_mdomso.cursor import Cursor
from ._1l5u97_mdomsodpo.measurement import Measurement
from ._1la1ym_msomdodpo.trigger import Trigger
from ._1lcv3a_msodpomdo.message import Message
from ._1lcv3a_msodpomdo.setup_1 import SetupItem
Expand Down Expand Up @@ -59,6 +58,7 @@
from ._1mlt9u_mdomsodpo.deskew import Deskew
from ._1mlt9u_mdomsodpo.display import Display
from ._1mlt9u_mdomsodpo.mask import Mask
from ._1mlt9u_mdomsodpo.measurement import Measurement
from ._1mlt9u_mdomsodpo.recall import Recall
from ._1mlt9u_mdomsodpo.select import Select
from ._1mq0z9_msodpo.rf import Rf
Expand Down

0 comments on commit 49e87e9

Please sign in to comment.