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

Driver/Mercury iPS with VISA #897

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
1398113
Add VISA driver file
WilliamHPNielsen Dec 4, 2017
d90038f
Add more PSU parameters
WilliamHPNielsen Dec 4, 2017
963022a
fix indentation
WilliamHPNielsen Dec 5, 2017
79ec0cf
Merge branch 'master' into driver/MercuryiPS_VISA
WilliamHPNielsen Dec 6, 2017
e674763
add setter function for PSU parameters
WilliamHPNielsen Dec 6, 2017
39a2d6c
Merge branch 'driver/MercuryiPS_VISA' of github.com:WilliamHPNielsen/…
WilliamHPNielsen Dec 6, 2017
c5cbb08
pep8 field_vector
WilliamHPNielsen Dec 6, 2017
cb1cb1f
Merge branch 'master' into driver/MercuryiPS_VISA
jenshnielsen Dec 12, 2017
309cdb6
don't assign an unused variable
WilliamHPNielsen Dec 18, 2017
779e987
add initialisation logging to visa.py
WilliamHPNielsen Dec 19, 2017
8dee7b8
pass visalib argument to super().__init__
WilliamHPNielsen Dec 19, 2017
38a70a4
Merge branch 'driver/MercuryiPS_VISA' of github.com:WilliamHPNielsen/…
WilliamHPNielsen Dec 19, 2017
b2742d0
add a simple PyVISA-sim test
WilliamHPNielsen Dec 19, 2017
64f9074
Merge branch 'master' into driver/MercuryiPS_VISA
WilliamHPNielsen May 9, 2018
3113b6b
Merge branch 'master' of github.com:QCoDeS/Qcodes into driver/Mercury…
WilliamHPNielsen May 9, 2018
76b798f
Handle unitless responses
WilliamHPNielsen May 9, 2018
b927c2c
Merge branch 'driver/MercuryiPS_VISA' of github.com:WilliamHPNielsen/…
WilliamHPNielsen May 9, 2018
fcf0ec1
Merge branch 'master' into driver/MercuryiPS_VISA
WilliamHPNielsen Jun 11, 2018
efe91da
Fix wrong indentation
WilliamHPNielsen Jun 11, 2018
3335590
Add set command to field_target
WilliamHPNielsen Jun 13, 2018
8125d27
Update test to use parameters
WilliamHPNielsen Jun 14, 2018
f9ba777
Convince mypy that a variable is a float
WilliamHPNielsen Jun 14, 2018
fdfb537
Add a FieldVector to hold the target field
WilliamHPNielsen Jun 14, 2018
4b2c915
Apply a lambda for great justice
WilliamHPNielsen Jun 14, 2018
bb617aa
Add ramp status parameter
WilliamHPNielsen Jun 14, 2018
4ce2289
Refactor response parsing slightly
WilliamHPNielsen Jun 14, 2018
b8f62bd
Add logic for ramp status setting
WilliamHPNielsen Jun 14, 2018
7c8d390
Fix typo
WilliamHPNielsen Jun 14, 2018
ab38fcb
Fix another typo
WilliamHPNielsen Jun 14, 2018
c496827
Add all target field params as read-only
WilliamHPNielsen Jun 26, 2018
0acd4cc
Add missing value for ramp status
WilliamHPNielsen Jun 26, 2018
7f3375d
Unuse lambdas for even greater justice
WilliamHPNielsen Jun 26, 2018
2f3ec46
Remove unused variable
WilliamHPNielsen Jun 27, 2018
71d3b9f
Add missing rho
WilliamHPNielsen Jun 27, 2018
07cedc3
Make targets settable
WilliamHPNielsen Jun 28, 2018
dfe5d53
Add trivial field limits if not user provided
WilliamHPNielsen Jul 18, 2018
051006b
Add ramp_to_target to PS Slave
WilliamHPNielsen Jul 19, 2018
e849c3f
Add measured field parameters
WilliamHPNielsen Jul 19, 2018
717e68e
Fix typo
WilliamHPNielsen Jul 19, 2018
693bedc
Update the way measured coordinates are gotten
WilliamHPNielsen Jul 19, 2018
21e3872
Fix typo
WilliamHPNielsen Jul 19, 2018
99e4c1d
Add two ramp methods (safe and fast)
WilliamHPNielsen Jul 19, 2018
8630ae9
Log communication like a proper VISA instrument
WilliamHPNielsen Jul 19, 2018
8c24822
Log VISA communication with the VISA logger
WilliamHPNielsen Jul 19, 2018
d10c1d1
Test (and correct) _ramp_safely
WilliamHPNielsen Jul 19, 2018
8de7aa7
Add high-level ramp function
WilliamHPNielsen Jul 19, 2018
3417df2
Refactor test to use pytest's caplog
WilliamHPNielsen Jul 20, 2018
f4ead14
Merge branch 'master' into driver/MercuryiPS_VISA
WilliamHPNielsen Jul 20, 2018
b02f21a
Fix typo in ramp
WilliamHPNielsen Jul 20, 2018
805d264
Remove unused function in test
WilliamHPNielsen Jul 20, 2018
78046db
Add method to update field limits
WilliamHPNielsen Jul 20, 2018
f7d32dd
Remove unused imports in test
WilliamHPNielsen Jul 20, 2018
c437b9f
Send target vector to slaves
WilliamHPNielsen Jul 20, 2018
85cedf0
Cast a variable as a list (when it is a list)
WilliamHPNielsen Jul 20, 2018
eb1aed6
Add example notebook
WilliamHPNielsen Jul 20, 2018
fb98237
Delete old (very obsolete) notebook
WilliamHPNielsen Jul 20, 2018
d0338b4
Remove confusing comment from yaml file
WilliamHPNielsen Jul 20, 2018
f374558
Merge branch 'master' into driver/MercuryiPS_VISA
WilliamHPNielsen Jul 20, 2018
658e591
Merge branch 'master' into driver/MercuryiPS_VISA
WilliamHPNielsen Aug 3, 2018
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

This file was deleted.

456 changes: 456 additions & 0 deletions docs/examples/driver_examples/Qcodes example with Mercury iPS.ipynb

Large diffs are not rendered by default.

90 changes: 90 additions & 0 deletions qcodes/instrument/sims/MercuryiPS.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
spec: "1.0"
devices:
device 1:
eom:
GPIB INSTR: # It seems that pyvisa-sim cannot find a TCPIP instrument unless it's actually there..?
q: "\n"
r: "\n"
error: ERROR
dialogues:
- q: "*IDN?"
r: "IDN:OXFORD INSTRUMENTS:SIMULATED MERCURY iPS:000:000"

properties:

x field target:
default: 0
getter:
q: "READ:DEV:GRPX:PSU:SIG:FSET"
r: "{}"
setter:
q: "SET:DEV:GRPX:PSU:SIG:FSET:{}"
r: "" # response is needed, since the instrument actually responds to sets

x field:
default: 0
getter:
q: "READ:DEV:GRPX:PSU:SIG:FLD"
r: "{}"

y field target:
default: 0
getter:
q: "READ:DEV:GRPY:PSU:SIG:FSET"
r: "{}"
setter:
q: "SET:DEV:GRPY:PSU:SIG:FSET:{}"
r: "" # response is needed, since the instrument actually responds to sets

y field:
default: 0
getter:
q: "READ:DEV:GRPY:PSU:SIG:FLD"
r: "{}"

z field target:
default: 0
getter:
q: "READ:DEV:GRPZ:PSU:SIG:FSET"
r: "{}"
setter:
q: "SET:DEV:GRPZ:PSU:SIG:FSET:{}"
r: "" # response is needed, since the instrument actually responds to sets

z field:
default: 0
getter:
q: "READ:DEV:GRPZ:PSU:SIG:FLD"
r: "{}"

x ramp status:
default: "HOLD"
getter:
q: "READ:DEV:GRPX:PSU:ACTN"
r: "{}"
setter:
q: "SET:DEV:GRPX:PSU:ACTN:{}"
r: ""

y ramp status:
default: "HOLD"
getter:
q: "READ:DEV:GRPY:PSU:ACTN"
r: "{}"
setter:
q: "SET:DEV:GRPY:PSU:ACTN:{}"
r: ""

z ramp status:
default: "HOLD"
getter:
q: "READ:DEV:GRPZ:PSU:ACTN"
r: "{}"
setter:
q: "SET:DEV:GRPZ:PSU:ACTN:{}"
r: ""


resources:
GPIB::1::INSTR:
device: device 1
5 changes: 5 additions & 0 deletions qcodes/instrument/visa.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,17 @@ def set_address(self, address):
self.visa_handle.close()

if self.visalib:
log.info('Opening PyVISA Resource Manager with visalib:'
' {}'.format(self.visalib))
resource_manager = visa.ResourceManager(self.visalib)
self.visabackend = self.visalib.split('@')[1]
else:
log.info('Opening PyVISA Resource Manager with default'
' backend.')
resource_manager = visa.ResourceManager()
self.visabackend = 'ni'

log.info('Opening PyVISA resource at address: {}'.format(address))
self.visa_handle = resource_manager.open_resource(address)
self._address = address

Expand Down
Loading