Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes to AMI430 driver #525

Merged
merged 1 commit into from
Mar 14, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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