Skip to content

Commit

Permalink
Merge pull request #525 from kouwenhovenlab/driver/AMI_430_2
Browse files Browse the repository at this point in the history
Fixes to AMI430 driver
  • Loading branch information
Rubenknex authored Mar 14, 2017
2 parents e7037e0 + 601b72c commit b1e9b25
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions qcodes/instrument_drivers/american_magnetics/AMI430.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ def __init__(self, name, address, port, coil_constant, current_rating,
self._field_ramp_limit = coil_constant * current_ramp_limit

# Make sure the ramp rate time unit is seconds
if self.ask('RAMP:RATE:UNITS?') == '1':
if int(self.ask('RAMP:RATE:UNITS?')) == 1:
self.write('CONF:RAMP:RATE:UNITS 0')

# Make sure the field unit is Tesla
if self.ask('FIELD:UNITS?') == '0':
if int(self.ask('FIELD:UNITS?')) == 0:
self.write('CONF:FIELD:UNITS 1')

self.add_parameter('field',
Expand Down Expand Up @@ -90,15 +90,15 @@ def __init__(self, name, address, port, coil_constant, current_rating,
self.add_parameter('switch_heater_enabled',
get_cmd='PS?',
set_cmd=self._set_persistent_switch,
val_mapping={False: '0', True: '1'})
val_mapping={False: 0, True: 1})

self.add_parameter('in_persistent_mode',
get_cmd='PERS?',
val_mapping={False: '0', True: '1'})
val_mapping={False: 0, True: 1})

self.add_parameter('is_quenched',
get_cmd='QU?',
val_mapping={False: '0', True: '1'})
val_mapping={False: 0, True: 1})

self.add_function('reset_quench', call_cmd='QU 0')
self.add_function('set_quenched', call_cmd='QU 1')
Expand Down

0 comments on commit b1e9b25

Please sign in to comment.