Source code for RsFsw.Implementations.Applications.K10x_Lte.Sense.Probe.Setup.CmOffset

from .......Internal.Core import Core
from .......Internal.CommandsGroup import CommandsGroup
from .......Internal import Conversions
from ....... import repcap


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class CmOffsetCls:
	"""
	| Commands in total: 1
	| Subgroups: 0
	| Direct child commands: 1
	"""

	def __init__(self, core: Core, parent):
		self._core = core
		self._cmd_group = CommandsGroup("cmOffset", core, parent)

[docs] def set(self, offset: float, probe=repcap.Probe.Default) -> None: """ ``[SENSe]:PROBe<pb>:SETup:CMOFfset`` \n Snippet: ``driver.applications.k10Xlte.sense.probe.setup.cmOffset.set(offset = 1.0, probe = repcap.Probe.Default)`` \n Sets the common mode offset. The setting is only available if a differential probe in CM-mode is connected to the FSW. If the probe is disconnected, the common mode offset of the probe is reset to 0.0 V. Note that if the offset for DM-mode or CM-mode is changed, the offsets for the P-mode and N-mode are adapted accordingly, and vice versa. For details see 'Using Probes'. :param probe: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Probe') """ param = Conversions.decimal_value_to_str(offset) probe_cmd_val = self._cmd_group.get_repcap_cmd_value(probe, repcap.Probe) self._core.io.write(f'SENSe:PROBe{probe_cmd_val}:SETup:CMOFfset {param}')
[docs] def get(self, probe=repcap.Probe.Default) -> float: """ ``[SENSe]:PROBe<pb>:SETup:CMOFfset`` \n Snippet: ``value: float = driver.applications.k10Xlte.sense.probe.setup.cmOffset.get(probe = repcap.Probe.Default)`` \n Sets the common mode offset. The setting is only available if a differential probe in CM-mode is connected to the FSW. If the probe is disconnected, the common mode offset of the probe is reset to 0.0 V. Note that if the offset for DM-mode or CM-mode is changed, the offsets for the P-mode and N-mode are adapted accordingly, and vice versa. For details see 'Using Probes'. :param probe: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Probe') """ probe_cmd_val = self._cmd_group.get_repcap_cmd_value(probe, repcap.Probe) response = self._core.io.query_str(f'SENSe:PROBe{probe_cmd_val}:SETup:CMOFfset?') return Conversions.str_to_float(response)