from ....Internal.Core import Core
from ....Internal.CommandsGroup import CommandsGroup
from ....Internal import Conversions
from .... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class ScaleCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("scale", core, parent)
[docs]
def set(self, vert_scl_common: float, differential=repcap.Differential.Default) -> None:
"""
``DIFFerential<*>:COMMon:SCALe`` \n
Snippet: ``driver.differential.common.scale.set(vert_scl_common = 1.0, differential = repcap.Differential.Default)`` \n
Set the vertical scale of differential and common mode waveforms, respectively. Vertical settings of P and N output are
the vertical settings of the input channels.
:param vert_scl_common: Scale value, given in Volts per division.
:param differential: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Differential')
"""
param = Conversions.decimal_value_to_str(vert_scl_common)
differential_cmd_val = self._cmd_group.get_repcap_cmd_value(differential, repcap.Differential)
self._core.io.write_with_opc(f'DIFFerential{differential_cmd_val}:COMMon:SCALe {param}')
[docs]
def get(self, differential=repcap.Differential.Default) -> float:
"""
``DIFFerential<*>:COMMon:SCALe`` \n
Snippet: ``value: float = driver.differential.common.scale.get(differential = repcap.Differential.Default)`` \n
Set the vertical scale of differential and common mode waveforms, respectively. Vertical settings of P and N output are
the vertical settings of the input channels.
:param differential: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Differential')
"""
differential_cmd_val = self._cmd_group.get_repcap_cmd_value(differential, repcap.Differential)
response = self._core.io.query_str_with_opc(f'DIFFerential{differential_cmd_val}:COMMon:SCALe?')
return Conversions.str_to_float(response)