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, vertical_scale: float, zvcProbe=repcap.ZvcProbe.Default, zvcChannel=repcap.ZvcChannel.Default) -> None:
"""
``ZVC:Z<*>:I<*>:SCALe`` \n
Snippet: ``driver.zvc.z.icurrent.scale.set(vertical_scale = 1.0, zvcProbe = repcap.ZvcProbe.Default, zvcChannel = repcap.ZvcChannel.Default)`` \n
Sets the vertical scale for the current channel in Volts per division. Increasing the scale compresses the display of the
signal.
:param vertical_scale: 1E-15 to 10E+24
:param zvcProbe: optional repeated capability selector. Default value: Ix1 (settable in the interface 'Z')
:param zvcChannel: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Icurrent')
"""
param = Conversions.decimal_value_to_str(vertical_scale)
zvcProbe_cmd_val = self._cmd_group.get_repcap_cmd_value(zvcProbe, repcap.ZvcProbe)
zvcChannel_cmd_val = self._cmd_group.get_repcap_cmd_value(zvcChannel, repcap.ZvcChannel)
self._core.io.write_with_opc(f'ZVC:Z{zvcProbe_cmd_val}:I{zvcChannel_cmd_val}:SCALe {param}')
[docs]
def get(self, zvcProbe=repcap.ZvcProbe.Default, zvcChannel=repcap.ZvcChannel.Default) -> float:
"""
``ZVC:Z<*>:I<*>:SCALe`` \n
Snippet: ``value: float = driver.zvc.z.icurrent.scale.get(zvcProbe = repcap.ZvcProbe.Default, zvcChannel = repcap.ZvcChannel.Default)`` \n
Sets the vertical scale for the current channel in Volts per division. Increasing the scale compresses the display of the
signal.
:param zvcProbe: optional repeated capability selector. Default value: Ix1 (settable in the interface 'Z')
:param zvcChannel: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Icurrent')
:return: vertical_scale: 1E-15 to 10E+24
"""
zvcProbe_cmd_val = self._cmd_group.get_repcap_cmd_value(zvcProbe, repcap.ZvcProbe)
zvcChannel_cmd_val = self._cmd_group.get_repcap_cmd_value(zvcChannel, repcap.ZvcChannel)
response = self._core.io.query_str_with_opc(f'ZVC:Z{zvcProbe_cmd_val}:I{zvcChannel_cmd_val}:SCALe?')
return Conversions.str_to_float(response)