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.

[5]:
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.

[6]:
dev = smw200a( name='SMW200A', address='TCPIP::134.61.7.60::hislip0::INSTR' )

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.

[7]:
print( "ID:", dev.get_id() )
print( "Options:", dev.get_options() )
ID: Rohde&Schwarz,SMW200A,1412.0000K02/105578,04.30.005.29 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.

[8]:
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’.

[9]:
fm.deviation(20000)
fm.deviation_ratio(50)
fm.mode('LNO')
fm.source('INT')
fm.state('ON')
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.

[10]:
dev.close()