Skip to content

Commit

Permalink
Merge pull request #538 from DiCarloLab-Delft/AWG_enhancements
Browse files Browse the repository at this point in the history
Awg enhancements
  • Loading branch information
WilliamHPNielsen authored Mar 28, 2017
2 parents e11da32 + 2cded75 commit e1243c7
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 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 @@ -331,8 +339,9 @@ def __init__(self, name, address, timeout=180, **kwargs):
get_cmd=filter_cmd + '?',
set_cmd=filter_cmd + ' {}',
vals=vals.Enum(20e6, 100e6, 9.9e37,
np.float('inf'),
'INF', 'INFinity'),
get_parser=float)
get_parser=self._tek_outofrange_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 +396,14 @@ def newlinestripper(self, string):
else:
return string

def _tek_outofrange_get_parser(self, string):
val = float(string)
# note that 9.9e37 is used as a generic out of range value
# in tektronix instruments
if val >= 9.9e37:
val = np.float('INF')
return val

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

0 comments on commit e1243c7

Please sign in to comment.