Source code for rsrtx.Implementations.TrProbe.Setup

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


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class SetupCls:
	"""
	| Commands in total: 22
	| Subgroups: 4
	| Direct child commands: 12
	"""

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

	@property
	def degauss(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_degauss'):
			from .Degauss import DegaussCls
			self._degauss = DegaussCls(self._core, self._cmd_group)
		return self._degauss

	@property
	def advanced(self):
		"""
		| Commands in total: 2
		| Subgroups: 0
		| Direct child commands: 2
		"""
		if not hasattr(self, '_advanced'):
			from .Advanced import AdvancedCls
			self._advanced = AdvancedCls(self._core, self._cmd_group)
		return self._advanced

	@property
	def attenuation(self):
		"""
		| Commands in total: 5
		| Subgroups: 0
		| Direct child commands: 5
		"""
		if not hasattr(self, '_attenuation'):
			from .Attenuation import AttenuationCls
			self._attenuation = AttenuationCls(self._core, self._cmd_group)
		return self._attenuation

	@property
	def gain(self):
		"""
		| Commands in total: 2
		| Subgroups: 0
		| Direct child commands: 2
		"""
		if not hasattr(self, '_gain'):
			from .Gain import GainCls
			self._gain = GainCls(self._core, self._cmd_group)
		return self._gain

[docs] def get_bandwidth(self) -> float: """ ``TRPRobe:SETup:BANDwidth`` \n Snippet: ``value: float = driver.trProbe.setup.get_bandwidth()`` \n Queries the bandwidth of the probe. :return: bandwidth: 10000 to 20E+9 """ response = self._core.io.query_str_with_opc('TRPRobe:SETup:BANDwidth?') return Conversions.str_to_float(response)
[docs] def get_capacitance(self) -> float: """ ``TRPRobe:SETup:CAPacitance`` \n Snippet: ``value: float = driver.trProbe.setup.get_capacitance()`` \n Queries the input capacitance of the probe. :return: input_capacity: 100E-15 to 1E-9 """ response = self._core.io.query_str_with_opc('TRPRobe:SETup:CAPacitance?') return Conversions.str_to_float(response)
# noinspection PyTypeChecker
[docs] def get_display_diff(self) -> enums.DisplayDiff: """ ``TRPRobe:SETup:DISPlaydiff`` \n Snippet: ``value: enums.DisplayDiff = driver.trProbe.setup.get_display_diff()`` \n Selects the input voltages to be measured by the ProbeMeter of an R&S differential active probe. :return: display_diff: DIFFerential | SINGleended \n - DIFFerential: Measures differential and common mode voltages - SINGleended: Measures the voltage between the positive/negative signal socket and the ground. """ response = self._core.io.query_str_with_opc('TRPRobe:SETup:DISPlaydiff?') return Conversions.str_to_scalar_enum(response, enums.DisplayDiff)
[docs] def set_display_diff(self, display_diff: enums.DisplayDiff) -> None: """ ``TRPRobe:SETup:DISPlaydiff`` \n Snippet: ``driver.trProbe.setup.set_display_diff(display_diff = enums.DisplayDiff.DIFFerential)`` \n Selects the input voltages to be measured by the ProbeMeter of an R&S differential active probe. :param display_diff: DIFFerential | SINGleended \n - DIFFerential: Measures differential and common mode voltages - SINGleended: Measures the voltage between the positive/negative signal socket and the ground. """ param = Conversions.enum_scalar_to_str(display_diff, enums.DisplayDiff) self._core.io.write_with_opc(f'TRPRobe:SETup:DISPlaydiff {param}')
[docs] def get_impedance(self) -> float: """ ``TRPRobe:SETup:IMPedance`` \n Snippet: ``value: float = driver.trProbe.setup.get_impedance()`` \n Queries the termination of the probe. :return: input_impedance: 0 to 1E+9 """ response = self._core.io.query_str_with_opc('TRPRobe:SETup:IMPedance?') return Conversions.str_to_float(response)
# noinspection PyTypeChecker
[docs] def get_mode(self) -> enums.ProbeSetupMode: """ ``TRPRobe:SETup:MODE`` \n Snippet: ``value: enums.ProbeSetupMode = driver.trProbe.setup.get_mode()`` \n No help available """ response = self._core.io.query_str_with_opc('TRPRobe:SETup:MODE?') return Conversions.str_to_scalar_enum(response, enums.ProbeSetupMode)
[docs] def set_mode(self, mode: enums.ProbeSetupMode) -> None: """ ``TRPRobe:SETup:MODE`` \n Snippet: ``driver.trProbe.setup.set_mode(mode = enums.ProbeSetupMode.AUToset)`` \n No help available """ param = Conversions.enum_scalar_to_str(mode, enums.ProbeSetupMode) self._core.io.write_with_opc(f'TRPRobe:SETup:MODE {param}')
[docs] def get_name(self) -> str: """ ``TRPRobe:SETup:NAME`` \n Snippet: ``value: str = driver.trProbe.setup.get_name()`` \n Queries the name of the probe. :return: name: Name string """ response = self._core.io.query_str_with_opc('TRPRobe:SETup:NAME?') return trim_str_response(response)
# noinspection PyTypeChecker
[docs] def get_state(self) -> enums.ProbeSetupState: """ ``TRPRobe:SETup:STATe`` \n Snippet: ``value: enums.ProbeSetupState = driver.trProbe.setup.get_state()`` \n Queries if the probe at the specified input channel is active (detected) or not active (not detected) . To switch the probe on, use method ``RsRtx.channel.state.set()`` . :return: state: DETected | NDETected """ response = self._core.io.query_str_with_opc('TRPRobe:SETup:STATe?') return Conversions.str_to_scalar_enum(response, enums.ProbeSetupState)
[docs] def get_type_py(self) -> str: """ ``TRPRobe:SETup:TYPE`` \n Snippet: ``value: str = driver.trProbe.setup.get_type_py()`` \n Queries the type of the probe. :return: type_py: String containing one of the following values: – None (no probe detected) – Passive Probe – active single-ended """ response = self._core.io.query_str_with_opc('TRPRobe:SETup:TYPE?') return trim_str_response(response)
[docs] def get_cm_offset(self) -> float: """ ``TRPRobe:SETup:CMOFfset`` \n Snippet: ``value: float = driver.trProbe.setup.get_cm_offset()`` \n Sets the common-mode offset. The setting is only available for differential probes. :return: cm_offset: -100E+24 to 100E+24 """ response = self._core.io.query_str_with_opc('TRPRobe:SETup:CMOFfset?') return Conversions.str_to_float(response)
[docs] def set_cm_offset(self, cm_offset: float) -> None: """ ``TRPRobe:SETup:CMOFfset`` \n Snippet: ``driver.trProbe.setup.set_cm_offset(cm_offset = 1.0)`` \n Sets the common-mode offset. The setting is only available for differential probes. :param cm_offset: -100E+24 to 100E+24 """ param = Conversions.decimal_value_to_str(cm_offset) self._core.io.write_with_opc(f'TRPRobe:SETup:CMOFfset {param}')
[docs] def get_zaxv(self) -> bool: """ ``TRPRobe:SETup:ZAXV`` \n Snippet: ``value: bool = driver.trProbe.setup.get_zaxv()`` \n If you use the external attenuator R&S RT-ZA15 together with one of the differential active probes R&S RT-ZD10/20/30, enable it to include the external attenuation in the measurements. :return: ext_att_rt_za_15: OFF | ON """ response = self._core.io.query_str_with_opc('TRPRobe:SETup:ZAXV?') return Conversions.str_to_bool(response)
[docs] def set_zaxv(self, ext_att_rt_za_15: bool) -> None: """ ``TRPRobe:SETup:ZAXV`` \n Snippet: ``driver.trProbe.setup.set_zaxv(ext_att_rt_za_15 = False)`` \n If you use the external attenuator R&S RT-ZA15 together with one of the differential active probes R&S RT-ZD10/20/30, enable it to include the external attenuation in the measurements. :param ext_att_rt_za_15: OFF | ON """ param = Conversions.bool_to_str(ext_att_rt_za_15) self._core.io.write_with_opc(f'TRPRobe:SETup:ZAXV {param}')
[docs] def get_ac_coupling(self) -> bool: """ ``TRPRobe:SETup:ACCoupling`` \n Snippet: ``value: bool = driver.trProbe.setup.get_ac_coupling()`` \n Enables AC coupling in the R&S RT-ZPR20 probe, which removes DC and very low-frequency components. The R&S RT-ZPR20 probe requires 50 Ω input termination, for which the channel AC coupling is not available. The probe setting allows AC coupling also at 50 Ω inputs. """ response = self._core.io.query_str_with_opc('TRPRobe:SETup:ACCoupling?') return Conversions.str_to_bool(response)
[docs] def set_ac_coupling(self, probe_cpl_ac: bool) -> None: """ ``TRPRobe:SETup:ACCoupling`` \n Snippet: ``driver.trProbe.setup.set_ac_coupling(probe_cpl_ac = False)`` \n Enables AC coupling in the R&S RT-ZPR20 probe, which removes DC and very low-frequency components. The R&S RT-ZPR20 probe requires 50 Ω input termination, for which the channel AC coupling is not available. The probe setting allows AC coupling also at 50 Ω inputs. :param probe_cpl_ac: OFF | ON """ param = Conversions.bool_to_str(probe_cpl_ac) self._core.io.write_with_opc(f'TRPRobe:SETup:ACCoupling {param}')
# noinspection PyTypeChecker
[docs] def get_pr_mode(self) -> enums.ProbeMeasMode: """ ``TRPRobe:SETup:PRMode`` \n Snippet: ``value: enums.ProbeMeasMode = driver.trProbe.setup.get_pr_mode()`` \n Sets the measurement mode of the modular probe. """ response = self._core.io.query_str_with_opc('TRPRobe:SETup:PRMode?') return Conversions.str_to_scalar_enum(response, enums.ProbeMeasMode)
[docs] def set_pr_mode(self, prb_meas_md: enums.ProbeMeasMode) -> None: """ ``TRPRobe:SETup:PRMode`` \n Snippet: ``driver.trProbe.setup.set_pr_mode(prb_meas_md = enums.ProbeMeasMode.CMODe)`` \n Sets the measurement mode of the modular probe. :param prb_meas_md: DMODe | CMODe | PMODe | NMODe \n - DMODe: Differential mode input voltage (Vdm) , the voltage between the positive and negative input terminal. - CMODe: Common mode input voltage (Vcm) , the mean voltage between the positive and negative input terminal vs. ground. - PMODe: Positive single-ended input voltage (Vp) . the voltage between the positive input terminal and ground. - NMODe: Negative single-ended input voltage (VN) . the voltage between the negative input terminal and ground. """ param = Conversions.enum_scalar_to_str(prb_meas_md, enums.ProbeMeasMode) self._core.io.write_with_opc(f'TRPRobe:SETup:PRMode {param}')
def clone(self) -> 'SetupCls': """ 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 = SetupCls(self._core, self._cmd_group.parent) self._cmd_group.synchronize_repcaps(new_group) return new_group