from ......Internal.Core import Core
from ......Internal.CommandsGroup import CommandsGroup
from ......Internal import Conversions
from ...... import enums
from ...... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class MaxCurrentCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("maxCurrent", core, parent)
[docs]
def set(self, int_shunt_meas_rg: enums.IntShuntMeasRange, zvcProbe=repcap.ZvcProbe.Default, zvcChannel=repcap.ZvcChannel.Default) -> None:
"""
``ZVC:Z<*>:I<*>:SHUNt:MAXCurrent`` \n
Snippet: ``driver.zvc.z.icurrent.shunt.maxCurrent.set(int_shunt_meas_rg = enums.IntShuntMeasRange.A100r01, zvcProbe = repcap.ZvcProbe.Default, zvcChannel = repcap.ZvcChannel.Default)`` \n
Sets the maximum current and the internal shunt value. The internal shunt and maximum current parameter pairs are defined
as described in the table below.
Parameter / Internal shunt / Maximum current \n
- A100r01 / 10 A / 10 mΩ
- A40R01 / 4.5 A / 10 mΩ
- A45M10r / 45 mA / 10 Ω
- A4M510r / 4.5 mA / 10 Ω
- A45u10k / 45 µA / 10 KΩ
- A4U510k / 4.5 µA / 10 KΩ
:param int_shunt_meas_rg: A100r01 | A40R01 | A45M10r | A4M510r | A45u10k | A4U510k
: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.enum_scalar_to_str(int_shunt_meas_rg, enums.IntShuntMeasRange)
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}:SHUNt:MAXCurrent {param}')
# noinspection PyTypeChecker
[docs]
def get(self, zvcProbe=repcap.ZvcProbe.Default, zvcChannel=repcap.ZvcChannel.Default) -> enums.IntShuntMeasRange:
"""
``ZVC:Z<*>:I<*>:SHUNt:MAXCurrent`` \n
Snippet: ``value: enums.IntShuntMeasRange = driver.zvc.z.icurrent.shunt.maxCurrent.get(zvcProbe = repcap.ZvcProbe.Default, zvcChannel = repcap.ZvcChannel.Default)`` \n
Sets the maximum current and the internal shunt value. The internal shunt and maximum current parameter pairs are defined
as described in the table below.
Parameter / Internal shunt / Maximum current \n
- A100r01 / 10 A / 10 mΩ
- A40R01 / 4.5 A / 10 mΩ
- A45M10r / 45 mA / 10 Ω
- A4M510r / 4.5 mA / 10 Ω
- A45u10k / 45 µA / 10 KΩ
- A4U510k / 4.5 µA / 10 KΩ
: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: int_shunt_meas_rg: A100r01 | A40R01 | A45M10r | A4M510r | A45u10k | A4U510k
"""
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}:SHUNt:MAXCurrent?')
return Conversions.str_to_scalar_enum(response, enums.IntShuntMeasRange)