Source code for rsrtx.Implementations.Power.Transient

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


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class TransientCls:
	"""
	| Commands in total: 12
	| Subgroups: 3
	| Direct child commands: 9
	"""

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

	@property
	def execute(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_execute'):
			from .Execute import ExecuteCls
			self._execute = ExecuteCls(self._core, self._cmd_group)
		return self._execute

	@property
	def report(self):
		"""
		| Commands in total: 1
		| Subgroups: 1
		| Direct child commands: 0
		"""
		if not hasattr(self, '_report'):
			from .Report import ReportCls
			self._report = ReportCls(self._core, self._cmd_group)
		return self._report

	@property
	def result(self):
		"""
		| Commands in total: 1
		| Subgroups: 1
		| Direct child commands: 0
		"""
		if not hasattr(self, '_result'):
			from .Result import ResultCls
			self._result = ResultCls(self._core, self._cmd_group)
		return self._result

[docs] def get_frequency(self) -> float: """ ``POWer:TRANsient:FREQuency`` \n Snippet: ``value: float = driver.power.transient.get_frequency()`` \n Sets the SMPS switching frequency. :return: smps_frequency: 1 to 100E+6 """ response = self._core.io.query_str('POWer:TRANsient:FREQuency?') return Conversions.str_to_float(response)
[docs] def set_frequency(self, smps_frequency: float) -> None: """ ``POWer:TRANsient:FREQuency`` \n Snippet: ``driver.power.transient.set_frequency(smps_frequency = 1.0)`` \n Sets the SMPS switching frequency. :param smps_frequency: 1 to 100E+6 """ param = Conversions.decimal_value_to_str(smps_frequency) self._core.io.write(f'POWer:TRANsient:FREQuency {param}')
[docs] def get_input_py(self) -> bool: """ ``POWer:TRANsient:INPut`` \n Snippet: ``value: bool = driver.power.transient.get_input_py()`` \n Activates or deactivates the input voltage. :return: three_ch_meas: OFF | ON """ response = self._core.io.query_str('POWer:TRANsient:INPut?') return Conversions.str_to_bool(response)
[docs] def set_input_py(self, three_ch_meas: bool) -> None: """ ``POWer:TRANsient:INPut`` \n Snippet: ``driver.power.transient.set_input_py(three_ch_meas = False)`` \n Activates or deactivates the input voltage. :param three_ch_meas: OFF | ON """ param = Conversions.bool_to_str(three_ch_meas) self._core.io.write(f'POWer:TRANsient:INPut {param}')
[docs] def get_sig_high(self) -> float: """ ``POWer:TRANsient:SIGHigh`` \n Snippet: ``value: float = driver.power.transient.get_sig_high()`` \n Sets the expected signal high voltage value. :return: exp_high_output_sign_lev: -1000 to 1000 """ response = self._core.io.query_str('POWer:TRANsient:SIGHigh?') return Conversions.str_to_float(response)
[docs] def set_sig_high(self, exp_high_output_sign_lev: float) -> None: """ ``POWer:TRANsient:SIGHigh`` \n Snippet: ``driver.power.transient.set_sig_high(exp_high_output_sign_lev = 1.0)`` \n Sets the expected signal high voltage value. :param exp_high_output_sign_lev: -1000 to 1000 """ param = Conversions.decimal_value_to_str(exp_high_output_sign_lev) self._core.io.write(f'POWer:TRANsient:SIGHigh {param}')
[docs] def get_sig_low(self) -> float: """ ``POWer:TRANsient:SIGLow`` \n Snippet: ``value: float = driver.power.transient.get_sig_low()`` \n Sets the expected signal low voltage value. :return: exp_low_output_sign_lev: -1000 to 1000 """ response = self._core.io.query_str('POWer:TRANsient:SIGLow?') return Conversions.str_to_float(response)
[docs] def set_sig_low(self, exp_low_output_sign_lev: float) -> None: """ ``POWer:TRANsient:SIGLow`` \n Snippet: ``driver.power.transient.set_sig_low(exp_low_output_sign_lev = 1.0)`` \n Sets the expected signal low voltage value. :param exp_low_output_sign_lev: -1000 to 1000 """ param = Conversions.decimal_value_to_str(exp_low_output_sign_lev) self._core.io.write(f'POWer:TRANsient:SIGLow {param}')
[docs] def get_hysteresis(self) -> float: """ ``POWer:TRANsient:HYSTeresis`` \n Snippet: ``value: float = driver.power.transient.get_hysteresis()`` \n Specifies a tolerated error band for the signal level. """ response = self._core.io.query_str('POWer:TRANsient:HYSTeresis?') return Conversions.str_to_float(response)
[docs] def set_hysteresis(self, exp_output_sign_tol_tb: float) -> None: """ ``POWer:TRANsient:HYSTeresis`` \n Snippet: ``driver.power.transient.set_hysteresis(exp_output_sign_tol_tb = 1.0)`` \n Specifies a tolerated error band for the signal level. :param exp_output_sign_tol_tb: 0 to 50 """ param = Conversions.decimal_value_to_str(exp_output_sign_tol_tb) self._core.io.write(f'POWer:TRANsient:HYSTeresis {param}')
# noinspection PyTypeChecker
[docs] def get_trg_channel(self) -> enums.ClockSource: """ ``POWer:TRANsient:TRGChannel`` \n Snippet: ``value: enums.ClockSource = driver.power.transient.get_trg_channel()`` \n Sets the source channel of the trigger. :return: trigger_source: CHAN1 = CHANnel1, CHAN2 = CHANnel2, CHAN3 = CHANnel3, CHAN4 = CHANnel4 Only the measurement source channels can be used as trigger source. """ response = self._core.io.query_str('POWer:TRANsient:TRGChannel?') return Conversions.str_to_scalar_enum(response, enums.ClockSource)
[docs] def set_trg_channel(self, trigger_source: enums.ClockSource) -> None: """ ``POWer:TRANsient:TRGChannel`` \n Snippet: ``driver.power.transient.set_trg_channel(trigger_source = enums.ClockSource.CHAN1)`` \n Sets the source channel of the trigger. :param trigger_source: CHAN1 = CHANnel1, CHAN2 = CHANnel2, CHAN3 = CHANnel3, CHAN4 = CHANnel4 Only the measurement source channels can be used as trigger source. """ param = Conversions.enum_scalar_to_str(trigger_source, enums.ClockSource) self._core.io.write(f'POWer:TRANsient:TRGChannel {param}')
[docs] def get_trg_level(self) -> float: """ ``POWer:TRANsient:TRGLevel`` \n Snippet: ``value: float = driver.power.transient.get_trg_level()`` \n No help available :return: trigger_level: -1000 to 1000 """ response = self._core.io.query_str('POWer:TRANsient:TRGLevel?') return Conversions.str_to_float(response)
[docs] def set_trg_level(self, trigger_level: float) -> None: """ ``POWer:TRANsient:TRGLevel`` \n Snippet: ``driver.power.transient.set_trg_level(trigger_level = 1.0)`` \n No help available :param trigger_level: -1000 to 1000 """ param = Conversions.decimal_value_to_str(trigger_level) self._core.io.write(f'POWer:TRANsient:TRGLevel {param}')
# noinspection PyTypeChecker
[docs] def get_trg_slope(self) -> enums.Edge: """ ``POWer:TRANsient:TRGSlope`` \n Snippet: ``value: enums.Edge = driver.power.transient.get_trg_slope()`` \n Sets the edge type for the trigger event. :return: trigger_slope: POSitive | NEGative | EITHer """ response = self._core.io.query_str('POWer:TRANsient:TRGSlope?') return Conversions.str_to_scalar_enum(response, enums.Edge)
[docs] def set_trg_slope(self, trigger_slope: enums.Edge) -> None: """ ``POWer:TRANsient:TRGSlope`` \n Snippet: ``driver.power.transient.set_trg_slope(trigger_slope = enums.Edge.EITHer)`` \n Sets the edge type for the trigger event. :param trigger_slope: POSitive | NEGative | EITHer """ param = Conversions.enum_scalar_to_str(trigger_slope, enums.Edge) self._core.io.write(f'POWer:TRANsient:TRGSlope {param}')
# noinspection PyTypeChecker
[docs] def get_auto_scale(self) -> enums.AutoScale: """ ``POWer:TRANsient:AUToscale`` \n Snippet: ``value: enums.AutoScale = driver.power.transient.get_auto_scale()`` \n Selects the scaling for the display of the results. :return: auto_scale: AUTO | MANUAL """ response = self._core.io.query_str('POWer:TRANsient:AUToscale?') return Conversions.str_to_scalar_enum(response, enums.AutoScale)
[docs] def set_auto_scale(self, auto_scale: enums.AutoScale) -> None: """ ``POWer:TRANsient:AUToscale`` \n Snippet: ``driver.power.transient.set_auto_scale(auto_scale = enums.AutoScale.AUTO)`` \n Selects the scaling for the display of the results. :param auto_scale: AUTO | MANUAL """ param = Conversions.enum_scalar_to_str(auto_scale, enums.AutoScale) self._core.io.write(f'POWer:TRANsient:AUToscale {param}')
def clone(self) -> 'TransientCls': """ Clones the group by creating new object from it and its whole existing subgroups. Also copies all the existing default Repeated Capabilities setting, which you can change independently without affecting the original group. """ new_group = TransientCls(self._core, self._cmd_group.parent) self._cmd_group.synchronize_repcaps(new_group) return new_group