Source code for RsSmw.Implementations.Trigger.LffSweep.Source

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 SourceCls:
	"""
	| Commands in total: 1
	| Subgroups: 0
	| Direct child commands: 1
	"""

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

[docs] def set(self, source: enums.SingExtAuto, inputIx=repcap.InputIx.Default) -> None: """ ``TRIGger<HW>:LFFSweep:SOURce`` \n Snippet: ``driver.trigger.lffSweep.source.set(source = enums.SingExtAuto.AUTO, inputIx = repcap.InputIx.Default)`` \n Selects the trigger source for the corresponding sweeps: \n - FSWeep - RF frequency - LFFSweep - LF frequency - PSWeep - RF level - SWEep - all sweeps The source names of the parameters correspond to the values provided in manual control of the instrument. They differ from the SCPI-compliant names, but the instrument accepts both variants. Use the SCPI name, if compatibility is an important issue. Find the corresponding SCPI-compliant commands in Cross-reference between the manual and remote control. :param source: AUTO | IMMediate | SINGle | BUS | EXTernal | EAUTo AUTO [IMMediate] Executes a sweep automatically. In this free-running mode, the trigger condition is met continuously. I.e. when a sweep is completed, the next one starts immediately. SINGle [BUS] Executes one complete sweep cycle. The following commands initiate a trigger event: ``*TRG`` method ``RsSmw.source.sweep.power.execute.set()`` method ``RsSmw.source.sweep.frequency.execute.set()`` method ``RsSmw.trigger.sweep.immediate.perform()`` , method ``RsSmw.trigger.psweep.immediate.perform()`` and method ``RsSmw.trigger.freqSweep.immediate.perform()`` . Set the sweep mode with the commands: method ``RsSmw.source.sweep.power.mode()`` AUTO | STEP method ``RsSmw.source.sweep.frequency.mode()`` AUTO | STEP method ``RsSmw.source.lfOutput.sweep.frequency.mode()`` AUTO | STEP In step mode (STEP) , the instrument executes only one step. EXTernal An external signal triggers the sweep. EAUTo An external signal triggers the sweep. When one sweep is finished, the next sweep starts. A second trigger event stops the sweep at the current frequency, a third trigger event starts the trigger at the start frequency, and so on. :param inputIx: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Trigger') """ param = Conversions.enum_scalar_to_str(source, enums.SingExtAuto) inputIx_cmd_val = self._cmd_group.get_repcap_cmd_value(inputIx, repcap.InputIx) self._core.io.write(f'TRIGger{inputIx_cmd_val}:LFFSweep:SOURce {param}')
# noinspection PyTypeChecker
[docs] def get(self, inputIx=repcap.InputIx.Default) -> enums.SingExtAuto: """ ``TRIGger<HW>:LFFSweep:SOURce`` \n Snippet: ``value: enums.SingExtAuto = driver.trigger.lffSweep.source.get(inputIx = repcap.InputIx.Default)`` \n Selects the trigger source for the corresponding sweeps: \n - FSWeep - RF frequency - LFFSweep - LF frequency - PSWeep - RF level - SWEep - all sweeps The source names of the parameters correspond to the values provided in manual control of the instrument. They differ from the SCPI-compliant names, but the instrument accepts both variants. Use the SCPI name, if compatibility is an important issue. Find the corresponding SCPI-compliant commands in Cross-reference between the manual and remote control. :param inputIx: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Trigger') :return: source: AUTO | IMMediate | SINGle | BUS | EXTernal | EAUTo AUTO [IMMediate] Executes a sweep automatically. In this free-running mode, the trigger condition is met continuously. I.e. when a sweep is completed, the next one starts immediately. SINGle [BUS] Executes one complete sweep cycle. The following commands initiate a trigger event: ``*TRG`` method ``RsSmw.source.sweep.power.execute.set()`` method ``RsSmw.source.sweep.frequency.execute.set()`` method ``RsSmw.trigger.sweep.immediate.perform()`` , method ``RsSmw.trigger.psweep.immediate.perform()`` and method ``RsSmw.trigger.freqSweep.immediate.perform()`` . Set the sweep mode with the commands: method ``RsSmw.source.sweep.power.mode()`` AUTO | STEP method ``RsSmw.source.sweep.frequency.mode()`` AUTO | STEP method ``RsSmw.source.lfOutput.sweep.frequency.mode()`` AUTO | STEP In step mode (STEP) , the instrument executes only one step. EXTernal An external signal triggers the sweep. EAUTo An external signal triggers the sweep. When one sweep is finished, the next sweep starts. A second trigger event stops the sweep at the current frequency, a third trigger event starts the trigger at the start frequency, and so on. """ inputIx_cmd_val = self._cmd_group.get_repcap_cmd_value(inputIx, repcap.InputIx) response = self._core.io.query_str(f'TRIGger{inputIx_cmd_val}:LFFSweep:SOURce?') return Conversions.str_to_scalar_enum(response, enums.SingExtAuto)