Anritsu Signal Generator MG3694C module

Created on Wed Dec 1 07:00:19 2021

@author: Martin.Mihylov

class MG3694C.MG3694C(hostname)[source]

Bases: Instrument

This class uses vxi11 library to connect to Anritsu MG3694C. Need to have python ‘vxi11’ library installed!

Close()[source]
DisplayParamDict(Type)[source]

This function will print all the adjusted parameters.

abort()[source]

Description: Forces the trigger system to the idle state. Any sweep in progress is aborted as soon as possible

Parameters: None

ask_MaximalPowerLevel()[source]
Returns:

Requests the maximum RF output power level value that can be programmed for the particular MG369xC model

Return type:

TYPE Query str

ask_OutputPowerLevel()[source]
Returns:

Requests the value currently programmed for the RF output power level

Return type:

TYPE Query str

ask_am_internalFreq()[source]
Returns:

Requests the currently programmed modulating waveform frequency value for the internal AM function.

Return type:

TYPE Query str

ask_am_internalWave()[source]
Returns:

Requests the currently selected modulating waveform for the internal AM function.

Return type:

TYPE Query str

ask_am_logDepth()[source]
Returns:

Requests the currently programmed modulation depth value for the internal AM Log mode.

Return type:

TYPE Query str

ask_am_logsens()[source]
Returns:

Requests the currently programmed AM sensitivity value for the external AM Log mode.

Return type:

TYPE Query

ask_am_state()[source]
Returns:

Requests currently programmed amplitude modulation state (on/off)

Return type:

TYPE Query str

ask_am_type()[source]
Returns:

Requests the currently programmed AM operating mode.

Return type:

TYPE Query str

ask_fm_Bwidth()[source]
Returns:

Requests the currently programmed Unlocked FM synthesis mode of operation (narrow or wide)

Return type:

TYPE Query str

ask_fm_internalFreq()[source]
Returns:

Requests the currently programmed modulating waveform frequency value for the internal FM function.

Return type:

TYPE Query str

ask_fm_internalWave()[source]
Returns:

Requests the currently selected modulating waveform for the internal FM function.

Return type:

TYPE Query str

ask_fm_mode()[source]
Returns:

Requests the currently programmed synthesis mode used to generate the FM signal.

Return type:

TYPE Query str

ask_fm_state()[source]
Returns:

Requests the currently programmed frequency modulation state (on/off).

Return type:

TYPE Query str

ask_freq_CW()[source]
Returns:

Requests the current value of the frequency parameter.

Return type:

TYPE Query str

ask_freq_centerFreq()[source]
Returns:

Requests the current value of the RF output center frequency.

Return type:

TYPE Query str

ask_freq_mode()[source]
Returns:

Requests the currently selected programming mode for frequency control.

Return type:

TYPE Query str

ask_freq_span()[source]
Returns:

Requests the current value for SWEep[1] sweep span

Return type:

TYPE Query str

ask_freq_start()[source]
Returns:

Requests the current value for SWEep[1] start frequency.

Return type:

TYPE Query str

ask_freq_step()[source]
Returns:

Requests the current step increment value of the frequency parameter.

Return type:

TYPE Query str

ask_freq_stop()[source]
Returns:

Requests the current value for SWEep[1] stop frequency.

Return type:

Query str

ask_freq_unit()[source]
Returns:

Requests the currently selected frequency unit.

Return type:

Query str

ask_output_impedance()[source]
Returns:

Description: Queries the MG369xC RF output impedance. The impedance is nominally 50 ohms and is not settable.

Return type:

TYPE Query str

ask_output_protection()[source]
Returns:

Requests the currently programmed state of the MG369xC RF output during frequency changes in CW or step sweep mode.

Return type:

TYPE Query str

ask_output_retrace()[source]
Returns:

Requests the currently programmed state of the MG369xC RF output during sweep retrace

Return type:

TYPE Query str

ask_pm_Bwidth()[source]
Returns:

Requests the currently programmed phase modulation operating mode.

Return type:

TYPE Query str

ask_pm_internalFreq()[source]
Returns:

Requests the currently programmed modulating waveform frequency value for the internal phase modulation function.

Return type:

TYPE Query str

ask_pm_internalWave()[source]
Returns:

Requests the currently selected modulating waveform for the internal phase modulation function.

Return type:

TYPE Query str

ask_pm_state()[source]
Returns:

Requests the currently programmed phase modulation state (on/off).

Return type:

TYPE Query str

get_Data()[source]
Returns:

OutPut – Return a dictionary with the measured Power and CW Frequency.

Return type:

dict

query(message)[source]
reconnect(attempts_number=3)[source]
set_OutputPowerLevel(value)[source]
Parameters:

value (float/int) – Description: Sets the power level of the unswept RF output signal. Parameters: Power level (in dBm) | UP | DOWN | MIN | MAX Range: MIN to MAX (see notes below) Default: 0 dBm

Returns:

DESCRIPTION.

Return type:

TYPE

set_am_internalFreq(value, unit)[source]
Parameters:
  • value (str) – Description: Sets the frequency of the modulating waveform for the internal AM function (see :AM:INTernal:WAVE). Parameters: Frequency

  • unit (int/float) –

    Range: 0.1 Hz to 1 MHz for sine wave

    0.1 Hz to 100 kHz for square, triangle, and ramp waveforms Default: 1 kHz

    Raises

  • ------

  • ValueError – Error message

Return type:

None.

set_am_internalWave(state)[source]
Parameters:

state (str) – Description: Selects the modulating waveform (from the internal AM generator) for the internal AM function, as follows: SINE = Sine wave GAUSsian = Gaussian noise RDOWn = Negative ramp RUP = Positive ramp SQUare = Square wave TRIangle = Triangle wave UNIForm = Uniform noiseParameters: Parameters: SINE | GAUSsian | RDOWn | RUP | SQUare | TRIangle | UNIForm Default: SINE

Raises:

ValueError – Error message

Return type:

None.

set_am_logDepth(value)[source]
Parameters:

value (int/float) – Description: Sets the modulation depth of the AM signal in the internal AM Log mode. Parameters: Modulation depth (in dB) Range: 0 to 25 dB Default: 3 dB

Raises:

ValueError – Error message

Return type:

None.

set_am_logsens(value)[source]
Parameters:

value (int/float) – Description: Sets the AM sensitivity for the external AM Log mode. Parameters: Sensitivity (in dB/V) Range: 0 to 25 dB/V Default: 3 dB/V

Raises:

ValueError – Error message

Return type:

None.

set_am_state(state)[source]
Parameters:

state (str/int) – Description: Enable/disable amplitude modulation of MG369xC RF output signal. Parameters: ON | OFF | 1 | 0 Default: OFF

Raises:

ValueError – Error message

Return type:

None.

set_am_type(state)[source]
Parameters:

state (str) – Description: Selects the AM operating mode. Parameters: LINear | LOGarithmic Default: LINear

Raises:

ValueError – Error message

Return type:

None.

set_correctionCommands(state)[source]
Parameters:

state (str/int) – Description: Turns the selected user level flatness correction power-offset table on/off. Parameters: ON | OFF | 1 | 0 Default: OFF

Raises:

ValueError – Error message

Return type:

None.

set_fm_Bwidth(state)[source]
Parameters:

state (str) – Description: Sets the Unlocked FM synthesis mode to wide or narrow mode of operation. The Unlocked Wide FM synthesis mode allows maximum deviations of ±100 MHz for DC to 100 Hz rates. The Unlocked Narrow FM synthesis mode allows maximum deviations of ±10 MHz for DC to 8 MHz rates. Parameters: MIN | MAX Range: MIN = narrow mode; MAX = wide mode Default: MIN

Raises:

ValueError – Error message

Return type:

None.

set_fm_internalFreq(value, unit)[source]
valueint/float

Range: 0.1 Hz to 1 MHz for sine wave

unitstr

Parameters: Frequency Description: Sets the frequency of the modulating waveform for the internal FM function (see :FM:INTernal:WAVE). Default: 1 kHz

Raises
ValueError

Error message

None.

set_fm_internalWave(state)[source]
Parameters:

state (str) – Description: Selects the modulating waveform (from the internal FM generator) for the internal FM function, as follows: SINE = Sine wave GAUSsian = Gaussian noise RDOWn = Negative ramp RUP =Positive ramp SQUare = Square wave TRIangle = Triangle wave UNIForm = Uniform noise Parameters: SINE | GAUSsian | RDOWn | RUP | SQUare | TRIangle | UNIForm Default: SINE

Raises:

ValueError – Error message

Return type:

None.

set_fm_mode(state)[source]
Parameters:

state (str) – Description: Sets the synthesis mode employed in generating the FM signal, as follows: LOCKed[1] = Locked Narrow FM LOCKed2 = Locked Narrow Low-Noise FM UNLocked = Unlocked FM If LOCKed[1] or LOCKed2 is set, the YIG phase-locked loop is used in synthesizing the FM signal. If UNLocked is set, the YIG phase-lock loop is disabled and the FM signal is obtained by applying the modulating signal to the tuning coils of the YIG-tuned oscillator. Parameters: LOCKed[1] | LOCKed2 | UNLocked Default: UNLocked

Raises:

ValueError – Error message

Return type:

None.

set_fm_steta(state)[source]
Parameters:

state (str/int) – Description: Enable/disable frequency modulation of MG369xC RF output signal. Parameters: ON | OFF | 1 | 0 Default: OFF

Raises:

ValueError – Error message

Return type:

None.

set_freq_CW(value, unit)[source]
Parameters:
  • value (int/float) –

    Description: Sets the RF output frequency of the MG369xC to the value entered. Parameters UP | DOWN increment/decrement the frequency by the value set by [:SOURce]:FREQuency:STEP:INCRement command. Parameters: Frequency (in Hz) | UP | DOWN | MIN | MAX Range: MIN to MAX (see note below) Default: (MIN + MAX) / 2

    Model Minimum Frequency* Maximum Frequency MG3691C 10 MHz 10 GHz MG3692C 10 MHz 20 GHz MG3693C 10 MHz 31.8 GHz MG3694C 10 MHz 40 GHz MG3695C 10 MHz 50 GHz MG3697C 10 MHz 70 GHz

  • unit (str) – Parameter Frequency.

Return type:

None.

set_freq_cent(value, unit)[source]
Parameters:
  • value (int/float) – Description: Sets the MG369xC RF output center frequency to the value entered. :CENTER and :SPAN frequencies are coupled values. Entering the value for one will cause the other to be recalculated. (See notes under :FREQuency:SPAN)

  • unit (str) – Parameters: Frequency (in Hz)

Raises:

ValueError – Error message

Return type:

None.

set_freq_mode(state)[source]
Parameters:

state (str) –

Description: Specifies which command subsystem controls the MG369xC frequency, as follows: CW|FIXed = [:SOURce]:FREQuency:CW|FIXed SWEep[1] = [:SOURce]:SWEep[1] (see Datasheet) SWCW = (see notes) ALSW = (see notes) LIST<n> = [:SOURce]:LIST<n> (see DataSheet) :SWEep and :SWEep1may be used interchangeably

Parameters: CW | FIXed | SWEep[1] | SWCW | ALSW | LIST[1] | LIST2 | LIST3 | LIST4 Default: CW

Raises:

ValueError – Error message

Return type:

None.

set_freq_span(value, unit)[source]
Parameters:
  • value (int/float) – Description: Sets sweep span for SWEep[1] to value entered. :SPAN and :CENTer are coupled values Range: 1 kHz to (MAX MIN) Default: MAX MIN

  • unit (str) – Parameters: Frequency (in Hz)

Raises:

ValueError – Error message

Return type:

None.

set_freq_start(value, unit)[source]
Parameters:
  • value (int/float) –

    Description: Sets start frequency for SWEep[1] to the value entered. (MIN is defined in the notes

    Range: MIN to MAX Default: MIN

  • unit (str) – Parameters: Frequency (in Hz) | MIN

Raises:

ValueError – Error message

Return type:

None.

set_freq_step(value, unit)[source]
Parameters:
  • value (int/float) – Description: Sets the step increment size used with the :FREQuency:CW command. Range: 0.01 Hz to (MAX MIN) Default: 0.1 GHz

  • unit (str) – Parameters: Frequency (in Hz)

Raises:

ValueError – Error message

Return type:

None.

set_freq_stop(value, unit)[source]
Parameters:
  • value (int/float) – Description: Sets stop frequency for SWEep[1] to the value entered. (MAX is defined in the notes under [:SOURce]:FREQuency:CW|FIXed). Range: MIN to MAX Default: MAX

  • unit (str) – Parameters: Frequency (in Hz) | MAX

Raises:

ValueError – Error message

Return type:

None.

set_output(state)[source]
Parameters:

state (str/int) – Description: Turns MG369xC RF output power on/off. Parameters: ON | OFF | 1 | 0 Default: OFF

Raises:

ValueError – Error message

Return type:

None.

set_output_protection(state)[source]
Parameters:

state (str/int) – Description: ON causes the MG369xC RF output to be turned off (blanked) during frequency changes in CW or step sweep mode. OFF leaves RF output turned on (un blanked). Parameters: ON | OFF | 1 | 0 Default: ON

Raises:

ValueError – Error message

Return type:

None.

set_output_retrace(state)[source]
Parameters:

state (str/int) – Description: ON causes the MG369xC RF output to be turned off during sweep retrace. OFF leaves RF output turned on Parameters: ON | OFF | 1 | 0 Default: OFF

Raises:

ValueError – Error message

Return type:

None.

set_pm_Bwidth(state)[source]
Parameters:

state (str) – Description: Selects the phase modulation (ΦM) operating mode. The Narrow ΦM mode allows maximum deviations of ±3 radians for DC to 8 MHz rates. The Wide ΦM mode allows maximum deviations of ±400 radians for DC to 1 MHz rates. Parameters: MIN | MAX Range: MIN = narrow mode MAX = wide mode Default: MIN

Raises:

ValueError – Error message

Return type:

None.

set_pm_internalFreq(value, unit)[source]
Parameters:
  • value (str) – Parameter: Frequency (in Hz)

  • unit (int/float) – Description: Sets the frequency of the modulating waveform for the internal phase modulation (see :PM:INTernal:WAVE) Range: 0.1 Hz to 1 MHz for sine wave; 0.1 Hz to 100 kHz for square, triangle, and ramp waveforms. Default: 1 kHz

Raises:

ValueError – Error message

Return type:

None.

set_pm_internalWave(state)[source]
Parameters:

state (str) – Description: Selects the modulating waveform (from the internal ΦM generator) for the internal phase modulation function, as follows: SINE = Sine wave GAUSsian = Gaussian noise RDOWn = Negative ramp RUP = Positive ramp SQUare = Square wave TRIangle = Triangle wave UNIForm = Uniform noise Parameters: SINE | GAUSsian | RDOWn | RUP | SQUare | TRIangle | UNIForm Default: SINE

Raises:

ValueError – Error message

Return type:

None.

set_pm_state(state)[source]
Parameters:

state (str/int) – Description: Enable/disable phase modulation of the MG369xC RF output signal. Parameters: ON | OFF | 1 | 0 Default: OFF

Raises:

ValueError – v

Return type:

None.

write(message, encoding='utf-8')[source]

Write string to instrument