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 SelectCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("select", core, parent)
[docs]
def set(self, source_detailed: enums.SourceDetailed, trigger=repcap.Trigger.Default) -> None:
"""
``TRIGger<*>:SOURce[:SELect]`` \n
Snippet: ``driver.trigger.source.select.set(source_detailed = enums.SourceDetailed.CHAN1, trigger = repcap.Trigger.Default)`` \n
Selects the source of the trigger signal.
:param source_detailed: CHAN1 | CHANnel1 | CHAN2 | CHANnel2 | CHAN3 | CHANnel3 | CHAN4 | CHANnel4 | EXTernanalog | SBUS | D0 | D1 | D2 | D3 | D4 | D5 | D6 | D7 | D8 | D9 | D10 | D11 | D12 | D13 | D14 | D15 | LOGIC | MSOB1 | MSOB2 | MSOB3 | MSOB4 | Z1V1 | Z1V2 | Z1V3 | Z1V4 | Z1I1 | Z1I2 | Z1I3 | Z1I4 | Z2V1 | Z2V2 | Z2V3 | Z2V4 | Z2I1 | Z2I2 | Z2I3 | Z2I4 | DIFF1 | DIFF2 | COMMON1 | COMMON2 | LINE \n
- CHAN1 = CHANnel1, CHAN2 = CHANnel2, CHAN3 = CHANnel3, CHAN4 = CHANnel4: Input channels
- EXTernanalog: External analog signal connected to the External Trigger Input. For this source, only the analog edge trigger is available.
- LINE: The instrument generates the trigger from the AC power input and synchronizes the signal to the AC power frequency.
- SBUS: Serial bus
- D0...D15: Digital channels (option R&S RTP-B1) See also: 'Trigger settings for digital signals and parallel buses'
- LOGIc: Logic combination of digital channels, used as trigger source (option R&S RTP-B1)
- MSOB1 | MSOB2 | MSOB3 | MSOB4: Parallel bus (option R&S RTP-B1)
- Z1V1 | Z1V2 | Z1V3 | Z1V4 | Z1I1 | Z1I2 | Z1I3 | Z1I4 | Z2V1 | Z2V2 | Z2V3 | Z2V4 | Z2I1 | Z2I2 | Z2I3 | Z2I4: Input channels of R&S RT-ZVCmulti-channel power probe. Only available in the A-trigger with trigger type EDGE.
- DIFF1 | DIFF2 | COMMON1 | COMMON2: Differential signals
:param trigger: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Trigger')
"""
param = Conversions.enum_scalar_to_str(source_detailed, enums.SourceDetailed)
trigger_cmd_val = self._cmd_group.get_repcap_cmd_value(trigger, repcap.Trigger)
self._core.io.write_with_opc(f'TRIGger{trigger_cmd_val}:SOURce:SELect {param}')
# noinspection PyTypeChecker
[docs]
def get(self, trigger=repcap.Trigger.Default) -> enums.SourceDetailed:
"""
``TRIGger<*>:SOURce[:SELect]`` \n
Snippet: ``value: enums.SourceDetailed = driver.trigger.source.select.get(trigger = repcap.Trigger.Default)`` \n
Selects the source of the trigger signal.
:param trigger: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Trigger')
:return: source_detailed: CHAN1 | CHANnel1 | CHAN2 | CHANnel2 | CHAN3 | CHANnel3 | CHAN4 | CHANnel4 | EXTernanalog | SBUS | D0 | D1 | D2 | D3 | D4 | D5 | D6 | D7 | D8 | D9 | D10 | D11 | D12 | D13 | D14 | D15 | LOGIC | MSOB1 | MSOB2 | MSOB3 | MSOB4 | Z1V1 | Z1V2 | Z1V3 | Z1V4 | Z1I1 | Z1I2 | Z1I3 | Z1I4 | Z2V1 | Z2V2 | Z2V3 | Z2V4 | Z2I1 | Z2I2 | Z2I3 | Z2I4 | DIFF1 | DIFF2 | COMMON1 | COMMON2 | LINE \n
- CHAN1 = CHANnel1, CHAN2 = CHANnel2, CHAN3 = CHANnel3, CHAN4 = CHANnel4: Input channels
- EXTernanalog: External analog signal connected to the External Trigger Input. For this source, only the analog edge trigger is available.
- LINE: The instrument generates the trigger from the AC power input and synchronizes the signal to the AC power frequency.
- SBUS: Serial bus
- D0...D15: Digital channels (option R&S RTP-B1) See also: 'Trigger settings for digital signals and parallel buses'
- LOGIc: Logic combination of digital channels, used as trigger source (option R&S RTP-B1)
- MSOB1 | MSOB2 | MSOB3 | MSOB4: Parallel bus (option R&S RTP-B1)
- Z1V1 | Z1V2 | Z1V3 | Z1V4 | Z1I1 | Z1I2 | Z1I3 | Z1I4 | Z2V1 | Z2V2 | Z2V3 | Z2V4 | Z2I1 | Z2I2 | Z2I3 | Z2I4: Input channels of R&S RT-ZVCmulti-channel power probe. Only available in the A-trigger with trigger type EDGE.
- DIFF1 | DIFF2 | COMMON1 | COMMON2: Differential signals
"""
trigger_cmd_val = self._cmd_group.get_repcap_cmd_value(trigger, repcap.Trigger)
response = self._core.io.query_str_with_opc(f'TRIGger{trigger_cmd_val}:SOURce:SELect?')
return Conversions.str_to_scalar_enum(response, enums.SourceDetailed)