Skip to content

Commit

Permalink
get/set current on the toptica
Browse files Browse the repository at this point in the history
  • Loading branch information
dchristle committed May 16, 2016
1 parent e79a7c7 commit fccad0a
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions instrument_plugins/TOPTICA_DLPro.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,19 @@ def __init__(self, name, address, reset = False):
units = 's',
minval = 0 )


self.add_parameter('tc_current',
flags = Instrument.FLAG_GETSET,
type = types.FloatType,
units = 'mA',
minval = -5.0,
maxval = 5.0)

self.add_parameter('tc_current_actual',
flags = Instrument.FLAG_GET,
type = types.FloatType,
units = 'mA')

self.add_parameter('current',
flags = Instrument.FLAG_GETSET,
type = types.FloatType,
Expand Down Expand Up @@ -400,6 +413,24 @@ def do_get_piezo_voltage(self):
ret = self.query('(param-ref \'laser1:dl:pc:voltage-set)')
return float(ret)

def do_set_tc_current(self, current):
ret = self.query(('(param-set! \'laser1:dl:tc:current-set %.3f)' % current))
if ret == '\n0\r':
return True
else:
logging.error(__name__ + ': set tc current returned string:%r' % ret)
return False
return

def do_get_tc_current(self):
ret = self.query(('(param-ref \'laser1:dl:tc:current-set)'))
return float(ret)

def do_get_tc_current_actual(self):
ret = self.query(('(param-ref \'laser1:dl:tc:current-act)'))
return float(ret)




def get_all(self):
Expand Down

0 comments on commit fccad0a

Please sign in to comment.