rminstr.instruments.RS_SMA100B

Classes

ArmedSignalGenerator

Implementation the RS_SMA100B as an armed signal generator.

Package Contents

class rminstr.instruments.RS_SMA100B.ArmedSignalGenerator(visa_address: str, resource_manager: pyvisa.ResourceManager = None, log_path: str = None)

Bases: rminstr.instruments.communications.Instrument, rminstr.instruments.measurement_functionalities.ABC_ArmedSignalGenerator

Implementation the RS_SMA100B as an armed signal generator.

Attributes

trigger_countint

Counts the number of times the instrument has been triggered.

Initialize RS SMA100B as an armed signal generator.

Parameters:
visa_addressstr

Visa address of instrument.

resource_managervisa.ResourceManager, optional

Pyvisa resource manager for opening visa resources. The Default is None.

log_pathstr, optional

If provided, will log at the specified path. The default is None.

Returns:
None.
default_settings
trigger_count = 0
initial_setup(display: bool = True, list_file: str = '/var/user/list1.lsw', **kwargs)

Initialize istrument.

Parameters:
displaybool, optional

True, turns display on. False turns display off to improve performance. The default is True.

list_filestr, optional

Source list file. Shouldn’t need to be changed. The default is ‘/var/user/list1.lsw’

other_commandslist, optional

list of strings, commands to be sent directly to machine. The default is None.

Returns:
None.
setup(dBm: float = None, f_GHz: float = None, dBm_limit: float = None, source_on: bool = None, AM: bool = None, AM_ext_port: int = None, AM_ext_sensitivity_percent_per_volt: float = None, pow_sweep_dBm: list[float] = None, freq_sweep_GHz: list[float] = None, time_sweep_micros: list[float] = None, **kwargs)

Adjust settings on the machine.

Parameters:
dBmfloat, optional

Power level setting in dBm. The default is None.

f_GHzfloat, optional

Frequency setting in GHz. The default is None.

dBm_limitfloat, optional

Power limit setting in dBm. The default is None.

source_onbool, optional

Turns source on when True, off when False. The default is None.

AMbool, optional

Turns on the Amplitude Modulation. The default is None.

AM_ext_portint, optional

What port to use for amplitude modulation. The default is None.

AM_ext_sensitivity_percent_per_voltfloat, optional

Sensitivity of the amplitdue modulation in percent per volt. The default is None.

pow_sweep_dBm: list[float], optional

A list of power levels to sweep if using the signal generator to sweep.

freq_sweep_GHz: list[float], optional

A list of frequency levels to sweep if using the signal generator to sweep.

time_sweep_micros: list[float], optional

A list of durations to sweep with if using the signal generator to sweep.

Returns:
None.
arm(list_mode: str = 'AUTO', trigger_source: str = 'BUS', output: str = None)

Arm the signal generator so that it starts when triggered.

Parameters:
list_modestr, optional

Either ‘AUTO’ or ‘STEP’. ‘AUTO’ will have source step through sweep and dwell on each element for each time sweep value defined in setup. ‘STEP’ will have source step through the index when a trigger is received. The default is ‘AUTO’.

trigger_sourcestr, optional

Either ‘BUS’ or ‘EXT’ trigger source for initiating/stepping through a sweep. The default is ‘BUS’.

output: float, optional

Either ‘off’ or ‘on’; additional arming option. Overrides the list_mode command if provided, and arms source to change the output status. The default is None.

Returns:
None.
trigger()

Trigger the signal generator.

Returns:
None.
fetch_data()

Fetch data from the signal generator.

This is a placeholder function.

Returns:
None.
query_state() str

Check the state of the machine according to state model.

Returns:
str

Current state of the instrument.

raise_errors()

Query the status of the instrument. If there are errors, raise them as Python errors.

Returns:
None.
Raises:
InstrumentError

Instrument error if the instrument has errors or is in an error state.

get_errors()

Get any errors present on the instrument as a string.

Returns:
str

Error string if one is there.

do_after_group_trigger()

Run post-trigger commands after an external trigger event.

Returns:
None.
get_sweep_index()

Get the current index of the sweep.

Returns:
int

Index of sweep.

get_frequency()

Get the frequency setpoint in GHz.

Returns:
int

Frequency setpoint.