Skip to content

Commit

Permalink
Chanes to close microsoft#537
Browse files Browse the repository at this point in the history
Adds clock_source and ref_source parameters
Also added a change to the get parser of the lowpass filter setting. The
value 9.9e37 corresponds to infinity but can give problems when sending
it over a port (such as to pyqtgraph).
  • Loading branch information
AdriaanRol committed Mar 23, 2017
1 parent b10974e commit 7ddd6b9
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions qcodes/instrument_drivers/tektronix/AWG5014.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,20 @@ def __init__(self, name, address, timeout=180, **kwargs):
vals=vals.Enum('CONT', 'TRIG', 'SEQ', 'GAT'),
get_parser=self.newlinestripper
)
self.add_parameter('ref_clock_source',
label='Reference clock source',
self.add_parameter('clock_source',
label='Clock source',
get_cmd='AWGControl:CLOCk:SOURce?',
set_cmd='AWGControl:CLOCk:SOURce ' + '{}',
vals=vals.Enum('INT', 'EXT'),
get_parser=self.newlinestripper)

self.add_parameter('ref_source',
label='Reference source',
get_cmd='SOURce1:ROSCillator:SOURce?',
set_cmd='SOURce1:ROSCillator:SOURce ' + '{}',
vals=vals.Enum('INT', 'EXT'),
get_parser=self.newlinestripper)

self.add_parameter('DC_output',
label='DC Output (ON/OFF)',
get_cmd='AWGControl:DC:STATe?',
Expand Down Expand Up @@ -332,7 +340,7 @@ def __init__(self, name, address, timeout=180, **kwargs):
set_cmd=filter_cmd + ' {}',
vals=vals.Enum(20e6, 100e6, 9.9e37,
'INF', 'INFinity'),
get_parser=float)
get_parser=self._lowpass_filter_get_parser)
self.add_parameter('ch{}_DC_out'.format(i),
label='DC output level channel {}'.format(i),
unit='V',
Expand Down Expand Up @@ -387,6 +395,13 @@ def newlinestripper(self, string):
else:
return string

def _lowpass_filter_get_parser(self, string):
if 'E+037\n' in string:
val = 'INF'
else:
val = float(string)
return val

# Functions
def get_all(self, update=True):
"""
Expand Down

0 comments on commit 7ddd6b9

Please sign in to comment.