QCoDeS example with Rohe&Schwarz SMW200A

The Rohde&Schwartz SMW200A Vector Source is a high-performance signal generator. The frequency range is from 100kHz up to 40GHz. The signal can be modulated with a wide range of internal or external generated waveforms. All signals can be configured with their specific classes. One usage is generating signals for radar module and receiver tests.

from qcodes_contrib_drivers.drivers.RohdeSchwarz.SMW200A import RohdeSchwarz_SMW200A as smw200a

Be sure to specify the correct IP address in the constructor. If the driver cannot find the device, a VisaIOError is raised. If the read device id is not correct, a RuntimeError is raised.

dev = smw200a( name='SMW200A', address='TCPIP::' )

At the startup of the driver it asks the instrument for the device id and the installed options. With this informations the set of parameters is modified. Not all parameters are available with all options.

print( "ID:", dev.get_id() )
print( "Options:", dev.get_options() )
ID: Rohde&Schwarz,SMW200A,1412.0000K02/105578, SP2
Options: ['SMW-B13T', 'SMW-B22', 'SMW-B120', 'SMW-K22', 'SMW-K23']

As an example for the usage of the device, the frequency modulation is modified here. First, we will print the current settings.

fm = dev.submodules['fm_channels'][0]
print('       Deviation:', fm.deviation())
print('          Source:', fm.source())
print('Deviation ration:', fm.deviation_ratio())
print('            Mode:', fm.mode())
print('           State:', fm.state())
       Deviation: 1000.0
          Source: LF1
Deviation ration: 100.0
            Mode: NORM
           State: OFF

Then we change some values. The last one sets the state of the frequency modulation to ‘ON’. Now the modulation is activated until the state is set to ‘OFF’.

DBG-Mock: MockVisaHandle write SOUR1:FM1:DEV 20000
DBG-Mock: MockVisaHandle write SOUR1:FM:RAT 50
DBG-Mock: MockVisaHandle write SOUR1:FM:MODE LNO
DBG-Mock: MockVisaHandle write SOUR1:FM1:SOUR INT
DBG-Mock: MockVisaHandle write SOUR1:FM1:STAT 1

Close the connection after your work is completed.