qmi.instruments.rohde_schwarz.smbv100a

Instrument driver for the Rohde&Schwarz SMBV100A RF Signal Generator.

Classes

RohdeSchwarz_SMBV100A(context, name, transport)

Instrument driver for the Rohde&Schwarz SMBV100A RF Signal Generator.

class qmi.instruments.rohde_schwarz.smbv100a.RohdeSchwarz_SMBV100A(context: QMI_Context, name: str, transport: str, max_continuous_power: float | None = None)

Instrument driver for the Rohde&Schwarz SMBV100A RF Signal Generator.

set_sig_for_iq_mod(sig: str) None

Sets the input signal for I/Q modulation.

Parameters:

sig – “bas”, “anal” or “diff”.

get_external_reference_frequency() str

Return the currently configured external reference input frequency.

Possible values: “5MHZ”, “10MHZ”.

set_external_reference_frequency(frequency: str) None

Configure the external reference input frequency.

Parameters:

frequency – Desired frequency (accepted values: “5MHZ”, “10MHZ”); see also get_external_reference_frequency().

set_iq(toggle: bool) None

Activates external I/Q modulation with analog signal.

Parameters:

toggle – boolean flag to turn IQ modulation on/off.

set_freq_mode(mode: str) None

Sets RF frequency mode to list, sweep or fixed. CW and FIX are the same.

Parameters:

mode – “fix”, “list”, “swe” or “cw”

set_sweep_frequency_start(frequency: float) None

Set start frequency of sweep.

Parameters:

frequency – Frequency in Hz.

set_sweep_frequency_stop(frequency: float) None

Set stop frequency of sweep.

Parameters:

frequency – Frequency in Hz.

set_sweep_frequency_step(frequency: float) None

Set step frequency of sweep.

Parameters:

frequency – Frequency in Hz.

start_calibration(all: bool = False, cal_iqm: bool = True) None

Start a calibration of the device. This method can be used to calibrate all internal adjustments, or to select a partial device calibration. This method does not use external measurement equipment.

Parameters:
  • all – Boolean to select if to calibrate everything.

  • cal_iqm – Boolean to select if to calibrate IQ modulator. Has effect only if ‘all’ is False.

enable_list_mode() None

Convenience function to set RF frequency to list mode.

set_list_processing_mode(mode: str) None

Selects how the list is to be processed.

Parameters:

mode – “auto” or “step”.

enable_list_step_mode()

Convenience function to select step-by-step processing of the list.

set_trigger_source_processing_lists(mode: str) None

Sets the trigger source processing lists.

Parameters:

mode – “auto”, “imm”, “sing” or “ext”.

set_list_ext_trigger_source()

Selects triggering by means of the external trigger.

set_freq_sweep_mode(mode: str)

Selects the frequency sweep mode.

Parameters:

mode – “auto” or “step”.

set_freq_sweep_spacing_mode(mode: str)

Selects the frequency sweep spacing mode.

Parameters:

mode – “log” or “lin”.

set_trig_source_freq_sweep(mode: str)

Sets the trigger source for the RF frequency sweep.

Parameters:

mode – “auto”, “sing”, “ext” or “eaut”.

enable_ext_freq_sweep_mode()

Convenience function to generate sweep signal step-by-step, manually triggered. To trigger a sweep step, apply an external trigger signal. The step width corresponds to the step width set for the rotary knob.

reset_sweep()

Resets all active sweeps to the starting points.

reset_list_mode()

Resets the list to the starting point.

learn_list()

Learns the selected list to determine the hardware setting for all list entries. The results are saved with the list. When the list is activated the first time, these settings are calculated automatically.

load_fplist(fstart: float, fstop: float, funit: str, number_of_steps: int, pstart: float, pstop: float, punit: str)

Loads a frequency and power list.

Parameters:
  • fstart – The starting frequency of the list.

  • fstop – The ending frequency of the list.

  • funit – The unit of the frequency.

  • number_of_steps – The number of steps in the list.

  • pstart – The starting power of the list.

  • pstop – The ending power of the list.

  • punit – The unit of the power.

close() None

Close connection to the instrument.

force_unlock() None

Forcefully unlock the remote object.

This unlocks the object, regardless of who owns the lock. This allows you to unlock an object if the locking proxy has been destroyed without unlocking.

Use this with care.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

classmethod get_category() str | None

Return the optional name of the category this object belongs to.

A category name is a free-form string that has no special significance. Its purpose is to distinguish between groups of RPC objects that fulfill similar roles.

get_error_queue_length() int

Queries the number of entries in the error queue.

get_errors() None

Queries the error/event queue for all unread items and removes them from the queue.

get_frequency() float

Return the current RF frequency in Hz.

get_idn() QMI_InstrumentIdentification

Read instrument type and version and return QMI_InstrumentIdentification instance.

Raises:

QMI_InstrumentException – on unexpected response to query.

Returns:

Instance of the instrument.

Return type:

QMI_InstrumentIdentification

get_iq_crest_factor() float

Return the current IQ crest factor compensation in dB.

get_iq_enabled() bool

Return True if IQ modulation is enabled, False if disabled.

get_iq_gain_imbalance() float

Return the current IQ gain imbalance (dB).

get_iq_leakage_i() float

Return the current I leakage amplitude (percent).

get_iq_leakage_q() float

Return the current Q leakage amplitude (percent).

get_iq_quadrature_offset() float

Return the current IQ quadrature offset.

get_iq_wideband() bool

Return True if wideband IQ modulation is enabled, False if disabled.

get_name() str

Return the name of this object.

Returns:

name attribute.

get_output_state() bool

Return True if RF output is enabled, False if RF output is disabled.

get_phase() float

Return the current phase delta in degrees.

get_power() float

Return the current RF output power in dBm.

get_power_on_output_policy() str

Return instrument power-on policy for setting the RF output state.

Possible values:

“OFF” if the instrument starts with RF output disabled; “UNCH” if the instrument starts with RF output state the same as before power down.

get_pulsemod_enabled() bool

Return True if pulse modulation is enabled, False if disabled.

get_pulsemod_ext_source() bool

Check pulse modulation source.

Returns:

True if pulse modulation uses an external source, else False.

Return type:

boolean

Raises:

QMI_InstrumentException – On unexpected response.

get_pulsemod_polarity() bool

Get pulse modulation polarity.

Raises:

QMI_InstrumentException – On unexpected response.

Returns:

True if the external pulse modulation polarity is inverted; False if it is normal.

get_reference_source() str

Return the current reference source.

Possible values:

“INT” if the internal 10 MHz reference source is used; “EXT” if an external reference source is used.

get_signals() list[SignalDescription]

Return a list of signals that can be published by this object.

Returns:

List consisting of qmi_signals attributes.

is_locked() bool

Query if the remote object is locked.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

is_open() bool

Return True if the instrument is open (ready for interaction).

lock(timeout: float = 0.0, lock_token: str | None = None) bool

Lock the remote object. If timeout is given, try every 0.1s within the given timeout value. The remote object can be locked with an optional custom lock token by giving a string into lock_token keyword argument.

If successful, this proxy is the only proxy that can invoke RPC methods on the remote object; other proxies will receive an “object is locked” response. The return value indicates if the lock was granted; a denied lock means the object was already locked by another proxy.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

open() None

Open connection to the instrument.

poll_calibration() None | int

Check whether an ongoing calibration is finished. If calibration is finished, this function returns a status code.

Raises:

QMI_InstrumentException – On calibration error or no calibration active.

Returns:

0 - If calibration was successful.

1 - If calibration failed.

None: If calibration is not yet finished.

Return type:

status_code

release_rpc_object() None

Give a warning if the instrument is removed while still open.

reset() None

Reset the instrument, returning (most) settings to their defaults.

Note that RST does not cancel an ongoing calibration.

set_frequency(frequency: float) None

Set the RF frequency.

Parameters:

frequency – Target frequency in Hertz.

set_iq_crest_factor(factor: float) None

Set the IQ crest factor compensation in dB.

Parameters:

factor – Crest factor in dB.

set_iq_enabled(enable: bool) None

Enable or disable IQ modulation.

Parameters:

enable – Target IQ modulation state. True for enabled, False for disabled.

set_iq_gain_imbalance(gain: float) None

Set the IQ gain imbalance in dB in range -1 to 1, increments of 0.001.

Parameters:

gain – Desired gain in dB.

Raises:

ValueError – If gain imbalance not within -1 - 1 dB.

set_iq_leakage_i(leakage: float) None

Set the I leakage amplitude between -5 and 5 (percent), in increments of 0.01.

Parameters:

leakage – leakage amplitude in percent.

Raises:

ValueError – If leakage amplitude not within -5 - 5 percent.

set_iq_leakage_q(leakage: float) None

Set the Q leakage amplitude between -5 and 5 (percent), in increments of 0.01.

Parameters:

leakage – Leakage amplitude in percent.

Raises:

ValueError – If leakage amplitude not within -5 - 5 percent.

set_iq_quadrature_offset(phase: float) None

Set the IQ quadrature offset between -8 and 8 degrees in increments of 0.01.

Parameters:

phase – Desired phase offset in degrees.

Raises:

ValueError – If phase offset not within -8 - 8 degrees.

set_iq_wideband(enable: bool) None

Enable or disable wideband IQ modulation.

Parameters:

enable – Target wideband IQ modulation state. True for enabled, False for disabled.

set_output_state(enable: bool) None

Enable or disable RF output.

Parameters:

enable – Target output state. True for enabled, False for disabled.

Raises:

QMI_InstrumentException – On power exceeding the power limit due to disable pulse modulation, using internal pulse modulation source or inverted external pulse source polarity.

set_phase(phase: float) None

Set the current phase delta.

Parameters:

phase – target phase delta in degrees.

set_power(power: float) None

Set the RF output power in dBm.

Parameters:

power – Target output power in dBm.

Raises:

QMI_InstrumentException – On power exceeding the power limit.

set_power_on_output_policy(policy: str) None

Set the instrument power-on policy for setting the RF output state.

Parameters:

policy – desired policy (accepted values: “OFF”, “UNCH”); see also get_power_on_output_policy().

set_pulsemod_enabled(enable: bool) None

Enable or disable pulse modulation.

Parameters:

enable – Target pulse modulation state. True for enabled, False for disabled.

Raises:

QMI_InstrumentException – On power exceeding the power limit.

set_pulsemod_ext_source(ext: bool) None

Enable or disable the external pulse modulation source.

When set to True, pulse modulation is controlled by an external pulse generator connected to the TRIG port of the instrument. When set to False, pulse modulation is controlled by an internal pulse generator.

The nominal threshold of the TRIG input signal is +1 Volt. The signal on the TRIG input must not exceed 5 Volt.

Parameters:

ext – Boolean flag indicating if external modulation must be enabled.

Raises:

QMI_InstrumentException – If using internal source and power above max power limit.

set_pulsemod_polarity(inverted: bool) None

Enable or disable inverted polarity for external modulation.

Parameters:

inverted – Boolean flag indicating if external modulation should be inverted. For normal polarity (False), the RF signal is suppressed when the TRIG pulse is low. For inverted polarity (True), the RF signal is suppressed when the TRIG pulse is high.

Raises:

QMI_InstrumentException – On using power beyond the max power limit.

set_reference_source(source: str) None

Set the reference source.

Parameters:

source – Desired reference source (accepted values: “INT”, “EXT”); see also get_reference_source().

unlock(lock_token: str | None = None) bool

Unlock the remote object.

Without optional parameters, this is only allowed by the proxy that initially locked the object. By giving the lock token as an input parameter, the specific object locked by this token can be unlocked. The return value indicates if the unlocking was successful.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.