Source code for rsrtx.Implementations.Trigger.Holdoff.Scaling

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


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

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

[docs] def set(self, auto_time_scl: float, trigger=repcap.Trigger.Default) -> None: """ ``TRIGger<*>:HOLDoff:SCALing`` \n Snippet: ``driver.trigger.holdoff.scaling.set(auto_time_scl = 1.0, trigger = repcap.Trigger.Default)`` \n Sets the auto time scaling factor the horizontal scale is multipied with: Auto time = Auto time scaling * Horizontal scale. The setting is relevant if the holdoff mode is set to AUTO. See also: \n - method ``RsRtx.trigger.holdoff.mode.set()`` - method ``RsRtx.trigger.holdoff.autoTime.get()`` :param auto_time_scl: 1E-3 to 1000 :param trigger: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Trigger') """ param = Conversions.decimal_value_to_str(auto_time_scl) trigger_cmd_val = self._cmd_group.get_repcap_cmd_value(trigger, repcap.Trigger) self._core.io.write_with_opc(f'TRIGger{trigger_cmd_val}:HOLDoff:SCALing {param}')
[docs] def get(self, trigger=repcap.Trigger.Default) -> float: """ ``TRIGger<*>:HOLDoff:SCALing`` \n Snippet: ``value: float = driver.trigger.holdoff.scaling.get(trigger = repcap.Trigger.Default)`` \n Sets the auto time scaling factor the horizontal scale is multipied with: Auto time = Auto time scaling * Horizontal scale. The setting is relevant if the holdoff mode is set to AUTO. See also: \n - method ``RsRtx.trigger.holdoff.mode.set()`` - method ``RsRtx.trigger.holdoff.autoTime.get()`` :param trigger: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Trigger') :return: auto_time_scl: 1E-3 to 1000 """ trigger_cmd_val = self._cmd_group.get_repcap_cmd_value(trigger, repcap.Trigger) response = self._core.io.query_str_with_opc(f'TRIGger{trigger_cmd_val}:HOLDoff:SCALing?') return Conversions.str_to_float(response)