from ......Internal.Core import Core
from ......Internal.CommandsGroup import CommandsGroup
from ......Internal import Conversions
from ...... import enums
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class TriggerCls:
"""
| Commands in total: 24
| Subgroups: 7
| Direct child commands: 3
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("trigger", core, parent)
@property
def arm(self):
"""
| Commands in total: 1
| Subgroups: 1
| Direct child commands: 0
"""
if not hasattr(self, '_arm'):
from .Arm import ArmCls
self._arm = ArmCls(self._core, self._cmd_group)
return self._arm
@property
def delay(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_delay'):
from .Delay import DelayCls
self._delay = DelayCls(self._core, self._cmd_group)
return self._delay
@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 external(self):
"""
| Commands in total: 6
| Subgroups: 1
| Direct child commands: 5
"""
if not hasattr(self, '_external'):
from .External import ExternalCls
self._external = ExternalCls(self._core, self._cmd_group)
return self._external
@property
def obaseband(self):
"""
| Commands in total: 4
| Subgroups: 0
| Direct child commands: 4
"""
if not hasattr(self, '_obaseband'):
from .Obaseband import ObasebandCls
self._obaseband = ObasebandCls(self._core, self._cmd_group)
return self._obaseband
@property
def time(self):
"""
| Commands in total: 3
| Subgroups: 2
| Direct child commands: 1
"""
if not hasattr(self, '_time'):
from .Time import TimeCls
self._time = TimeCls(self._core, self._cmd_group)
return self._time
@property
def sequencer(self):
"""
| Commands in total: 5
| Subgroups: 1
| Direct child commands: 0
"""
if not hasattr(self, '_sequencer'):
from .Sequencer import SequencerCls
self._sequencer = SequencerCls(self._core, self._cmd_group)
return self._sequencer
# noinspection PyTypeChecker
[docs]
def get_rmode(self) -> enums.TrigRunMode:
"""
``[SOURce<HW>]:BB:ESEQuencer:TRIGger:RMODe`` \n
Snippet: ``value: enums.TrigRunMode = driver.source.bb.esequencer.trigger.get_rmode()`` \n
Queries the signal generation status.
:return: running_mode: STOP | RUN
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:ESEQuencer:TRIGger:RMODe?')
return Conversions.str_to_scalar_enum(response, enums.TrigRunMode)
# noinspection PyTypeChecker
[docs]
def get_source(self) -> enums.TrigSour:
"""
``[SOURce<HW>]:BB:ESEQuencer:TRIGger:SOURce`` \n
Snippet: ``value: enums.TrigSour = driver.source.bb.esequencer.trigger.get_source()`` \n
Selects the trigger signal source and determines the way the triggering is executed. Provided are the following trigger sources: \n
- INTernal: Internal manual triggering of the instrument
- INTA | INTB: Internal triggering by a signal from the other basebands
- External trigger signal via one of the local or global connectors:
\n
- EGT1 | EGT2: External global trigger
- EGC1 | EGC2: External global clock
- ELTRigger: External local trigger
- ELCLock: External local clock
- For secondary instruments (SCONfiguration:MULTiinstrument:MODE SEC) , triggering
via the external baseband synchronization signal of the primary instrument: SOURce1:BB:ARB:TRIGger:SOURce BBSY
- OBASeband | BEXTernal | EXTernal: Setting only Provided only for backward
compatibility with other Rohde & Schwarz signal generators. The R&S SMW200A accepts these values and maps them
automatically as follows: EXTernal = EGT1, BEXTernal = EGT2, OBASeband = INTA or INTB (depending on the current baseband)
:return: source: INTB | INTernal | OBASeband | EGT1 | EGT2 | EGC1 | EGC2 | ELTRigger | INTA | ELCLock | BEXTernal | EXTernal | BBSY | EGT3 | EGT4
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:ESEQuencer:TRIGger:SOURce?')
return Conversions.str_to_scalar_enum(response, enums.TrigSour)
[docs]
def set_source(self, source: enums.TrigSour) -> None:
"""
``[SOURce<HW>]:BB:ESEQuencer:TRIGger:SOURce`` \n
Snippet: ``driver.source.bb.esequencer.trigger.set_source(source = enums.TrigSour.BBSY)`` \n
Selects the trigger signal source and determines the way the triggering is executed. Provided are the following trigger sources: \n
- INTernal: Internal manual triggering of the instrument
- INTA | INTB: Internal triggering by a signal from the other basebands
- External trigger signal via one of the local or global connectors:
\n
- EGT1 | EGT2: External global trigger
- EGC1 | EGC2: External global clock
- ELTRigger: External local trigger
- ELCLock: External local clock
- For secondary instruments (SCONfiguration:MULTiinstrument:MODE SEC) , triggering
via the external baseband synchronization signal of the primary instrument: SOURce1:BB:ARB:TRIGger:SOURce BBSY
- OBASeband | BEXTernal | EXTernal: Setting only Provided only for backward
compatibility with other Rohde & Schwarz signal generators. The R&S SMW200A accepts these values and maps them
automatically as follows: EXTernal = EGT1, BEXTernal = EGT2, OBASeband = INTA or INTB (depending on the current baseband)
:param source: INTB | INTernal | OBASeband | EGT1 | EGT2 | EGC1 | EGC2 | ELTRigger | INTA | ELCLock | BEXTernal | EXTernal | BBSY | EGT3 | EGT4
"""
param = Conversions.enum_scalar_to_str(source, enums.TrigSour)
self._core.io.write(f'SOURce<HwInstance>:BB:ESEQuencer:TRIGger:SOURce {param}')
# noinspection PyTypeChecker
[docs]
def get_sequence(self) -> enums.DmTrigMode:
"""
``[SOURce<HW>]:BB:ESEQuencer:[TRIGger]:SEQuence`` \n
Snippet: ``value: enums.DmTrigMode = driver.source.bb.esequencer.trigger.get_sequence()`` \n
Selects the trigger mode: \n
- AUTO = auto
- RETRigger = retrigger
- AAUTo = armed auto
- ARETrigger = armed retrigger
- SINGle = single
:return: sequence: AUTO | RETRigger | AAUTo | ARETrigger | SINGle For method ``RsSmw.source.bb.esequencer.mode()`` USER | PSEQuencer | DFINding: AUTO | RETRigger | AAUTo | ARETrigger | SINGle For method ``RsSmw.source.bb.esequencer.mode()`` RTCI: AUTO | AAUTo
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:ESEQuencer:TRIGger:SEQuence?')
return Conversions.str_to_scalar_enum(response, enums.DmTrigMode)
[docs]
def set_sequence(self, sequence: enums.DmTrigMode) -> None:
"""
``[SOURce<HW>]:BB:ESEQuencer:[TRIGger]:SEQuence`` \n
Snippet: ``driver.source.bb.esequencer.trigger.set_sequence(sequence = enums.DmTrigMode.AAUTo)`` \n
Selects the trigger mode: \n
- AUTO = auto
- RETRigger = retrigger
- AAUTo = armed auto
- ARETrigger = armed retrigger
- SINGle = single
:param sequence: AUTO | RETRigger | AAUTo | ARETrigger | SINGle For method ``RsSmw.source.bb.esequencer.mode()`` USER | PSEQuencer | DFINding: AUTO | RETRigger | AAUTo | ARETrigger | SINGle For method ``RsSmw.source.bb.esequencer.mode()`` RTCI: AUTO | AAUTo
"""
param = Conversions.enum_scalar_to_str(sequence, enums.DmTrigMode)
self._core.io.write(f'SOURce<HwInstance>:BB:ESEQuencer:TRIGger:SEQuence {param}')
def clone(self) -> 'TriggerCls':
"""
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 = TriggerCls(self._core, self._cmd_group.parent)
self._cmd_group.synchronize_repcaps(new_group)
return new_group