diff --git a/CHANGELOG.md b/CHANGELOG.md index b30387b3f..9491b5001 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1691,17 +1691,25 @@ #### [nirfsg] Unreleased - Added - Changed - - Fixed the return type of `get_all_script_names` and `get_all_named_waveform_names` to remove the size parameter and return a list of strings instead of a comma-separated string + - Added default value for `module` parameter in `get_self_cal_last_date_and_time` and `get_self_calibration_temperature` methods to align with documentation and allow duck-typing - Changed the parameter name for waveform name from `name` to `waveform_name` in `clear_arb_waveform` and `select_arb_waveform` to be consistent with other waveform methods - Changed the name of below methods to be consistent with other APIs in the repository - `get_self_calibration_last_date_and_time` to `get_self_cal_last_date_and_time` - `get_external_calibration_last_date_and_time` to `get_ext_cal_last_date_and_time` - - Added default value for `module` parameter in `get_self_cal_last_date_and_time` and `get_self_calibration_temperature` methods to align with documentation and allow duck-typing - - Updated `self_test` to not have any parameters, aligning with other APIs in the repository - Changed `frequency_settling` property to be of type float instead of hightime.timedelta, since it can have multiple interpretation based on `frequency_settling_units` property value - Changed `interpolation_delay` and `relative_delay` properties to be of type hightime.timedelta, so that it aligns with _delay_ attributes across other APIs in the repository - - Updated `wait_until_settled` method to have `max_time_milliseconds` parameter as type hightime.timedelta with a default value of 10 seconds - Changed `exported_ref_clock_rate` and `ref_clock_rate` properties to be of type float instead of enum, since the enums just represented raw float values + - Fixed the return type of `get_all_script_names` and `get_all_named_waveform_names` to remove the size parameter and return a list of strings instead of a comma-separated string + - Updated `self_test` to not have any parameters, aligning with other APIs in the repository + - Updated `wait_until_settled` method to have `max_time_milliseconds` parameter as type hightime.timedelta with a default value of 10 seconds + - Updated below properties and method parameters to be of string enum type instead of plain string, since they would support only fixed set of strings + - `pulse_modulation_source` + - `exported_pulse_modulation_event_output_terminal` + - `exported_ref_clock_output_terminal` + - `lo_source` + - `arb_sample_clock_source` + - `ref_clock_source` + - `trigger_identifier` parameter in `send_software_edge_trigger` method - Removed - Methods and properties applicable only to hardware which are not supported anymore - Methods diff --git a/docs/nirfsg/class.rst b/docs/nirfsg/class.rst index 5a107407e..b5dfe9a3a 100644 --- a/docs/nirfsg/class.rst +++ b/docs/nirfsg/class.rst @@ -2310,7 +2310,7 @@ send_software_edge_trigger .. note:: One or more of the referenced values are not in the Python API for this driver. Enums that only define values, or represent True/False, have been removed. - :type trigger_identifier: str + :type trigger_identifier: :py:data:`nirfsg.TriggerIdentifier` set_arb_waveform_next_write_position ------------------------------------ @@ -3460,15 +3460,15 @@ arb_sample_clock_source The following table lists the characteristics of this property. - +-----------------------+------------+ - | Characteristic | Value | - +=======================+============+ - | Datatype | str | - +-----------------------+------------+ - | Permissions | read-write | - +-----------------------+------------+ - | Repeated Capabilities | None | - +-----------------------+------------+ + +-----------------------+----------------------------+ + | Characteristic | Value | + +=======================+============================+ + | Datatype | enums.ArbSampleClockSource | + +-----------------------+----------------------------+ + | Permissions | read-write | + +-----------------------+----------------------------+ + | Repeated Capabilities | None | + +-----------------------+----------------------------+ .. tip:: This property corresponds to the following LabVIEW Property or C Attribute: @@ -5243,15 +5243,15 @@ exported_pulse_modulation_event_output_terminal The following table lists the characteristics of this property. - +-----------------------+------------+ - | Characteristic | Value | - +=======================+============+ - | Datatype | str | - +-----------------------+------------+ - | Permissions | read-write | - +-----------------------+------------+ - | Repeated Capabilities | None | - +-----------------------+------------+ + +-----------------------+-------------------------------------+ + | Characteristic | Value | + +=======================+=====================================+ + | Datatype | enums.PulseModulationOutputTerminal | + +-----------------------+-------------------------------------+ + | Permissions | read-write | + +-----------------------+-------------------------------------+ + | Repeated Capabilities | None | + +-----------------------+-------------------------------------+ .. tip:: This property corresponds to the following LabVIEW Property or C Attribute: @@ -5302,15 +5302,15 @@ exported_ref_clock_output_terminal The following table lists the characteristics of this property. - +-----------------------+------------+ - | Characteristic | Value | - +=======================+============+ - | Datatype | str | - +-----------------------+------------+ - | Permissions | read-write | - +-----------------------+------------+ - | Repeated Capabilities | None | - +-----------------------+------------+ + +-----------------------+------------------------------------------+ + | Characteristic | Value | + +=======================+==========================================+ + | Datatype | enums.ReferenceClockExportOutputTerminal | + +-----------------------+------------------------------------------+ + | Permissions | read-write | + +-----------------------+------------------------------------------+ + | Repeated Capabilities | None | + +-----------------------+------------------------------------------+ .. tip:: This property corresponds to the following LabVIEW Property or C Attribute: @@ -7604,15 +7604,15 @@ lo_source The following table lists the characteristics of this property. - +-----------------------+------------+ - | Characteristic | Value | - +=======================+============+ - | Datatype | str | - +-----------------------+------------+ - | Permissions | read-write | - +-----------------------+------------+ - | Repeated Capabilities | los | - +-----------------------+------------+ + +-----------------------+----------------+ + | Characteristic | Value | + +=======================+================+ + | Datatype | enums.LoSource | + +-----------------------+----------------+ + | Permissions | read-write | + +-----------------------+----------------+ + | Repeated Capabilities | los | + +-----------------------+----------------+ .. tip:: This property corresponds to the following LabVIEW Property or C Attribute: @@ -8638,15 +8638,15 @@ pulse_modulation_source The following table lists the characteristics of this property. - +-----------------------+------------+ - | Characteristic | Value | - +=======================+============+ - | Datatype | str | - +-----------------------+------------+ - | Permissions | read-write | - +-----------------------+------------+ - | Repeated Capabilities | None | - +-----------------------+------------+ + +-----------------------+-----------------------------+ + | Characteristic | Value | + +=======================+=============================+ + | Datatype | enums.PulseModulationSource | + +-----------------------+-----------------------------+ + | Permissions | read-write | + +-----------------------+-----------------------------+ + | Repeated Capabilities | None | + +-----------------------+-----------------------------+ .. tip:: This property corresponds to the following LabVIEW Property or C Attribute: @@ -8760,15 +8760,15 @@ ref_clock_source The following table lists the characteristics of this property. - +-----------------------+------------+ - | Characteristic | Value | - +=======================+============+ - | Datatype | str | - +-----------------------+------------+ - | Permissions | read-write | - +-----------------------+------------+ - | Repeated Capabilities | None | - +-----------------------+------------+ + +-----------------------+----------------------------+ + | Characteristic | Value | + +=======================+============================+ + | Datatype | enums.ReferenceClockSource | + +-----------------------+----------------------------+ + | Permissions | read-write | + +-----------------------+----------------------------+ + | Repeated Capabilities | None | + +-----------------------+----------------------------+ .. tip:: This property corresponds to the following LabVIEW Property or C Attribute: diff --git a/docs/nirfsg/enums.rst b/docs/nirfsg/enums.rst index 9191ff67c..16d8e17ad 100644 --- a/docs/nirfsg/enums.rst +++ b/docs/nirfsg/enums.rst @@ -211,6 +211,31 @@ ArbOnboardSampleClockMode +ArbSampleClockSource +-------------------- + +.. py:class:: ArbSampleClockSource + + .. py:attribute:: ArbSampleClockSource.ONBOARD_CLOCK + + + + Uses the AWG module onboard clock as the Sample Clock source. + + + + + + .. py:attribute:: ArbSampleClockSource.CLK_IN + + + + Uses the external clock as the Sample Clock source. + + + + + AutomaticLevelControl --------------------- @@ -561,6 +586,61 @@ LoPllFractionalModeEnabled +LoSource +-------- + +.. py:class:: LoSource + + .. py:attribute:: LoSource.ONBOARD + + + + Uses an internal LO as the LO source. If you specify an internal LO source, the LO is generated inside the device itself. + + + + + + .. py:attribute:: LoSource.LO_IN + + + + Uses an external LO as the LO source. Connect a signal to the LO IN connector on the device and use the UPCONVERTER_CENTER_FREQUENCY property to specify the LO frequency. + + + + + + .. py:attribute:: LoSource.SECONDARY + + + + Uses the PXIe-5831/5840 internal LO as the LO source. This value is valid only on the PXIe-5831 with PXIe-5653 and PXIe-5832 with PXIe-5653. + + + + + + .. py:attribute:: LoSource.SG_SA_SHARED + + + + Uses the same internal LO during NI-RFSA and NI-RFSG sessions. NI-RFSG selects an internal synthesizer and the synthesizer signal is switched to both the RF In and RF Out mixers. This value is valid only on the PXIe-5830/5831/5832/5841 with PXIe-5655/5842. + + + + + + .. py:attribute:: LoSource.AUTOMATIC_SG_SA_SHARED + + + + NI-RFSG internally makes the configuration to share the LO between NI-RFSA and NI-RFSG. This value is valid only on the PXIe-5820/5830/5831/5832/5840/5841/5842. + + + + + LoadConfigurationResetOptions ----------------------------- @@ -976,6 +1056,86 @@ PulseModulationMode +PulseModulationOutputTerminal +----------------------------- + +.. py:class:: PulseModulationOutputTerminal + + .. py:attribute:: PulseModulationOutputTerminal.DO_NOT_EXPORT + + + + Pulse modulation video signal is not exported. + + + + + + .. py:attribute:: PulseModulationOutputTerminal.PULSE_OUT + + + + Export the pulse modulation video signal on the pulse out terminal. + + + + + +PulseModulationSource +--------------------- + +.. py:class:: PulseModulationSource + + .. py:attribute:: PulseModulationSource.PULSE_IN + + + + The trigger is received on the PULSE IN terminal. This value is valid on only the PXIe-5842. + + + + + + .. py:attribute:: PulseModulationSource.MARKER0 + + + + The trigger is received from the Marker 0. + + + + + + .. py:attribute:: PulseModulationSource.MARKER1 + + + + The trigger is received from the Marker 1. + + + + + + .. py:attribute:: PulseModulationSource.MARKER2 + + + + The trigger is received from the Marker 2. + + + + + + .. py:attribute:: PulseModulationSource.MARKER3 + + + + The trigger is received from the Marker 3. + + + + + RFBlanking ---------- @@ -1036,6 +1196,116 @@ RFInLoExportEnabled +ReferenceClockExportOutputTerminal +---------------------------------- + +.. py:class:: ReferenceClockExportOutputTerminal + + .. py:attribute:: ReferenceClockExportOutputTerminal.DO_NOT_EXPORT + + + + The Reference Clock signal is not exported. + + + + + + .. py:attribute:: ReferenceClockExportOutputTerminal.REF_OUT + + + + Exports the Reference Clock signal to the REF OUT connector of the device. + + + + + + .. py:attribute:: ReferenceClockExportOutputTerminal.REF_OUT2 + + + + Exports the Reference Clock signal to the REF OUT2 connector of the device, if applicable. + + + + + + .. py:attribute:: ReferenceClockExportOutputTerminal.CLK_OUT + + + + Exports the Reference Clock signal to the CLK OUT connector of the device. + + + + + +ReferenceClockSource +-------------------- + +.. py:class:: ReferenceClockSource + + .. py:attribute:: ReferenceClockSource.ONBOARD_CLOCK + + + + Uses the onboard Reference Clock as the clock source. + + + + + + .. py:attribute:: ReferenceClockSource.REF_IN + + + + Uses the clock signal present at the front panel REF IN connector as the Reference Clock source. + + + + + + .. py:attribute:: ReferenceClockSource.PXI_CLK + + + + Uses the PXI_CLK signal, which is present on the PXI backplane, as the Reference Clock source. + + + + + + .. py:attribute:: ReferenceClockSource.CLK_IN + + + + Uses the clock signal present at the front panel CLK IN connector as the Reference Clock source. This value is not valid for the PXIe-5644/5645/5646 or PXIe-5820/5830/5831/5831 with PXIe-5653/5832/5832 with PXIe-5653/5840/5841/5841 with PXIe-5655. + + + + + + .. py:attribute:: ReferenceClockSource.REF_IN_2 + + + + This value is not valid on any supported devices. + + + + + + .. py:attribute:: ReferenceClockSource.PXI_CLK_MASTER + + + + This value is valid on only the PXIe-5831/5832 with PXIe-5653. **PXIe-5831/5832 with PXIe-5653 -** NI-RFSG configures the PXIe-5653 to export the Reference clock and configures the PXIe-5820 and PXIe-3622 to use :py:data:`~nirfsg.ReferenceClockSource.PXI_CLK` as the Reference Clock source. Connect the PXIe-5653 REF OUT (10 MHz) connector to the PXI chassis REF IN connector. + + + + + ReferencePllBandwidth --------------------- @@ -1486,6 +1756,61 @@ StartTriggerType +TriggerIdentifier +----------------- + +.. py:class:: TriggerIdentifier + + .. py:attribute:: TriggerIdentifier.SCRIPT_TRIGGER0 + + + + Specifies Script Trigger 0. + + + + + + .. py:attribute:: TriggerIdentifier.SCRIPT_TRIGGER1 + + + + Specifies Script Trigger 1. + + + + + + .. py:attribute:: TriggerIdentifier.SCRIPT_TRIGGER2 + + + + Specifies Script Trigger 2. + + + + + + .. py:attribute:: TriggerIdentifier.SCRIPT_TRIGGER3 + + + + Specifies Script Trigger 3. + + + + + + .. py:attribute:: TriggerIdentifier.NONE + + + + None (no signal to export) + + + + + UpconverterFrequencyOffsetMode ------------------------------ diff --git a/generated/nirfsg/nirfsg/_library_interpreter.py b/generated/nirfsg/nirfsg/_library_interpreter.py index 3bdcd7145..58a366dbb 100644 --- a/generated/nirfsg/nirfsg/_library_interpreter.py +++ b/generated/nirfsg/nirfsg/_library_interpreter.py @@ -628,7 +628,7 @@ def self_calibrate_range(self, steps_to_omit, min_frequency, max_frequency, min_ def send_software_edge_trigger(self, trigger, trigger_identifier): # noqa: N802 vi_ctype = _visatype.ViSession(self._vi) # case S110 trigger_ctype = _visatype.ViInt32(trigger.value) # case S130 - trigger_identifier_ctype = ctypes.create_string_buffer(trigger_identifier.encode(self._encoding)) # case C020 + trigger_identifier_ctype = ctypes.create_string_buffer(trigger_identifier.value.encode(self._encoding)) # case C030 error_code = self._library.niRFSG_SendSoftwareEdgeTrigger(vi_ctype, trigger_ctype, trigger_identifier_ctype) errors.handle_error(self, error_code, ignore_warnings=False, is_error_handling=False) return diff --git a/generated/nirfsg/nirfsg/enums.py b/generated/nirfsg/nirfsg/enums.py index b1441ebf9..0629aa9fb 100644 --- a/generated/nirfsg/nirfsg/enums.py +++ b/generated/nirfsg/nirfsg/enums.py @@ -94,6 +94,17 @@ class ArbOnboardSampleClockMode(Enum): ''' +class ArbSampleClockSource(Enum): + ONBOARD_CLOCK = 'OnboardClock' + r''' + Uses the AWG module onboard clock as the Sample Clock source. + ''' + CLK_IN = 'ClkIn' + r''' + Uses the external clock as the Sample Clock source. + ''' + + class AutomaticLevelControl(Enum): DISABLE = 0 r''' @@ -246,6 +257,29 @@ class LoPllFractionalModeEnabled(Enum): ''' +class LoSource(Enum): + ONBOARD = 'Onboard' + r''' + Uses an internal LO as the LO source. If you specify an internal LO source, the LO is generated inside the device itself. + ''' + LO_IN = 'LO_In' + r''' + Uses an external LO as the LO source. Connect a signal to the LO IN connector on the device and use the UPCONVERTER_CENTER_FREQUENCY property to specify the LO frequency. + ''' + SECONDARY = 'Secondary' + r''' + Uses the PXIe-5831/5840 internal LO as the LO source. This value is valid only on the PXIe-5831 with PXIe-5653 and PXIe-5832 with PXIe-5653. + ''' + SG_SA_SHARED = 'SG_SA_Shared' + r''' + Uses the same internal LO during NI-RFSA and NI-RFSG sessions. NI-RFSG selects an internal synthesizer and the synthesizer signal is switched to both the RF In and RF Out mixers. This value is valid only on the PXIe-5830/5831/5832/5841 with PXIe-5655/5842. + ''' + AUTOMATIC_SG_SA_SHARED = 'Automatic_SG_SA_Shared' + r''' + NI-RFSG internally makes the configuration to share the LO between NI-RFSA and NI-RFSG. This value is valid only on the PXIe-5820/5830/5831/5832/5840/5841/5842. + ''' + + class LoadConfigurationResetOptions(Enum): WAVEFORMS = 1 r''' @@ -425,6 +459,40 @@ class PulseModulationMode(Enum): ''' +class PulseModulationOutputTerminal(Enum): + DO_NOT_EXPORT = '' + r''' + Pulse modulation video signal is not exported. + ''' + PULSE_OUT = 'PulseOut' + r''' + Export the pulse modulation video signal on the pulse out terminal. + ''' + + +class PulseModulationSource(Enum): + PULSE_IN = 'PulseIn' + r''' + The trigger is received on the PULSE IN terminal. This value is valid on only the PXIe-5842. + ''' + MARKER0 = 'Marker0' + r''' + The trigger is received from the Marker 0. + ''' + MARKER1 = 'Marker1' + r''' + The trigger is received from the Marker 1. + ''' + MARKER2 = 'Marker2' + r''' + The trigger is received from the Marker 2. + ''' + MARKER3 = 'Marker3' + r''' + The trigger is received from the Marker 3. + ''' + + class RFBlanking(Enum): DISABLE = 0 r''' @@ -451,6 +519,52 @@ class RFInLoExportEnabled(Enum): ''' +class ReferenceClockExportOutputTerminal(Enum): + DO_NOT_EXPORT = '' + r''' + The Reference Clock signal is not exported. + ''' + REF_OUT = 'RefOut' + r''' + Exports the Reference Clock signal to the REF OUT connector of the device. + ''' + REF_OUT2 = 'RefOut2' + r''' + Exports the Reference Clock signal to the REF OUT2 connector of the device, if applicable. + ''' + CLK_OUT = 'ClkOut' + r''' + Exports the Reference Clock signal to the CLK OUT connector of the device. + ''' + + +class ReferenceClockSource(Enum): + ONBOARD_CLOCK = 'OnboardClock' + r''' + Uses the onboard Reference Clock as the clock source. + ''' + REF_IN = 'RefIn' + r''' + Uses the clock signal present at the front panel REF IN connector as the Reference Clock source. + ''' + PXI_CLK = 'PXI_CLK' + r''' + Uses the PXI_CLK signal, which is present on the PXI backplane, as the Reference Clock source. + ''' + CLK_IN = 'ClkIn' + r''' + Uses the clock signal present at the front panel CLK IN connector as the Reference Clock source. This value is not valid for the PXIe-5644/5645/5646 or PXIe-5820/5830/5831/5831 with PXIe-5653/5832/5832 with PXIe-5653/5840/5841/5841 with PXIe-5655. + ''' + REF_IN_2 = 'RefIn2' + r''' + This value is not valid on any supported devices. + ''' + PXI_CLK_MASTER = 'PXI_ClkMaster' + r''' + This value is valid on only the PXIe-5831/5832 with PXIe-5653. **PXIe-5831/5832 with PXIe-5653 -** NI-RFSG configures the PXIe-5653 to export the Reference clock and configures the PXIe-5820 and PXIe-3622 to use ReferenceClockSource.PXI_CLK as the Reference Clock source. Connect the PXIe-5653 REF OUT (10 MHz) connector to the PXI chassis REF IN connector. + ''' + + class ReferencePllBandwidth(Enum): NARROW = 0 r''' @@ -643,6 +757,29 @@ class StartTriggerType(Enum): ''' +class TriggerIdentifier(Enum): + SCRIPT_TRIGGER0 = 'scriptTrigger0' + r''' + Specifies Script Trigger 0. + ''' + SCRIPT_TRIGGER1 = 'scriptTrigger1' + r''' + Specifies Script Trigger 1. + ''' + SCRIPT_TRIGGER2 = 'scriptTrigger2' + r''' + Specifies Script Trigger 2. + ''' + SCRIPT_TRIGGER3 = 'scriptTrigger3' + r''' + Specifies Script Trigger 3. + ''' + NONE = '' + r''' + None (no signal to export) + ''' + + class UpconverterFrequencyOffsetMode(Enum): AUTO = -1 r''' diff --git a/generated/nirfsg/nirfsg/session.py b/generated/nirfsg/nirfsg/session.py index 14f7a035d..8c5850563 100644 --- a/generated/nirfsg/nirfsg/session.py +++ b/generated/nirfsg/nirfsg/session.py @@ -517,8 +517,8 @@ class _SessionBase(object): **Supported Devices:** PXIe-5644/5645/5646, PXI-5670/5671, PXIe-5672/5673/5673E, PXIe-5820/5830/5831/5832/5840/5841/5842/5860 ''' - arb_sample_clock_source = _attributes.AttributeViString(1150030) - '''Type: str + arb_sample_clock_source = _attributes.AttributeEnum(_attributes.AttributeViString, enums.ArbSampleClockSource, 1150030) + '''Type: enums.ArbSampleClockSource Specifies the Sample Clock source for the device. To set this property, the NI-RFSG device must be in the Configuration state. @@ -1600,8 +1600,8 @@ class _SessionBase(object): | ScriptTriggerDigitalLevelActiveLevel.LOW | 9001 (0x2329) | Trigger when the digital trigger signal is low. | +-------------------------------------------+---------------+--------------------------------------------------+ ''' - exported_pulse_modulation_event_output_terminal = _attributes.AttributeViString(1150309) - '''Type: str + exported_pulse_modulation_event_output_terminal = _attributes.AttributeEnum(_attributes.AttributeViString, enums.PulseModulationOutputTerminal, 1150309) + '''Type: enums.PulseModulationOutputTerminal Specifies the destination terminal for exporting the Pulse Modulation Event. The Pulse Modulation Event tracks the RF Envelope when Pulse Modulation is Enabled. If this property is set to a value other than `do not export str`, calling NI-RFSG Commit will cause the output terminal to be pulled to the logic level that is the inverse of `exported pulse modulation event active level`. You can tri-state this terminal by setting this property to `do not export str` or by calling `niRFSG Reset`. To set this property, the NI-RFSG device must be in the Configuration state. @@ -1619,8 +1619,8 @@ class _SessionBase(object): | "PulseOut" | Export the pulse modulation video signal on the pulse out terminal. | +----------------+---------------------------------------------------------------------+ ''' - exported_ref_clock_output_terminal = _attributes.AttributeViString(1150053) - '''Type: str + exported_ref_clock_output_terminal = _attributes.AttributeEnum(_attributes.AttributeViString, enums.ReferenceClockExportOutputTerminal, 1150053) + '''Type: enums.ReferenceClockExportOutputTerminal Specifies the destination terminal for exporting the Reference Clock on the RF signal generators. To set this property, the NI-RFSG device must be in the Configuration state. @@ -2899,8 +2899,8 @@ class _SessionBase(object): Example: :py:attr:`my_session.lo_pll_fractional_mode_enabled` ''' - lo_source = _attributes.AttributeViString(1150150) - '''Type: str + lo_source = _attributes.AttributeEnum(_attributes.AttributeViString, enums.LoSource, 1150150) + '''Type: enums.LoSource Specifies whether to use the internal or external local oscillator (LO) source. If the lo_source property is set to "" (empty string), NI-RFSG uses the internal LO source. To set this property, the NI-RFSG device must be in the Configuration state. @@ -3482,8 +3482,8 @@ class _SessionBase(object): Note: One or more of the referenced values are not in the Python API for this driver. Enums that only define values, or represent True/False, have been removed. ''' - pulse_modulation_source = _attributes.AttributeViString(1150308) - '''Type: str + pulse_modulation_source = _attributes.AttributeEnum(_attributes.AttributeViString, enums.PulseModulationSource, 1150308) + '''Type: enums.PulseModulationSource Specifies the source of the pulse modulation signal. When Pulse In in used, the pulse modulation is applied with the lowest latency and jitter, but is not aligned to any particular waveform sample. When a marker is used, the RF pulse is aligned to a specific sample in the arbitrary waveform. To set this property, the NI-RFSG device must be in the Configuration state. @@ -3554,8 +3554,8 @@ class _SessionBase(object): Note: Automatic detection of the Reference Clock rate is supported on only the PXIe-5654/5654 with PXIe-5696. For all other supported devices, NI-RFSG uses the default Reference Clock rate of 10MHz. ''' - ref_clock_source = _attributes.AttributeViString(1150001) - '''Type: str + ref_clock_source = _attributes.AttributeEnum(_attributes.AttributeViString, enums.ReferenceClockSource, 1150001) + '''Type: enums.ReferenceClockSource Specifies the Reference Clock source. To set this property, the NI-RFSG device must be in the Configuration state. @@ -5264,7 +5264,7 @@ def send_software_edge_trigger(self, trigger, trigger_identifier): Note: One or more of the referenced values are not in the Python API for this driver. Enums that only define values, or represent True/False, have been removed. - trigger_identifier (str): Specifies the Script Trigger to configure. This parameter is valid only when you set the TRIGGER parameter to NIRFSG_VAL_START_TRIGGER. Otherwise, set the TRIGGER_IDENTIFIER parameter to "" (empty string). + trigger_identifier (enums.TriggerIdentifier): Specifies the Script Trigger to configure. This parameter is valid only when you set the TRIGGER parameter to NIRFSG_VAL_START_TRIGGER. Otherwise, set the TRIGGER_IDENTIFIER parameter to "" (empty string). **Default Value:** "" (empty string) @@ -5293,6 +5293,8 @@ def send_software_edge_trigger(self, trigger, trigger_identifier): ''' if type(trigger) is not enums.SoftwareTriggerType: raise TypeError('Parameter trigger must be of type ' + str(enums.SoftwareTriggerType)) + if type(trigger_identifier) is not enums.TriggerIdentifier: + raise TypeError('Parameter trigger_identifier must be of type ' + str(enums.TriggerIdentifier)) self._interpreter.send_software_edge_trigger(trigger, trigger_identifier) @ivi_synchronized diff --git a/src/nirfsg/metadata/attributes.py b/src/nirfsg/metadata/attributes.py index 21068ed93..b109e0905 100644 --- a/src/nirfsg/metadata/attributes.py +++ b/src/nirfsg/metadata/attributes.py @@ -167,6 +167,7 @@ 'Description' ] }, + 'enum': 'ReferenceClockSource', 'lv_property': 'Clock:Reference Clock Source', 'name': 'REF_CLOCK_SOURCE', 'type': 'ViString' @@ -1079,6 +1080,7 @@ 'Description' ] }, + 'enum': 'ArbSampleClockSource', 'lv_property': 'Clock:Arb Sample Clock Source', 'name': 'ARB_SAMPLE_CLOCK_SOURCE', 'type': 'ViString' @@ -1277,6 +1279,7 @@ 'Supported devices' ] }, + 'enum': 'ReferenceClockExportOutputTerminal', 'lv_property': 'Clock:Reference Clock Export Output Terminal', 'name': 'EXPORTED_REF_CLOCK_OUTPUT_TERMINAL', 'type': 'ViString' @@ -2390,6 +2393,7 @@ 'Description' ] }, + 'enum': 'LoSource', 'lv_property': 'Device Specific:Vector Signal Transceiver:Signal Path:LO Source', 'name': 'LO_SOURCE', 'supported_rep_caps': [ @@ -3776,6 +3780,7 @@ 'Description' ] }, + 'enum': 'PulseModulationSource', 'lv_property': 'Modulation:Pulse:Pulse Modulation Source', 'name': 'PULSE_MODULATION_SOURCE', 'type': 'ViString' @@ -3800,6 +3805,7 @@ 'Description' ] }, + 'enum': 'PulseModulationOutputTerminal', 'lv_property': 'Events:Pulse Modulation:Exported Pulse Modulation Event Output Terminal', 'name': 'EXPORTED_PULSE_MODULATION_EVENT_OUTPUT_TERMINAL', 'type': 'ViString' diff --git a/src/nirfsg/metadata/enums.py b/src/nirfsg/metadata/enums.py index 36e40d9ba..4630293d4 100644 --- a/src/nirfsg/metadata/enums.py +++ b/src/nirfsg/metadata/enums.py @@ -151,6 +151,24 @@ } ] }, + 'ArbSampleClockSource': { + 'values': [ + { + 'documentation': { + 'description': 'Uses the AWG module onboard clock as the Sample Clock source.' + }, + 'name': 'NIRFSG_VAL_ONBOARD_CLOCK_STR', + 'value': 'OnboardClock' + }, + { + 'documentation': { + 'description': 'Uses the external clock as the Sample Clock source.' + }, + 'name': 'NIRFSG_VAL_CLK_IN_STR', + 'value': 'ClkIn' + } + ] + }, 'AutomaticLevelControl': { 'values': [ { @@ -434,6 +452,46 @@ } ] }, + 'LoSource': { + 'codegen_method': 'public', + 'values': [ + { + 'documentation': { + 'description': 'Uses an internal LO as the LO source. If you specify an internal LO source, the LO is generated inside the device itself.' + }, + 'name': 'NIRFSG_VAL_LO_SOURCE_ONBOARD_STR', + 'value': 'Onboard' + }, + { + 'documentation': { + 'description': 'Uses an external LO as the LO source. Connect a signal to the LO IN connector on the device and use the UPCONVERTER_CENTER_FREQUENCY attribute to specify the LO frequency.' + }, + 'name': 'NIRFSG_VAL_LO_SOURCE_LO_IN_STR', + 'value': 'LO_In' + }, + { + 'documentation': { + 'description': 'Uses the PXIe-5831/5840 internal LO as the LO source. This value is valid only on the PXIe-5831 with PXIe-5653 and PXIe-5832 with PXIe-5653.' + }, + 'name': 'NIRFSG_VAL_LO_SOURCE_SECONDARY_STR', + 'value': 'Secondary' + }, + { + 'documentation': { + 'description': 'Uses the same internal LO during NI-RFSA and NI-RFSG sessions. NI-RFSG selects an internal synthesizer and the synthesizer signal is switched to both the RF In and RF Out mixers. This value is valid only on the PXIe-5830/5831/5832/5841 with PXIe-5655/5842.' + }, + 'name': 'NIRFSG_VAL_LO_SOURCE_SG_SA_SHARED_STR', + 'value': 'SG_SA_Shared' + }, + { + 'documentation': { + 'description': 'NI-RFSG internally makes the configuration to share the LO between NI-RFSA and NI-RFSG. This value is valid only on the PXIe-5820/5830/5831/5832/5840/5841/5842.' + }, + 'name': 'NIRFSG_VAL_LO_SOURCE_AUTOMATIC_SG_SA_SHARED_STR', + 'value': 'Automatic_SG_SA_Shared' + } + ] + }, 'LoadOptions': { 'values': [ { @@ -699,6 +757,63 @@ } ] }, + 'PulseModulationOutputTerminal': { + 'values': [ + { + 'documentation': { + 'description': 'Pulse modulation video signal is not exported.' + }, + 'name': 'NIRFSG_VAL_DO_NOT_EXPORT_STR', + 'value': '' + }, + { + 'documentation': { + 'description': 'Export the pulse modulation video signal on the pulse out terminal.' + }, + 'name': 'NIRFSG_VAL_PULSE_OUT_STR', + 'value': 'PulseOut' + } + ] + }, + 'PulseModulationSource': { + 'values': [ + { + 'documentation': { + 'description': 'The trigger is received on the PULSE IN terminal. This value is valid on only the PXIe-5842.' + }, + 'name': 'NIRFSG_VAL_PULSE_IN_STR', + 'value': 'PulseIn' + }, + { + 'documentation': { + 'description': 'The trigger is received from the Marker 0.' + }, + 'name': 'NIRFSG_VAL_MARKER0_STR', + 'value': 'Marker0' + }, + { + 'documentation': { + 'description': 'The trigger is received from the Marker 1.' + }, + 'name': 'NIRFSG_VAL_MARKER1_STR', + 'value': 'Marker1' + }, + { + 'documentation': { + 'description': 'The trigger is received from the Marker 2.' + }, + 'name': 'NIRFSG_VAL_MARKER2_STR', + 'value': 'Marker2' + }, + { + 'documentation': { + 'description': 'The trigger is received from the Marker 3.' + }, + 'name': 'NIRFSG_VAL_MARKER3_STR', + 'value': 'Marker3' + } + ] + }, 'RFBlanking': { 'values': [ { @@ -742,6 +857,84 @@ } ] }, + 'ReferenceClockExportOutputTerminal': { + 'values': [ + { + 'documentation': { + 'description': 'The Reference Clock signal is not exported.' + }, + 'name': 'NIRFSG_VAL_DO_NOT_EXPORT_STR', + 'value': '' + }, + { + 'documentation': { + 'description': 'Exports the Reference Clock signal to the REF OUT connector of the device.' + }, + 'name': 'NIRFSG_VAL_REF_OUT_STR', + 'value': 'RefOut' + }, + { + 'documentation': { + 'description': 'Exports the Reference Clock signal to the REF OUT2 connector of the device, if applicable.' + }, + 'name': 'NIRFSG_VAL_REF_OUT2_STR', + 'value': 'RefOut2' + }, + { + 'documentation': { + 'description': 'Exports the Reference Clock signal to the CLK OUT connector of the device.' + }, + 'name': 'NIRFSG_VAL_CLK_OUT_STR', + 'value': 'ClkOut' + } + ] + }, + 'ReferenceClockSource': { + 'values': [ + { + 'documentation': { + 'description': 'Uses the onboard Reference Clock as the clock source.' + }, + 'name': 'NIRFSG_VAL_ONBOARD_CLOCK_STR', + 'value': 'OnboardClock' + }, + { + 'documentation': { + 'description': 'Uses the clock signal present at the front panel REF IN connector as the Reference Clock source.' + }, + 'name': 'NIRFSG_VAL_REF_IN_STR', + 'value': 'RefIn' + }, + { + 'documentation': { + 'description': 'Uses the PXI_CLK signal, which is present on the PXI backplane, as the Reference Clock source.' + }, + 'name': 'NIRFSG_VAL_PXI_CLK_STR', + 'value': 'PXI_CLK' + }, + { + 'documentation': { + 'description': 'Uses the clock signal present at the front panel CLK IN connector as the Reference Clock source. This value is not valid for the PXIe-5644/5645/5646 or PXIe-5820/5830/5831/5831 with PXIe-5653/5832/5832 with PXIe-5653/5840/5841/5841 with PXIe-5655.' + }, + 'name': 'NIRFSG_VAL_CLK_IN_STR', + 'value': 'ClkIn' + }, + { + 'documentation': { + 'description': 'This value is not valid on any supported devices.' + }, + 'name': 'NIRFSG_VAL_REF_IN_2_STR', + 'value': 'RefIn2' + }, + { + 'documentation': { + 'description': 'This value is valid on only the PXIe-5831/5832 with PXIe-5653. **PXIe-5831/5832 with PXIe-5653 -** NI-RFSG configures the PXIe-5653 to export the Reference clock and configures the PXIe-5820 and PXIe-3622 to use NIRFSG_VAL_PXI_CLK_STR as the Reference Clock source. Connect the PXIe-5653 REF OUT (10 MHz) connector to the PXI chassis REF IN connector.' + }, + 'name': 'NIRFSG_VAL_PXI_CLK_MASTER_STR', + 'value': 'PXI_ClkMaster' + } + ] + }, 'ReferencePllBandwidth': { 'values': [ { @@ -1065,6 +1258,46 @@ } ] }, + 'TriggerIdentifier': { + 'values': [ + { + 'documentation': { + 'description': 'Specifies Script Trigger 0.' + }, + 'name': 'NIRFSG_VAL_SCRIPT_TRIGGER0', + 'value': 'scriptTrigger0' + }, + { + 'documentation': { + 'description': 'Specifies Script Trigger 1.' + }, + 'name': 'NIRFSG_VAL_SCRIPT_TRIGGER1', + 'value': 'scriptTrigger1' + }, + { + 'documentation': { + 'description': 'Specifies Script Trigger 2.' + }, + 'name': 'NIRFSG_VAL_SCRIPT_TRIGGER2', + 'value': 'scriptTrigger2' + }, + { + 'documentation': { + 'description': 'Specifies Script Trigger 3.' + }, + 'name': 'NIRFSG_VAL_SCRIPT_TRIGGER3', + 'value': 'scriptTrigger3' + }, + { + 'documentation': { + 'description': 'None (no signal to export)' + }, + 'name': 'NIRFSG_VAL_NONE_EMPTY_STRING', + 'python_name': 'NONE', + 'value': '' + } + ] + }, 'UpconverterFrequencyOffsetMode': { 'values': [ { diff --git a/src/nirfsg/metadata/functions.py b/src/nirfsg/metadata/functions.py index f8d7b4909..7f1c44f59 100644 --- a/src/nirfsg/metadata/functions.py +++ b/src/nirfsg/metadata/functions.py @@ -3880,6 +3880,7 @@ 'Description' ] }, + 'enum': 'TriggerIdentifier', 'name': 'triggerIdentifier', 'type': 'ViConstString', 'use_array': False, diff --git a/src/nirfsg/system_tests/test_system_nirfsg.py b/src/nirfsg/system_tests/test_system_nirfsg.py index 6667e3bfa..08802eeeb 100644 --- a/src/nirfsg/system_tests/test_system_nirfsg.py +++ b/src/nirfsg/system_tests/test_system_nirfsg.py @@ -182,7 +182,7 @@ def test_ports_rep_cap(self, simulated_5831_device_session): assert simulated_5831_device_session.ports['if1'].deembedding_type == requested_deembedding_type def test_los_rep_cap(self, simulated_5831_device_session): - requested_lo_source = "SG_SA_Shared" + requested_lo_source = nirfsg.LoSource.SG_SA_SHARED simulated_5831_device_session.los[2].lo_source = requested_lo_source assert simulated_5831_device_session.los[2].lo_source == requested_lo_source @@ -515,8 +515,8 @@ def test_send_software_edge_trigger(self, rfsg_device_session): rfsg_device_session.configure_software_start_trigger() rfsg_device_session.script_triggers[0].configure_software_script_trigger() with rfsg_device_session.initiate(): - rfsg_device_session.send_software_edge_trigger(nirfsg.SoftwareTriggerType.START, '') - rfsg_device_session.send_software_edge_trigger(nirfsg.SoftwareTriggerType.SCRIPT, 'scriptTrigger0') + rfsg_device_session.send_software_edge_trigger(nirfsg.SoftwareTriggerType.START, nirfsg.TriggerIdentifier.NONE) + rfsg_device_session.send_software_edge_trigger(nirfsg.SoftwareTriggerType.SCRIPT, nirfsg.TriggerIdentifier.SCRIPT_TRIGGER0) @pytest.mark.skipif(sys.platform == "linux", reason="Function not supported on Linux OS") def test_create_deembedding_sparameter_table_s2p_file(self, rfsg_device_session):