Source code for RsSmw.Implementations.Source.LfOutput.Frequency

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


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

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

[docs] def set(self, frequency: float, lfOutput=repcap.LfOutput.Default) -> None: """ ``[SOURce<HW>]:LFOutput<CH>:FREQuency`` \n Snippet: ``driver.source.lfOutput.frequency.set(frequency = 1.0, lfOutput = repcap.LfOutput.Default)`` \n Sets the frequency of the LF signal in method ``RsSmw.source.lfOutput.frequency.mode()`` CW | FIXed mode. Note: \n - If the LF generator is used as a signal source, the instrument performs the analog modulations (AM/FM/FiM/PM) with this frequency. - In sweep mode (method ``RsSmw.source.lfOutput.frequency.mode()`` SWE) , the frequency is coupled with the sweep frequency. :param frequency: float Range: 0.1 to depends on options (R&S SMW-K24) , Unit: Hz :param lfOutput: optional repeated capability selector. Default value: Nr1 (settable in the interface 'LfOutput') """ param = Conversions.decimal_value_to_str(frequency) lfOutput_cmd_val = self._cmd_group.get_repcap_cmd_value(lfOutput, repcap.LfOutput) self._core.io.write(f'SOURce<HwInstance>:LFOutput{lfOutput_cmd_val}:FREQuency {param}')
[docs] def get(self, lfOutput=repcap.LfOutput.Default) -> float: """ ``[SOURce<HW>]:LFOutput<CH>:FREQuency`` \n Snippet: ``value: float = driver.source.lfOutput.frequency.get(lfOutput = repcap.LfOutput.Default)`` \n Sets the frequency of the LF signal in method ``RsSmw.source.lfOutput.frequency.mode()`` CW | FIXed mode. Note: \n - If the LF generator is used as a signal source, the instrument performs the analog modulations (AM/FM/FiM/PM) with this frequency. - In sweep mode (method ``RsSmw.source.lfOutput.frequency.mode()`` SWE) , the frequency is coupled with the sweep frequency. :param lfOutput: optional repeated capability selector. Default value: Nr1 (settable in the interface 'LfOutput') :return: frequency: float Range: 0.1 to depends on options (R&S SMW-K24) , Unit: Hz """ lfOutput_cmd_val = self._cmd_group.get_repcap_cmd_value(lfOutput, repcap.LfOutput) response = self._core.io.query_str(f'SOURce<HwInstance>:LFOutput{lfOutput_cmd_val}:FREQuency?') return Conversions.str_to_float(response)
[docs] def get_manual(self) -> float: """ ``[SOURce<HW>]:LFOutput:FREQuency:MANual`` \n Snippet: ``value: float = driver.source.lfOutput.frequency.get_manual()`` \n Sets the frequency of the subsequent sweep step if LFO:SWE:MODE MAN. Use a separate command for each sweep step. :return: manual: float You can select any value within the setting range, where: STARt is set with method ``RsSmw.source.lfOutput.frequency.start()`` STOP is set with method ``RsSmw.source.lfOutput.frequency.stop()`` Range: STARt to STOP """ response = self._core.io.query_str('SOURce<HwInstance>:LFOutput:FREQuency:MANual?') return Conversions.str_to_float(response)
[docs] def set_manual(self, manual: float) -> None: """ ``[SOURce<HW>]:LFOutput:FREQuency:MANual`` \n Snippet: ``driver.source.lfOutput.frequency.set_manual(manual = 1.0)`` \n Sets the frequency of the subsequent sweep step if LFO:SWE:MODE MAN. Use a separate command for each sweep step. :param manual: float You can select any value within the setting range, where: STARt is set with method ``RsSmw.source.lfOutput.frequency.start()`` STOP is set with method ``RsSmw.source.lfOutput.frequency.stop()`` Range: STARt to STOP """ param = Conversions.decimal_value_to_str(manual) self._core.io.write(f'SOURce<HwInstance>:LFOutput:FREQuency:MANual {param}')
# noinspection PyTypeChecker
[docs] def get_mode(self) -> enums.LfFreqMode: """ ``[SOURce<HW>]:LFOutput:FREQuency:MODE`` \n Snippet: ``value: enums.LfFreqMode = driver.source.lfOutput.frequency.get_mode()`` \n Sets the mode for the output of the LF generator frequency, and determines the commands to be used for frequency settings. :return: mode: CW | FIXed | SWEep CW | FIXed Sets the fixed-frequency mode. CW and FIXed are synonyms. To set the output frequency, use method ``RsSmw.source.lfOutput.frequency.set()`` SWEep Sets sweep mode. To set the frequency, use the commands: method ``RsSmw.source.lfOutput.frequency.start()`` and method ``RsSmw.source.lfOutput.frequency.stop()`` Or method ``RsSmw.source.lfOutput.frequency.manual()`` """ response = self._core.io.query_str('SOURce<HwInstance>:LFOutput:FREQuency:MODE?') return Conversions.str_to_scalar_enum(response, enums.LfFreqMode)
[docs] def set_mode(self, mode: enums.LfFreqMode) -> None: """ ``[SOURce<HW>]:LFOutput:FREQuency:MODE`` \n Snippet: ``driver.source.lfOutput.frequency.set_mode(mode = enums.LfFreqMode.CW)`` \n Sets the mode for the output of the LF generator frequency, and determines the commands to be used for frequency settings. :param mode: CW | FIXed | SWEep CW | FIXed Sets the fixed-frequency mode. CW and FIXed are synonyms. To set the output frequency, use method ``RsSmw.source.lfOutput.frequency.set()`` SWEep Sets sweep mode. To set the frequency, use the commands: method ``RsSmw.source.lfOutput.frequency.start()`` and method ``RsSmw.source.lfOutput.frequency.stop()`` Or method ``RsSmw.source.lfOutput.frequency.manual()`` """ param = Conversions.enum_scalar_to_str(mode, enums.LfFreqMode) self._core.io.write(f'SOURce<HwInstance>:LFOutput:FREQuency:MODE {param}')
[docs] def get_start(self) -> float: """ ``[SOURce<HW>]:LFOutput:FREQuency:STARt`` \n Snippet: ``value: float = driver.source.lfOutput.frequency.get_start()`` \n Sets the start/stop frequency for method ``RsSmw.source.lfOutput.frequency.mode()`` SWEep. :return: start: float Range: 0.1 Hz to 1 MHz """ response = self._core.io.query_str('SOURce<HwInstance>:LFOutput:FREQuency:STARt?') return Conversions.str_to_float(response)
[docs] def set_start(self, start: float) -> None: """ ``[SOURce<HW>]:LFOutput:FREQuency:STARt`` \n Snippet: ``driver.source.lfOutput.frequency.set_start(start = 1.0)`` \n Sets the start/stop frequency for method ``RsSmw.source.lfOutput.frequency.mode()`` SWEep. :param start: float Range: 0.1 Hz to 1 MHz """ param = Conversions.decimal_value_to_str(start) self._core.io.write(f'SOURce<HwInstance>:LFOutput:FREQuency:STARt {param}')
[docs] def get_stop(self) -> float: """ ``[SOURce<HW>]:LFOutput:FREQuency:STOP`` \n Snippet: ``value: float = driver.source.lfOutput.frequency.get_stop()`` \n Sets the start/stop frequency for method ``RsSmw.source.lfOutput.frequency.mode()`` SWEep. """ response = self._core.io.query_str('SOURce<HwInstance>:LFOutput:FREQuency:STOP?') return Conversions.str_to_float(response)
[docs] def set_stop(self, stop: float) -> None: """ ``[SOURce<HW>]:LFOutput:FREQuency:STOP`` \n Snippet: ``driver.source.lfOutput.frequency.set_stop(stop = 1.0)`` \n Sets the start/stop frequency for method ``RsSmw.source.lfOutput.frequency.mode()`` SWEep. :param stop: float Range: 0.1 Hz to 1 MHz """ param = Conversions.decimal_value_to_str(stop) self._core.io.write(f'SOURce<HwInstance>:LFOutput:FREQuency:STOP {param}')