Source code for RsSmw.Implementations.Source.InputPy.Tm.Clock

from .....Internal.Core import Core
from .....Internal.CommandsGroup import CommandsGroup
from .....Internal import Conversions
from ..... import enums


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

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

	# noinspection PyTypeChecker
[docs] def get_impedance(self) -> enums.ImpG50G1K: """ ``[SOURce<HW>]:INPut:TM:CLOCk:IMPedance`` \n Snippet: ``value: enums.ImpG50G1K = driver.source.inputPy.tm.clock.get_impedance()`` \n Selects the input impedance for the external trigger/clock inputs. :return: impedance: G50 | G1K G50 50 Ohm per ground G1K 1 kOhm per ground G10K For backward compatibility with other Rohde & Schwarz signal generators. The R&S SMW200A maps this value to G1K. """ response = self._core.io.query_str('SOURce<HwInstance>:INPut:TM:CLOCk:IMPedance?') return Conversions.str_to_scalar_enum(response, enums.ImpG50G1K)
[docs] def set_impedance(self, impedance: enums.ImpG50G1K) -> None: """ ``[SOURce<HW>]:INPut:TM:CLOCk:IMPedance`` \n Snippet: ``driver.source.inputPy.tm.clock.set_impedance(impedance = enums.ImpG50G1K.G1K)`` \n Selects the input impedance for the external trigger/clock inputs. :param impedance: G50 | G1K G50 50 Ohm per ground G1K 1 kOhm per ground G10K For backward compatibility with other Rohde & Schwarz signal generators. The R&S SMW200A maps this value to G1K. """ param = Conversions.enum_scalar_to_str(impedance, enums.ImpG50G1K) self._core.io.write(f'SOURce<HwInstance>:INPut:TM:CLOCk:IMPedance {param}')
[docs] def get_level(self) -> float: """ ``[SOURce<HW>]:INPut:TM:CLOCk:LEVel`` \n Snippet: ``value: float = driver.source.inputPy.tm.clock.get_level()`` \n Sets the high/low threshold in volts for the trigger and clock signal inputs of the baseband section. :return: level: float Range: 0.3 to 2 """ response = self._core.io.query_str('SOURce<HwInstance>:INPut:TM:CLOCk:LEVel?') return Conversions.str_to_float(response)
[docs] def set_level(self, level: float) -> None: """ ``[SOURce<HW>]:INPut:TM:CLOCk:LEVel`` \n Snippet: ``driver.source.inputPy.tm.clock.set_level(level = 1.0)`` \n Sets the high/low threshold in volts for the trigger and clock signal inputs of the baseband section. :param level: float Range: 0.3 to 2 """ param = Conversions.decimal_value_to_str(level) self._core.io.write(f'SOURce<HwInstance>:INPut:TM:CLOCk:LEVel {param}')
# noinspection PyTypeChecker
[docs] def get_slope(self) -> enums.SlopeType: """ ``[SOURce<HW>]:INPut:TM:CLOCk:SLOPe`` \n Snippet: ``value: enums.SlopeType = driver.source.inputPy.tm.clock.get_slope()`` \n Sets the polarity of the active slope of an externally applied clock signal. :return: slope: NEGative | POSitive """ response = self._core.io.query_str('SOURce<HwInstance>:INPut:TM:CLOCk:SLOPe?') return Conversions.str_to_scalar_enum(response, enums.SlopeType)
[docs] def set_slope(self, slope: enums.SlopeType) -> None: """ ``[SOURce<HW>]:INPut:TM:CLOCk:SLOPe`` \n Snippet: ``driver.source.inputPy.tm.clock.set_slope(slope = enums.SlopeType.NEGative)`` \n Sets the polarity of the active slope of an externally applied clock signal. :param slope: NEGative | POSitive """ param = Conversions.enum_scalar_to_str(slope, enums.SlopeType) self._core.io.write(f'SOURce<HwInstance>:INPut:TM:CLOCk:SLOPe {param}')