### Get IQRecorder list start index (get_start) Source: https://rscmwgprfmeas.readthedocs.io/en/latest/_modules/RsCmwGprfMeas/Implementations/Configure/IqRecorder/ListPy.html SCPI command snippet for querying the IQRecorder list start index. Returns an integer value. No command help available. ```python value: int = driver.configure.iqRecorder.listPy.get_start() ``` -------------------------------- ### Python get() for ShortStruct Source: https://rscmwgprfmeas.readthedocs.io/en/latest/Initiate_Ploss_Short.html Python example for the get() method. Returns a ShortStruct with fields Connector and Path_Index. ```python # SCPI: INITiate:GPRF:MEASurement:PLOSs:SHORt value: ShortStruct = driver.initiate.ploss.short.get() ``` -------------------------------- ### RsCmwBase driver example showing basic properties, repcap setting, and reliability interface Source: https://rscmwgprfmeas.readthedocs.io/en/latest/getting_started.html A complete example using the RsCmwBase auto-generated driver, demonstrating basic usage, SCPI command setting with repcaps, reliability interface, and session closure. Requires installing RsCmwBase from pypi.org and asserts minimum version '3.7.90.38'. Shows self-test result and how to set the reference frequency source. ```python """ Example on how to use the python RsCmw auto-generated instrument driver showing: - usage of basic properties of the cmw_base object - basic concept of setting commands and repcaps: DISPlay:WINDow:SELect - cmw_xxx drivers reliability interface usage """ from RsCmwBase import * # install from pypi.org RsCmwBase.assert_minimum_version('3.7.90.38') cmw_base = RsCmwBase('TCPIP::10.112.1.116::INSTR', True, False) print(f'CMW Base IND: {cmw_base.utilities.idn_string}') print(f'CMW Instrument options:\n{",".join(cmw_base.utilities.instrument_options)}') cmw_base.utilities.visa_timeout = 5000 # Sends OPC after each command cmw_base.utilities.opc_query_after_write = False # Checks for syst:err? after each command / query cmw_base.utilities.instrument_status_checking = True # DISPlay:WINDow:SELect cmw_base.display.window.select.set(repcap.Window.Win1) cmw_base.display.window.repcap_window_set(repcap.Window.Win2) cmw_base.display.window.select.set() # Self-test self_test = cmw_base.utilities.self_test() print(f'CMW self-test result: {self_test[0]} - {"Passed" if self_test[0] == 0 else "Failed"} - {self_test[1]}') # Driver's Interface reliability offers a convenient way of reacting on the return value Reliability Indicator cmw_base.reliability.ExceptionOnError = True # Callback to use for the reliability indicator update event def my_reliability_handler(event_args: ReliabilityEventArgs): print(f'Base Reliability updated.\nContext: {event_context}.\nMessage: {event_message}.') # We register a callback for each change in the reliability indicator cmw_base.reliability.on_update_handler = my_reliability_handler # You can obtain the last value of the returned reliability print(f"\nReliability last value: {cmw_base.reliability.last_value}, context '{cmw_base.reliability.last_context}', message: {cmw_base.reliability.last_message}") # Reference Frequency Source cmw_base.system.reference.frequency.set_source(enums.SourceIntExt.INTernal) # Close the session cmw_base.close() ``` -------------------------------- ### get() example for EnvelopePower Source: https://rscmwgprfmeas.readthedocs.io/en/latest/Configure_IqVsSlot_ListPy_EnvelopePower.html Python example for the get() method, which queries the expected nominal power of a specific subsweep. The index parameter ranges from 0 to 199. ```Python # SCPI: CONFigure:GPRF:MEASurement:IQVSlot:LIST:ENPower value: float = driver.configure.iqVsSlot.listPy.envelopePower.get(index = 1) ``` -------------------------------- ### Python get() method for Maiq Source: https://rscmwgprfmeas.readthedocs.io/en/latest/Route_Scenario_Maiq.html Python example for querying the Maiq scenario using the get() method. Returns a MaiqStruct with Rx_Connector and Rf_Converter fields. ```python # SCPI: ROUTe:GPRF:MEASurement:SCENario:MAIQ value: MaiqStruct = driver.route.scenario.maiq.get() ``` -------------------------------- ### CONFigure:GPRF:MEASurement:IQRecorder:LIST:SSTop Source: https://rscmwgprfmeas.readthedocs.io/en/latest/Configure_IqRecorder_ListPy_Sstop.html The Sstop class provides get and set methods for the SCPI command CONFigure:GPRF:MEASurement:IQRecorder:LIST:SSTop. The get method returns a SstopStruct containing start and stop indices, while the set method accepts start and stop index parameters. ```APIDOC ## CONFigure:GPRF:MEASurement:IQRecorder:LIST:SSTop ### Description Gets or sets the start and stop indices for the IQ recorder list. The command is a SCPI command. ### Method GET (get) / SET (set) ### Endpoint CONFigure:GPRF:MEASurement:IQRecorder:LIST:SSTop ### Parameters #### Set Parameters - **start_index** (int) - Required - Start index for the list. - **stop_index** (int) - Required - Stop index for the list. ### Request Example (set) ```python driver.configure.iqRecorder.listPy.sstop.set(start_index = 1, stop_index = 1) ``` ### Response (get) #### Success Response - **Start_Index** (int) - Start index value. - **Stop_Index** (int) - Stop index value. #### Response Example ```python value: SstopStruct = driver.configure.iqRecorder.listPy.sstop.get() ``` ``` -------------------------------- ### start Source: https://rscmwgprfmeas.readthedocs.io/en/latest/_modules/RsCmwGprfMeas/Internal/ScpiLogger.html Starts the logging with the last defined LoggingMode. Default is LoggingMode.On. ```APIDOC ## start() ### Description Starts the logging with the last defined LoggingMode. Default is LoggingMode.On. ### Method start ### Parameters None ### Returns None ``` -------------------------------- ### get() - Retrieve Envelope Power Source: https://rscmwgprfmeas.readthedocs.io/en/latest/Configure_IqRecorder_ListPy_EnvelopePower.html Python example for the get method, which retrieves the expected nominal power for a given index using the SCPI command CONFigure:GPRF:MEASurement:IQRecorder:LIST:ENPower. ```python # SCPI: CONFigure:GPRF:MEASurement:IQRecorder:LIST:ENPower value: float = driver.configure.iqRecorder.listPy.envelopePower.get(index = 1) ``` -------------------------------- ### Standard session initialization with RsCmwGprfMeas Source: https://rscmwgprfmeas.readthedocs.io/en/latest/getting_started.html Initializes a standard instrument session using the RsCmwGprfMeas constructor. Requires RsCmwGprfMeas version 4.0.140 or newer and a VISA installation. The example shows different resource strings for LAN, HiSLIP, GPIB, and USB-TMC connections, and queries identification and driver information. ```python """ Simple example on how to use the RsCmwGprfMeas module for remote-controlling your instrument Preconditions: - Installed RsCmwGprfMeas Python module Version 4.0.140 or newer from pypi.org - Installed VISA, for example R&S Visa 5.12 or newer """ from RsCmwGprfMeas import * # A good practice is to assure that you have a certain minimum version installed RsCmwGprfMeas.assert_minimum_version('4.0.140') resource_string_1 = 'TCPIP::192.168.2.101::INSTR' # Standard LAN connection (also called VXI-11) resource_string_2 = 'TCPIP::192.168.2.101::hislip0' # Hi-Speed LAN connection - see 1MA208 resource_string_3 = 'GPIB::20::INSTR' # GPIB Connection resource_string_4 = 'USB::0x0AAD::0x0119::022019943::INSTR' # USB-TMC (Test and Measurement Class) # Initializing the session driver = RsCmwGprfMeas(resource_string_1) idn = driver.utilities.query_str('*IDN?') print(f"\nHello, I am: '{idn}'") print(f'RsCmwGprfMeas package version: {driver.utilities.driver_version}') print(f'Visa manufacturer: {driver.utilities.visa_manufacturer}') print(f'Instrument full name: {driver.utilities.full_instrument_model_name}') print(f'Instrument installed options: {",".join(driver.utilities.instrument_options)}') # Close the session driver.close() ``` -------------------------------- ### Basic console logging with RsCmwGprfMeas Source: https://rscmwgprfmeas.readthedocs.io/en/latest/getting_started.html Enables console logging for the RsCmwGprfMeas driver and shows the resulting console output. The log columns are aligned and contain start time, device resource name, operation duration, and log entry. Logging starts at driver.utilities.reset(); to log session initialization, enable logging in the constructor with options='LoggingMode=On'. ```python """ Basic logging example to the console """ from RsCmwGprfMeas import * driver = RsCmwGprfMeas('TCPIP::192.168.1.101::INSTR') # Switch ON logging to the console. driver.utilities.logger.log_to_console = True driver.utilities.logger.mode = LoggingMode.On driver.utilities.reset() # Close the session driver.close() ``` ```text 10:29:10.819 TCPIP::192.168.1.101::INSTR 0.976 ms Write: *RST 10:29:10.819 TCPIP::192.168.1.101::INSTR 1884.985 ms Status check: OK 10:29:12.704 TCPIP::192.168.1.101::INSTR 0.983 ms Query OPC: 1 10:29:12.705 TCPIP::192.168.1.101::INSTR 2.892 ms Clear status: OK 10:29:12.708 TCPIP::192.168.1.101::INSTR 3.905 ms Status check: OK 10:29:12.712 TCPIP::192.168.1.101::INSTR 1.952 ms Close: Closing session ``` -------------------------------- ### Transfer file from PC to instrument with send_file_from_pc_to_instrument Source: https://rscmwgprfmeas.readthedocs.io/en/latest/getting_started.html Transfers a file from the PC to the instrument. The first argument is the PC source path, the second is the instrument destination path. Use this to upload a setup file or other data to the instrument. ```python driver.utilities.send_file_from_pc_to_instrument( r'c:\MyCoolTestProgram\instr_setup.sav', r'/var/appdata/instr_setup.sav') ``` -------------------------------- ### fetch() example for IQRecorder:BIN Source: https://rscmwgprfmeas.readthedocs.io/en/latest/IqRecorder_Bin.html Python example for the fetch() method, which returns I/Q recorder results in binary format. The number of values n is set by the Configure.IqRecorder.Capture.set method. ```Python # SCPI: FETCh:GPRF:MEASurement:IQRecorder:BIN value: List[float] = driver.iqRecorder.bin.fetch() ``` -------------------------------- ### Select a specific VISA with RsCmwGprfMeas Source: https://rscmwgprfmeas.readthedocs.io/en/latest/getting_started.html Selects a specific VISA implementation when creating the driver. Use SelectVisa='rs' for R&S VISA or SelectVisa='ni' for NI VISA. The example prints the instrument identification and the VISA manufacturer. ```python """ Choosing VISA implementation """ from RsCmwGprfMeas import * # Force use of the Rs Visa. For NI Visa, use the "SelectVisa='ni'" driver = RsCmwGprfMeas('TCPIP::192.168.56.101::INSTR', True, True, "SelectVisa='rs'") idn = driver.utilities.query_str('*IDN?') print(f"\nHello, I am: '{idn}'") print(f"\nI am using the VISA from: {driver.utilities.visa_manufacturer}") # Close the session driver.close() ``` -------------------------------- ### read() example for IQRecorder:BIN Source: https://rscmwgprfmeas.readthedocs.io/en/latest/IqRecorder_Bin.html Python example for the read() method, which returns I/Q recorder results in binary format. The number of values n is set by the Configure.IqRecorder.Capture.set method. ```Python # SCPI: READ:GPRF:MEASurement:IQRecorder:BIN value: List[float] = driver.iqRecorder.bin.read() ``` -------------------------------- ### get_start() - Get start frequency Source: https://rscmwgprfmeas.readthedocs.io/en/latest/Configure_Spectrum_Frequency.html Retrieves the start frequency of the frequency sweep. Returns numeric value in Hz. ```Python # SCPI: CONFigure:GPRF:MEASurement:SPECtrum:FREQuency:STARt value: float = driver.configure.spectrum.frequency.get_start() ``` -------------------------------- ### No VISA raw LAN socket session with RsCmwGprfMeas Source: https://rscmwgprfmeas.readthedocs.io/en/latest/getting_started.html Uses RsCmwGprfMeas without VISA via a raw LAN socket connection. The resource string uses the SOCKET keyword and SelectVisa='socket'. This avoids VISA installation but is not recommended; prefer VISA with HiSLIP for low latency. ```python """ Using RsCmwGprfMeas without VISA for LAN Raw socket communication """ from RsCmwGprfMeas import * driver = RsCmwGprfMeas('TCPIP::192.168.56.101::5025::SOCKET', True, True, "SelectVisa='socket'") print(f'Visa manufacturer: {driver.utilities.visa_manufacturer}') print(f"\nHello, I am: '{driver.utilities.idn_string}'") # Close the session driver.close() ``` -------------------------------- ### SstopCls Source: https://rscmwgprfmeas.readthedocs.io/en/latest/_modules/RsCmwGprfMeas/Implementations/Configure/IqRecorder/ListPy/Sstop.html Commands to set and get the start and stop index for the IQ recorder list. The set command writes the indices, the get command queries them. ```APIDOC ## SET CONFigure:GPRF:MEASurement:IQRecorder:LIST:SSTop ### Description Sets the start and stop index for the IQ recorder list. No command help is available in the source. ### Method SET ### Endpoint CONFigure:GPRF:MEASurement:IQRecorder:LIST:SSTop ### Parameters #### Command Parameters - **start_index** (int) - Required - No help available - **stop_index** (int) - Required - No help available ### Request Example ``` CONFigure:GPRF:MEASurement:IQRecorder:LIST:SSTop , ``` ### Response No response body is returned for this command. ## GET CONFigure:GPRF:MEASurement:IQRecorder:LIST:SSTop ### Description Gets the start and stop index for the IQ recorder list. No command help is available in the source. ### Method GET ### Endpoint CONFigure:GPRF:MEASurement:IQRecorder:LIST:SSTop? ### Parameters None ### Request Example ``` CONFigure:GPRF:MEASurement:IQRecorder:LIST:SSTop? ``` ### Response #### Success Response - **Start_Index** (int) - No parameter help available - **Stop_Index** (int) - No parameter help available #### Response Example ``` { "Start_Index": 1, "Stop_Index": 1 } ``` ``` -------------------------------- ### Initiate IQRecorder measurement with driver.iqRecorder.initiate() Source: https://rscmwgprfmeas.readthedocs.io/en/latest/IqRecorder.html Starts or restarts the IQRecorder measurement, entering the 'RUN' state. The optional save_to_iq_file parameter selects whether results are written to an I/Q file, to memory, or both: OFF (memory only), ON (memory and file), or ONLY (file only). Use FETCh…STATe? to query the current measurement state. ```python # SCPI: INITiate:GPRF:MEASurement:IQRecorder driver.iqRecorder.initiate(save_to_iq_file = enums.FileSave.OFF) INTRO_CMD_HELP: Starts, stops, or aborts the measurement: - INITiate... starts or restarts the measurement. The measurement enters the 'RUN' state. - STOP... halts the measurement immediately. The measurement enters the 'RDY' state. Measurement results are kept. The resources remain allocated to the measurement. - ABORt... halts the measurement immediately. The measurement enters the 'OFF' state. All measurement values are set to NAV. Allocated resources are released. ``` -------------------------------- ### Log only errors with RsCmwGprfMeas Source: https://rscmwgprfmeas.readthedocs.io/en/latest/getting_started.html Logs only error segments when using LoggingMode=Errors. A segment (e.g., from write_str()) is logged only if at least one entry is an error. The example sends a misspelled SCPI command *CLS to trigger an instrument status error. ```python """ Logging example to the console with only errors logged """ from RsCmwGprfMeas import * driver = RsCmwGprfMeas('TCPIP::192.168.1.101::INSTR', options='LoggingMode=Errors') ``` -------------------------------- ### Access one RsCmwGprfMeas session from multiple threads Source: https://rscmwgprfmeas.readthedocs.io/en/latest/getting_started.html Shows that a single RsCmwGprfMeas session is thread-safe because the lock is part of the session. Ten threads query the same driver object concurrently without explicit locking; the example runs correctly and prints start/end messages. ```python """ Multiple threads are accessing one RsCmwGprfMeas object """ import threading from RsCmwGprfMeas import * def execute(session): """Executed in a separate thread.""" session.utilities.query_str('*IDN?') driver = RsCmwGprfMeas('TCPIP::192.168.56.101::INSTR') threads = [] for i in range(10): t = threading.Thread(target=execute, args=(driver, )) t.start() threads.append(t) print('All threads started') # Wait for all threads to join this main thread for t in threads: t.join() print('All threads ended') driver.close() ``` -------------------------------- ### Set IQRecorder list start index (set_start) Source: https://rscmwgprfmeas.readthedocs.io/en/latest/_modules/RsCmwGprfMeas/Implementations/Configure/IqRecorder/ListPy.html SCPI command snippet for setting the IQRecorder list start index. No command help available. ```python driver.configure.iqRecorder.listPy.set_start(start_index = 1) ``` -------------------------------- ### Python get method for FrequencyCls Source: https://rscmwgprfmeas.readthedocs.io/en/latest/Configure_Nrpm_Sensor_Frequency.html Python example showing how to query the frequency using the get method. The sensor parameter is optional and defaults to Sensor.Default. ```python # SCPI: CONFigure:GPRF:MEASurement:NRPM:SENSor:FREQuency value: float = driver.configure.nrpm.sensor.frequency.get(sensor = repcap.Sensor.Default) ``` -------------------------------- ### Python example: driver.iqVsSlot.state.all.fetch() Source: https://rscmwgprfmeas.readthedocs.io/en/latest/IqVsSlot_State_All.html Python usage example for the AllCls.fetch method. Demonstrates calling with timeout and target state parameters. The method returns a list of ResourceState enums. ```python # SCPI: FETCh:GPRF:MEASurement:IQVSlot:STATe:ALL value: List[enums.ResourceState] = driver.iqVsSlot.state.all.fetch(timeout = 1.0, target_main_state = enums.TargetMainState.OFF, target_sync_state = enums.TargetSyncState.ADJusted) ``` -------------------------------- ### get_timeout() Example Source: https://rscmwgprfmeas.readthedocs.io/en/latest/Trigger_FftSpecAn.html Gets the trigger timeout. Returns a float or boolean. ```Python # SCPI: TRIGger:GPRF:MEASurement:FFTSanalyzer:TOUT value: float or bool = driver.trigger.fftSpecAn.get_timeout() ``` -------------------------------- ### get() Source: https://rscmwgprfmeas.readthedocs.io/en/latest/Configure_Power_ListPy_Sstop.html Retrieves the current start and stop index for the segment range to be measured. ```APIDOC ## get() ### Description Retrieves the current start and stop index for the segment range to be measured. ### Method GET ### Endpoint CONFigure:GPRF:MEASurement:POWer:LIST:SSTop ### Parameters None ### Request Example ``` # SCPI: CONFigure:GPRF:MEASurement:POWer:LIST:SSTop value: SstopStruct = driver.configure.power.listPy.sstop.get() ``` ### Response #### Success Response (200) - **Start_Index** (int) - numeric Range: 0 to StopIndex - **Stop_Index** (int) - numeric Range: StartIndex to 3999 #### Response Example ``` { "Start_Index": 0, "Stop_Index": 3999 } ``` ``` -------------------------------- ### Python set() for Short Source: https://rscmwgprfmeas.readthedocs.io/en/latest/Initiate_Ploss_Short.html Python example for the set() method. Requires connector and optional path_index parameters. ```python # SCPI: INITiate:GPRF:MEASurement:PLOSs:SHORt driver.initiate.ploss.short.set(connector = enums.CmwsConnector.R11, path_index = enums.PathIndex.P1) ``` -------------------------------- ### get_start Source: https://rscmwgprfmeas.readthedocs.io/en/latest/_modules/RsCmwGprfMeas/Implementations/Configure/IqRecorder/ListPy.html Queries the start index for the IQ recorder list mode. ```APIDOC ## get_start ### Description Queries the start index for the IQ recorder list mode. ### Method GET ### Endpoint CONFigure:GPRF:MEASurement:IQRecorder:LIST:STARt? ### Parameters None ### Response #### Success Response - **start_index** (int) - The start index value. #### Response Example ``` 1 ``` ``` -------------------------------- ### Python get method for Frequency command Source: https://rscmwgprfmeas.readthedocs.io/en/latest/Configure_Ploss_Mpath_ListPy_Frequency.html Python example for the get method of the Frequency command group. It retrieves the frequency list and returns a GetStruct with Num_Entries and Frequency fields. ```python # SCPI: CONFigure:GPRF:MEASurement:PLOSs:MPATh:LIST:FREQuency value: GetStruct = driver.configure.ploss.mpath.listPy.frequency.get(connector = enums.CmwsConnector.R11, path_index = enums.PathIndex.P1) ``` -------------------------------- ### RsCmwGprfMeas Hello-World example Source: https://rscmwgprfmeas.readthedocs.io/en/latest/readme.html Basic Hello-World example for the RsCmwGprfMeas instrument driver. Creates an instrument session over TCPIP with hislip0, queries the *IDN? identification string, and prints it. Supported instruments include CMW500, CMW270, CMW280, and CMW100. ```python from RsCmwGprfMeas import * instr = RsCmwGprfMeas('TCPIP::192.168.2.101::hislip0') idn = instr.query('*IDN?') print('Hello, I am: ' + idn) ``` -------------------------------- ### get_omode() Example Source: https://rscmwgprfmeas.readthedocs.io/en/latest/Trigger_FftSpecAn.html Gets the trigger offset mode. Returns an OffsetMode enum value. ```Python # SCPI: TRIGger:GPRF:MEASurement:FFTSanalyzer:OMODe value: enums.OffsetMode = driver.trigger.fftSpecAn.get_omode() ``` -------------------------------- ### get_offset() Example Source: https://rscmwgprfmeas.readthedocs.io/en/latest/Trigger_FftSpecAn.html Gets the trigger offset for FIXed mode. Returns a float in seconds. ```Python # SCPI: TRIGger:GPRF:MEASurement:FFTSanalyzer:OFFSet value: float = driver.trigger.fftSpecAn.get_offset() ``` -------------------------------- ### get_start() - Retrieve IQRecorder List Start Index Source: https://rscmwgprfmeas.readthedocs.io/en/latest/Configure_IqRecorder_ListPy.html Retrieves the start index for the IQ Recorder list mode using the RsCmwGprfMeas driver. ```Python # SCPI: CONFigure:GPRF:MEASurement:IQRecorder:LIST:STARt value: int = driver.configure.iqRecorder.listPy.get_start() ``` -------------------------------- ### SCPI commands for IQRecorder:BIN Source: https://rscmwgprfmeas.readthedocs.io/en/latest/IqRecorder_Bin.html Lists the SCPI commands READ:GPRF:MEASurement:IQRecorder:BIN and FETCh:GPRF:MEASurement:IQRecorder:BIN for retrieving I/Q recorder results in binary format. ```SCPI READ:GPRF:MEASurement:IQRecorder:BIN FETCh:GPRF:MEASurement:IQRecorder:BIN ``` -------------------------------- ### get_offset() - Get Trigger Offset Source: https://rscmwgprfmeas.readthedocs.io/en/latest/Trigger_IqRecorder.html Gets the delay time for triggered measurements, which delays the start of the measurement relative to the trigger event. Returns an integer in samples (range 0 to 64E+6). ```Python # SCPI: TRIGger:GPRF:MEASurement:IQRecorder:OFFSet value: int = driver.trigger.iqRecorder.get_offset() ``` -------------------------------- ### set_all() example for EnvelopePower Source: https://rscmwgprfmeas.readthedocs.io/en/latest/Configure_IqVsSlot_ListPy_EnvelopePower.html Python example for the set_all() method, which sets the expected nominal power for all subsweeps using a list of floats. ```Python # SCPI: CONFigure:GPRF:MEASurement:IQVSlot:LIST:ENPower:ALL driver.configure.iqVsSlot.listPy.envelopePower.set_all(exp_nom_power = [1.1, 2.2, 3.3]) ``` -------------------------------- ### GET TRIGger:GPRF:MEASurement:FFTSanalyzer:OSSTop Source: https://rscmwgprfmeas.readthedocs.io/en/latest/Trigger_FftSpecAn_OsStop.html Retrieves the start and stop values for the trigger offset mode VARiable. The start value must be smaller than the stop value. ```APIDOC ## GET TRIGger:GPRF:MEASurement:FFTSanalyzer:OSSTop ### Description Defines the start and stop values for the trigger offset mode VARiable. The start value must be smaller than the stop value. ### Method GET ### Endpoint TRIGger:GPRF:MEASurement:FFTSanalyzer:OSSTop ### Parameters #### Path Parameters - **Instance** (string) - Required - Measurement instance identifier. ### Response #### Success Response (200) - **Offset_Start** (float) - Range: -0.15 s to 0.15 s, Unit: s - **Offset_Stop** (float) - Range: -0.15 s to 0.15 s, Unit: s #### Response Example { "Offset_Start": 0.0, "Offset_Stop": 0.0 } ``` -------------------------------- ### get method for Mlength Source: https://rscmwgprfmeas.readthedocs.io/en/latest/Configure_Power_ParameterSetList_Mlength.html Python example for the get method, which queries the measurement length for a specific parameter set. The index parameter ranges from 0 to 31. The returned value is in seconds. ```python # SCPI: CONFigure:GPRF:MEASurement:POWer:PSET:MLENgth value: float = driver.configure.power.parameterSetList.mlength.get(index = 1) ``` -------------------------------- ### Initiate IQVSlot measurement with driver.iqVsSlot.initiate() Source: https://rscmwgprfmeas.readthedocs.io/en/latest/IqVsSlot.html Starts or restarts the IQVSlot measurement. The measurement enters the 'RUN' state. Use FETCh…STATe? to query the current measurement state. ```python # SCPI: INITiate:GPRF:MEASurement:IQVSlot driver.iqVsSlot.initiate() INTRO_CMD_HELP: Starts, stops, or aborts the measurement: - INITiate... starts or restarts the measurement. The measurement enters the 'RUN' state. - STOP... halts the measurement immediately. The measurement enters the 'RDY' state. Measurement results are kept. The resources remain allocated to the measurement. - ABORt... halts the measurement immediately. The measurement enters the 'OFF' state. All measurement values are set to NAV. Allocated resources are released. ``` -------------------------------- ### Python get method for frequency list Source: https://rscmwgprfmeas.readthedocs.io/en/latest/Configure_Ploss_ListPy_Frequency.html Python example for the get method of the FrequencyCls class. It retrieves the frequency list configuration using the specified connector and returns a GetStruct object. ```python # SCPI: CONFigure:GPRF:MEASurement:PLOSs:LIST:FREQuency value: GetStruct = driver.configure.ploss.listPy.frequency.get(connector = enums.CmwsConnector.R11) ``` -------------------------------- ### initiate Source: https://rscmwgprfmeas.readthedocs.io/en/latest/IqRecorder.html Starts or restarts the I/Q recorder measurement. Optionally saves the results to an I/Q file, memory, or both. ```APIDOC ## INITiate:GPRF:MEASurement:IQRecorder ### Description Starts or restarts the I/Q recorder measurement. The measurement enters the 'RUN' state. Optionally selects whether the results are written to an I/Q file, to the memory, or both. ### Method INITiate ### Endpoint INITiate:GPRF:MEASurement:IQRecorder ### Parameters #### Optional Parameters - **save_to_iq_file** (FileSave) - Optional - OFF | ON | ONLY. OFF: results only stored in memory. ON: results stored in memory and in a file. ONLY: results only stored in a file. ### Request Example ```python driver.iqRecorder.initiate(save_to_iq_file = enums.FileSave.OFF) ``` ### Response No response value is returned. ``` -------------------------------- ### Get retrigger for subsweep (Python) Source: https://rscmwgprfmeas.readthedocs.io/en/latest/Configure_IqVsSlot_ListPy_Retrigger.html Python example for the get() method, which queries the retrigger mechanism for a specific subsweep. The index parameter ranges from 0 to 199. Returns a boolean representing OFF or ON. ```Python # SCPI: CONFigure:GPRF:MEASurement:IQVSlot:LIST:RETRigger value: bool = driver.configure.iqVsSlot.listPy.retrigger.get(index = 1) ``` -------------------------------- ### fetch() method example Source: https://rscmwgprfmeas.readthedocs.io/en/latest/Power_StandardDev.html Python example for the fetch() method, which returns power results for all segments. FETCh commands return the measured values. ```Python # SCPI: FETCh:GPRF:MEASurement:POWer:SDEViation value: List[float] = driver.power.standardDev.fetch() ``` -------------------------------- ### ConfigureCls class definition with subgroups and display methods Source: https://rscmwgprfmeas.readthedocs.io/en/latest/_modules/RsCmwGprfMeas/Implementations/Configure.html Full source of the ConfigureCls class. It lazily creates subgroup objects for rfSettings, power, iqVsSlot, extPwrSensor, nrpm, iqRecorder, spectrum, fftSpecAn, ploss, and canalyzer. The get_display and set_display methods use the SCPI command CONFigure:GPRF:MEASurement:DISPlay to select the displayed measurement tab; the GUI controls are disabled during remote control, and SYSTem:DISPlay:UPDate ON is needed to display the GUI. The clone method copies the group and its repeated capabilities. ```python from ...Internal.Core import Core from ...Internal.CommandsGroup import CommandsGroup from ...Internal import Conversions from ... import enums # noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection [docs] class ConfigureCls: """Configure commands group definition. 152 total commands, 10 Subgroups, 1 group commands""" def __init__(self, core: Core, parent): self._core = core self._cmd_group = CommandsGroup("configure", core, parent) @property def rfSettings(self): """rfSettings commands group. 1 Sub-classes, 7 commands.""" if not hasattr(self, '_rfSettings'): from .RfSettings import RfSettingsCls self._rfSettings = RfSettingsCls(self._core, self._cmd_group) return self._rfSettings @property def power(self): """power commands group. 5 Sub-classes, 7 commands.""" if not hasattr(self, '_power'): from .Power import PowerCls self._power = PowerCls(self._core, self._cmd_group) return self._power @property def iqVsSlot(self): """iqVsSlot commands group. 2 Sub-classes, 7 commands.""" if not hasattr(self, '_iqVsSlot'): from .IqVsSlot import IqVsSlotCls self._iqVsSlot = IqVsSlotCls(self._core, self._cmd_group) return self._iqVsSlot @property def extPwrSensor(self): """extPwrSensor commands group. 1 Sub-classes, 5 commands.""" if not hasattr(self, '_extPwrSensor'): from .ExtPwrSensor import ExtPwrSensorCls self._extPwrSensor = ExtPwrSensorCls(self._core, self._cmd_group) return self._extPwrSensor @property def nrpm(self): """nrpm commands group. 1 Sub-classes, 3 commands.""" if not hasattr(self, '_nrpm'): from .Nrpm import NrpmCls self._nrpm = NrpmCls(self._core, self._cmd_group) return self._nrpm @property def iqRecorder(self): """iqRecorder commands group. 4 Sub-classes, 8 commands.""" if not hasattr(self, '_iqRecorder'): from .IqRecorder import IqRecorderCls self._iqRecorder = IqRecorderCls(self._core, self._cmd_group) return self._iqRecorder @property def spectrum(self): """spectrum commands group. 3 Sub-classes, 4 commands.""" if not hasattr(self, '_spectrum'): from .Spectrum import SpectrumCls self._spectrum = SpectrumCls(self._core, self._cmd_group) return self._spectrum @property def fftSpecAn(self): """fftSpecAn commands group. 1 Sub-classes, 8 commands.""" if not hasattr(self, '_fftSpecAn'): from .FftSpecAn import FftSpecAnCls self._fftSpecAn = FftSpecAnCls(self._core, self._cmd_group) return self._fftSpecAn @property def ploss(self): """ploss commands group. 3 Sub-classes, 1 commands.""" if not hasattr(self, '_ploss'): from .Ploss import PlossCls self._ploss = PlossCls(self._core, self._cmd_group) return self._ploss @property def canalyzer(self): """canalyzer commands group. 2 Sub-classes, 3 commands.""" if not hasattr(self, '_canalyzer'): from .Canalyzer import CanalyzerCls self._canalyzer = CanalyzerCls(self._core, self._cmd_group) return self._canalyzer # noinspection PyTypeChecker [docs] def get_display(self) -> enums.MeasTab: """SCPI: CONFigure:GPRF:MEASurement:DISPlay \n Snippet: value: enums.MeasTab = driver.configure.get_display() \n Selects the displayed measurement tab. This command is useful, if you want to observe the GUI during remote control. The GUI controls are disabled in that case, so that you cannot select a tab via the GUI. To display the GUI, use SYSTem:DISPlay:UPDate ON. \n :return: meas_tab: POWer | SPECtrum | FFTSanalyzer | IQRecorder | IQVSlot | EPSensor """ response = self._core.io.query_str('CONFigure:GPRF:MEASurement:DISPlay?') return Conversions.str_to_scalar_enum(response, enums.MeasTab) [docs] def set_display(self, meas_tab: enums.MeasTab) -> None: """SCPI: CONFigure:GPRF:MEASurement:DISPlay \n Snippet: driver.configure.set_display(meas_tab = enums.MeasTab.EPSensor) \n Selects the displayed measurement tab. This command is useful, if you want to observe the GUI during remote control. The GUI controls are disabled in that case, so that you cannot select a tab via the GUI. To display the GUI, use SYSTem:DISPlay:UPDate ON. \n :param meas_tab: POWer | SPECtrum | FFTSanalyzer | IQRecorder | IQVSlot | EPSensor """ param = Conversions.enum_scalar_to_str(meas_tab, enums.MeasTab) self._core.io.write(f'CONFigure:GPRF:MEASurement:DISPlay {param}') def clone(self) -> 'ConfigureCls': """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 = ConfigureCls(self._core, self._cmd_group.parent) self._cmd_group.synchronize_repcaps(new_group) return new_group ``` ``` -------------------------------- ### get_mgap() Example Source: https://rscmwgprfmeas.readthedocs.io/en/latest/Trigger_FftSpecAn.html Gets the minimum gap time for the IF power trigger. Returns a float in seconds. ```Python # SCPI: TRIGger:GPRF:MEASurement:FFTSanalyzer:MGAP value: float = driver.trigger.fftSpecAn.get_mgap() ``` -------------------------------- ### set_all() - Set All Envelope Powers Source: https://rscmwgprfmeas.readthedocs.io/en/latest/Configure_IqRecorder_ListPy_EnvelopePower.html Python example for the set_all method, which sets a list of expected nominal powers using the SCPI command CONFigure:GPRF:MEASurement:IQRecorder:LIST:ENPower:ALL. ```python # SCPI: CONFigure:GPRF:MEASurement:IQRecorder:LIST:ENPower:ALL driver.configure.iqRecorder.listPy.envelopePower.set_all(exp_nom_power = [1.1, 2.2, 3.3]) ``` -------------------------------- ### get() method for Bandwidth Source: https://rscmwgprfmeas.readthedocs.io/en/latest/Configure_Power_ParameterSetList_FilterPy_Gauss_Bandwidth.html Python example for the get() method, which selects the bandwidth for a Gaussian filter for a specific parameter set (index range 0 to 31). Returns a float value in Hz. ```Python # SCPI: CONFigure:GPRF:MEASurement:POWer:PSET:FILTer:GAUSs:BWIDth value: float = driver.configure.power.parameterSetList.filterPy.gauss.bandwidth.get(index = 1) ``` -------------------------------- ### SCPI commands for IqRecorder configuration Source: https://rscmwgprfmeas.readthedocs.io/en/latest/Configure_IqRecorder.html Lists the SCPI commands for configuring the I/Q recorder: MODE, TOUT, RATio, FORMat, MUNit, USER, IQFile, and WTFile. ```SCPI CONFigure:GPRF:MEASurement:IQRecorder:MODE CONFigure:GPRF:MEASurement:IQRecorder:TOUT CONFigure:GPRF:MEASurement:IQRecorder:RATio CONFigure:GPRF:MEASurement:IQRecorder:FORMat CONFigure:GPRF:MEASurement:IQRecorder:MUNit CONFigure:GPRF:MEASurement:IQRecorder:USER CONFigure:GPRF:MEASurement:IQRecorder:IQFile CONFigure:GPRF:MEASurement:IQRecorder:WTFile ``` -------------------------------- ### Initiate spectrum measurement: driver.spectrum.initiate() Source: https://rscmwgprfmeas.readthedocs.io/en/latest/Spectrum.html Calls the INITiate command for the spectrum measurement. Starts or restarts the measurement, entering the 'RUN' state. Use FETCh…STATe? to query the current measurement state. ```python # SCPI: INITiate:GPRF:MEASurement:SPECtrum driver.spectrum.initiate() INTRO_CMD_HELP: Starts, stops, or aborts the measurement: - INITiate... starts or restarts the measurement. The measurement enters the 'RUN' state. - STOP... halts the measurement immediately. The measurement enters the 'RDY' state. Measurement results are kept. The resources remain allocated to the measurement. - ABORt... halts the measurement immediately. The measurement enters the 'OFF' state. All measurement values are set to NAV. Allocated resources are released. Use FETCh…STATe? to query the current measurement state. > param opc_timeout_ms: > Maximum time to wait in milliseconds, valid only for this call. ``` -------------------------------- ### Get EnvelopePower for a segment (Python) Source: https://rscmwgprfmeas.readthedocs.io/en/latest/Configure_Power_ListPy_EnvelopePower.html Python example for querying the expected nominal power of a specific segment using the get method. The index parameter is an integer in the range 0 to 3999. The returned value is in dBm. ```python # SCPI: CONFigure:GPRF:MEASurement:POWer:LIST:ENPower value: float = driver.configure.power.listPy.envelopePower.get(index = 1) ``` -------------------------------- ### initiate method: INITiate:GPRF:MEASurement:EPSensor Source: https://rscmwgprfmeas.readthedocs.io/en/latest/_modules/RsCmwGprfMeas/Implementations/ExtPwrSensor.html Wraps the SCPI INITiate command to start or restart the measurement. Takes optional opc_timeout_ms and calls write_with_opc. The measurement enters the 'RUN' state. ```python [docs] def initiate(self, opc_timeout_ms: int = -1) -> None: """SCPI: INITiate:GPRF:MEASurement:EPSensor \n Snippet: driver.extPwrSensor.initiate() \n INTRO_CMD_HELP: Starts, stops, or aborts the measurement: \n - INITiate... starts or restarts the measurement. The measurement enters the 'RUN' state. - STOP... halts the measurement immediately. The measurement enters the 'RDY' state. Measurement results are kept. The resources remain allocated to the measurement. - ABORt... halts the measurement immediately. The measurement enters the 'OFF' state. All measurement values are set to NAV. Allocated resources are released. Use FETCh...STATe? to query the current measurement state. \n :param opc_timeout_ms: Maximum time to wait in milliseconds, valid only for this call.""" self._core.io.write_with_opc(f'INITiate:GPRF:MEASurement:EPSensor', opc_timeout_ms) ``` -------------------------------- ### get_all() - Retrieve All Envelope Powers Source: https://rscmwgprfmeas.readthedocs.io/en/latest/Configure_IqRecorder_ListPy_EnvelopePower.html Python example for the get_all method, which retrieves a list of expected nominal powers using the SCPI command CONFigure:GPRF:MEASurement:IQRecorder:LIST:ENPower:ALL. ```python # SCPI: CONFigure:GPRF:MEASurement:IQRecorder:LIST:ENPower:ALL value: List[float] = driver.configure.iqRecorder.listPy.envelopePower.get_all() ``` -------------------------------- ### Get Start Index (get_start) Source: https://rscmwgprfmeas.readthedocs.io/en/latest/Configure_Power_ListPy.html Selects the first segment to be measured (start of a sweep). The total number of segments per sweep, including repetitions, must not be higher than 10000. Returns an integer in the range 0 to StopIndex. ```Python # SCPI: CONFigure:GPRF:MEASurement:POWer:LIST:STARt value: int = driver.configure.power.listPy.get_start() ``` -------------------------------- ### get_source() - Get Trigger Source Source: https://rscmwgprfmeas.readthedocs.io/en/latest/Trigger_IqRecorder.html Gets the source of trigger events. Some values are always available; additional values may be available depending on installed options. Returns a string, e.g., 'IF Power' or 'Free Run'. ```Python # SCPI: TRIGger:GPRF:MEASurement:IQRecorder:SOURce value: str = driver.trigger.iqRecorder.get_source() ```