Source code for rsrtx.Implementations.Probe.Setup.Noffset

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


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

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

[docs] def set(self, noffset: float, probe=repcap.Probe.Default) -> None: """ ``PROBe<*>:SETup:NOFFset`` \n Snippet: ``driver.probe.setup.noffset.set(noffset = 1.0, probe = repcap.Probe.Default)`` \n Sets the negative offset to compensate a DC voltage applied to the negative input terminal (Vp) referenced to ground. :param noffset: In N probe mode (NMODe) , this offset is used as channel offset and considered automatically for correction. :param probe: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Probe') """ param = Conversions.decimal_value_to_str(noffset) probe_cmd_val = self._cmd_group.get_repcap_cmd_value(probe, repcap.Probe) self._core.io.write_with_opc(f'PROBe{probe_cmd_val}:SETup:NOFFset {param}')
[docs] def get(self, probe=repcap.Probe.Default) -> float: """ ``PROBe<*>:SETup:NOFFset`` \n Snippet: ``value: float = driver.probe.setup.noffset.get(probe = repcap.Probe.Default)`` \n Sets the negative offset to compensate a DC voltage applied to the negative input terminal (Vp) referenced to ground. :param probe: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Probe') :return: noffset: In N probe mode (NMODe) , this offset is used as channel offset and considered automatically for correction. """ probe_cmd_val = self._cmd_group.get_repcap_cmd_value(probe, repcap.Probe) response = self._core.io.query_str_with_opc(f'PROBe{probe_cmd_val}:SETup:NOFFset?') return Conversions.str_to_float(response)