Source code for rsrtx.Implementations.RefCurve.Rescale.Horizontal.Position

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


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

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

[docs] def set(self, offset: float, refCurve=repcap.RefCurve.Default) -> None: """ ``REFCurve<*>:RESCale:HORizontal:POSition`` \n Snippet: ``driver.refCurve.rescale.horizontal.position.set(offset = 1.0, refCurve = repcap.RefCurve.Default)`` \n Moves the waveform horizontally. Enter a value with a time unit suitable for the time scale of the diagram. Positive values shift the waveform to the right, negative values shift it to the left. :param offset: -100E+24 to 100E+24 :param refCurve: optional repeated capability selector. Default value: Nr1 (settable in the interface 'RefCurve') """ param = Conversions.decimal_value_to_str(offset) refCurve_cmd_val = self._cmd_group.get_repcap_cmd_value(refCurve, repcap.RefCurve) self._core.io.write_with_opc(f'REFCurve{refCurve_cmd_val}:RESCale:HORizontal:POSition {param}')
[docs] def get(self, refCurve=repcap.RefCurve.Default) -> float: """ ``REFCurve<*>:RESCale:HORizontal:POSition`` \n Snippet: ``value: float = driver.refCurve.rescale.horizontal.position.get(refCurve = repcap.RefCurve.Default)`` \n Moves the waveform horizontally. Enter a value with a time unit suitable for the time scale of the diagram. Positive values shift the waveform to the right, negative values shift it to the left. :param refCurve: optional repeated capability selector. Default value: Nr1 (settable in the interface 'RefCurve') :return: offset: -100E+24 to 100E+24 """ refCurve_cmd_val = self._cmd_group.get_repcap_cmd_value(refCurve, repcap.RefCurve) response = self._core.io.query_str_with_opc(f'REFCurve{refCurve_cmd_val}:RESCale:HORizontal:POSition?') return Conversions.str_to_float(response)