Skip to content

Commit

Permalink
RS SGS100A driver (#817)
Browse files Browse the repository at this point in the history
* SGS100A Driver

Adding parameter to SGS100A driver to allow on/off of IQ modulation.

* Change parameter name

Forgot to change a few lines in previous commit.

* Strip trailing whitespace

* remove .DS_Store files

* Ignore DS_Store
  • Loading branch information
ThorvaldLarsen authored and jenshnielsen committed Oct 26, 2017
1 parent 3d7baef commit 9f55529
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,7 @@ tmp/

docs/examples/data/*

.idea/
.idea/

# Mac files
.DS_Store
12 changes: 12 additions & 0 deletions qcodes/instrument_drivers/rohde_schwarz/SGS100A.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ def __init__(self, name, address, **kwargs):
set_cmd=self.set_status,
get_parser=self.parse_on_off,
vals=vals.Strings())
self.add_parameter('IQ_state',
get_cmd=':IQ:STAT?',
set_cmd=self.set_IQ_state,
get_parser=self.parse_on_off,
vals=vals.Strings())
self.add_parameter('pulsemod_state',
get_cmd=':SOUR:PULM:STAT?',
set_cmd=self.set_pulsemod_state,
Expand Down Expand Up @@ -102,6 +107,13 @@ def set_status(self, stat):
raise ValueError('Unable to set status to %s, ' % stat +
'expected "ON" or "OFF"')

def set_IQ_state(self, stat):
if stat.upper() in ('ON', 'OFF'):
self.write(':IQ:STAT %s' % stat)
else:
raise ValueError('Unable to set status to %s, ' % stat +
'expected "ON" or "OFF"')

def set_pulsemod_state(self, stat):
if stat.upper() in ('ON', 'OFF'):
self.write(':PULM:SOUR EXT')
Expand Down

0 comments on commit 9f55529

Please sign in to comment.