Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
fad35d1
Drop support for Python 3.4 (#200)
scasagrande Feb 7, 2019
c081174
Fix issue #197 (#201)
scasagrande Feb 8, 2019
ca5fb15
Improvements to APT (#167)
cgranade Feb 10, 2019
6aa0024
Fix bug with SCPIFunctionGenerator.function, add tests (#202)
scasagrande Feb 11, 2019
13845c9
Fix Agilent 33220a, add tests (#203)
scasagrande Feb 11, 2019
7ccdc13
Function Generator single/multi-channel consistency (#206)
scasagrande Feb 14, 2019
e05dad5
Adding support for the minghe mhs5200 (#150)
CatherineH Feb 14, 2019
b59a45a
Docstring modifications (#207)
scasagrande Feb 15, 2019
215d29a
Merge branch 'master' into develop
scasagrande Feb 19, 2019
84b0a85
Add Fluke 3000 support
francois-drielsma May 31, 2019
e4c22ef
Slight tweak
francois-drielsma Jun 1, 2019
53d5847
More robust measure function for fluke3000
francois-drielsma Jun 28, 2019
56cd49e
Extend fluke3000 timeout
francois-drielsma Jun 28, 2019
b52713e
Much faster temp readouts
francois-drielsma Jul 3, 2019
468d45c
Allow 0 measurements in fluke3000.py
francois-drielsma Jul 6, 2019
2732f2d
Restructured Fluke3000 read out around multiline reads
francois-drielsma Jul 6, 2019
4d7a00e
Added support for Fluke 3000FC wireless multimeter
francois-drielsma Jul 7, 2019
1086125
Made the readout more robusts, implemented flush
francois-drielsma Jul 8, 2019
7db9f54
Bug fix
francois-drielsma Jul 8, 2019
71bb1b9
Added Prologix GPIB controller suppport
francois-drielsma Jul 17, 2019
45d0012
Added Keithley 485 pico-ampmeter support
francois-drielsma Jul 17, 2019
44c9615
Bug fix
francois-drielsma Jul 17, 2019
89df0b3
Added status word parser for Keithley 485
francois-drielsma Jul 17, 2019
d7da2a5
Combined GPIB communicators into one
francois-drielsma Jul 17, 2019
f80ac0e
Corrected unit returned by Keithley 485
francois-drielsma Jul 17, 2019
48b94b7
Attempt to fix build for python 3.7
francois-drielsma Jul 18, 2019
a64d712
Reformated GPIB controller selection as a model selection
francois-drielsma Jul 18, 2019
5b61990
Multiple style fixes
francois-drielsma Jul 18, 2019
7785acf
More style corrections
francois-drielsma Jul 18, 2019
fb0931d
One more bug fix...
francois-drielsma Jul 18, 2019
ac2c810
One more
francois-drielsma Jul 18, 2019
d503f4d
GPIB model now passed as str
francois-drielsma Jul 18, 2019
e4207d2
Bug fix
francois-drielsma Jul 18, 2019
28f0541
Added support for HP E3631A power supply
francois-drielsma Jul 31, 2019
d46d691
Removed print functions inside HPe3631a class
francois-drielsma Jul 31, 2019
da2f679
Style fixes in class HPe3631a
francois-drielsma Jul 31, 2019
6f57ed8
Range use style fix
francois-drielsma Jul 31, 2019
4c7f7fd
Last style fix...
francois-drielsma Jul 31, 2019
4f7523e
Completed support for Keithley 485
francois-drielsma Aug 2, 2019
2b566dc
Style fixes for Keithley 485
francois-drielsma Aug 2, 2019
49c4092
Python 2.7 style corrections for Keithley 485
francois-drielsma Aug 2, 2019
27bea6a
Completed support for Prologix GPIB controllers
francois-drielsma Aug 3, 2019
20bbae8
Fixed and renamed GPIB communicator pytest
francois-drielsma Aug 3, 2019
901926a
Keythley 485 no longer queries when setting properties (GPIB comm fixed)
francois-drielsma Aug 3, 2019
8660adc
Privatized obscure functions of Keithley 485, added get_status() func…
francois-drielsma Aug 3, 2019
1d5f17b
Standardized range and trigger function names of Keithley 485
francois-drielsma Aug 3, 2019
7b038b7
Trigger name change fix
francois-drielsma Aug 3, 2019
59a73bc
Added support for Glassman FR (EJ, ET, EY, FJ) power supplies
francois-drielsma Aug 6, 2019
b4154bb
Style fix
francois-drielsma Aug 6, 2019
656578d
Completed documentation for Keithley 485
francois-drielsma Aug 6, 2019
ed3ae94
Completed documentation for HP E3631A
francois-drielsma Aug 6, 2019
b9abfee
Completed Fluke 3000 FC support
francois-drielsma Aug 9, 2019
b7f5a5c
Fixed ignored variable name
francois-drielsma Aug 9, 2019
1d16735
Added tests for the Keithley 485
francois-drielsma Aug 11, 2019
0013b1e
Style fixes, python 2.7 compatibility
francois-drielsma Aug 11, 2019
35355a3
Stray print function removed
francois-drielsma Aug 11, 2019
9657ffc
Added tests for the Fluke 3000
francois-drielsma Aug 11, 2019
8b156e7
Indentation style fix in Fluke 3000 tests
francois-drielsma Aug 11, 2019
c4ffe33
Convert Fluke 3000 unsettable attributed to read-only
francois-drielsma Aug 12, 2019
7d80db6
Removed superfluous tests for Fluke 3000
francois-drielsma Aug 12, 2019
c074946
Added tests for the Glassman FR-series power supplies
francois-drielsma Aug 12, 2019
4395bb2
Explicit builtin round function import
francois-drielsma Aug 12, 2019
24c8e34
Greatly simplified implementation of the HP E3631A power supply
francois-drielsma Aug 13, 2019
64a9390
Added tests for the HP E3631A power supply
francois-drielsma Aug 13, 2019
add3f15
Added generic SCPI commands to the HP E3631A power supply
francois-drielsma Aug 16, 2019
d690cb3
Fix voltage property of HP E3631A to handle negative channel
francois-drielsma Aug 23, 2019
f25b7f3
Added initial support for Keithley 6517b electrometer
francois-drielsma Nov 26, 2019
998d312
Style fixes for Keithley 6517b
francois-drielsma Nov 27, 2019
2a0a39a
Statement ordering fix in GlassmanFR driver
francois-drielsma Nov 27, 2019
3d904e5
Attempt at fixing Travis issue
francois-drielsma Nov 27, 2019
870b62d
Attempt at fixing Travis issue 2
francois-drielsma Nov 27, 2019
30e9ecd
Attempt at fixing Travis issue 3
francois-drielsma Nov 27, 2019
bcfc8d5
Remove device-side timeout on GlassmanFR by default
francois-drielsma Dec 3, 2019
c813956
Fixed voltage/current setters of Glassman FR power supply
francois-drielsma Feb 22, 2020
7cbb163
Added dead time to standalone sendcmd of HPE3631A
francois-drielsma Feb 26, 2020
b91d08a
Added support for the Keithley 6485 picoammeter
francois-drielsma Sep 9, 2020
df26fc0
Set Keithley 6485 in the right mode in __init__
francois-drielsma Sep 10, 2020
2ca8792
Fixed typo
francois-drielsma Apr 26, 2021
8ad3cdf
Fixed Glassman FR tests
francois-drielsma Dec 2, 2021
411799e
Fixed Keithley 6517b tests
francois-drielsma Dec 2, 2021
fd5bf33
Fixed bugs in Keithley 6485, added tests
francois-drielsma Dec 3, 2021
ec0ed2e
Merged with Galvant's master, resolved conflicts
francois-drielsma Dec 3, 2021
06bbc05
pylint fixes
francois-drielsma Dec 3, 2021
b28df73
Solved one more pylint error, removed unit member of Keithley 6485
francois-drielsma Dec 3, 2021
d9d6af3
Merge with origin's develop
francois-drielsma Oct 3, 2024
fa5a2e9
Removed dev-requirements.txt
francois-drielsma Oct 3, 2024
ef88084
Merge with main branch of origin instead of develop
francois-drielsma Oct 3, 2024
f4655f0
Harmonized code with current main
francois-drielsma Oct 4, 2024
7d5aa0d
Couple more typo fixes
francois-drielsma Oct 4, 2024
491c043
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 4, 2024
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
11 changes: 8 additions & 3 deletions src/instruments/glassman/glassmanfr.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
# hpe3631a.py: Driver for the Glassman FR Series Power Supplies
# glassmanfr.py: Driver for the Glassman FR Series Power Supplies
#
# © 2019 Francois Drielsma (francois.drielsma@gmail.com).
#
Expand Down Expand Up @@ -89,6 +89,7 @@ def __init__(self, filelike):
self._device_timeout = False
self._voltage = 0.0 * u.volt
self._current = 0.0 * u.amp
self.device_timeout = False

# ENUMS ##

Expand Down Expand Up @@ -159,7 +160,9 @@ def voltage(self):

@voltage.setter
def voltage(self, newval):
self.set_status(voltage=assume_units(newval, u.volt))
voltage = assume_units(newval, u.volt)
self.set_status(voltage=voltage)
self._voltage = voltage

@property
def current(self):
Expand All @@ -173,7 +176,9 @@ def current(self):

@current.setter
def current(self, newval):
self.set_status(current=assume_units(newval, u.amp))
current = assume_units(newval, u.amp)
self.set_status(current=current)
self._current = current

@property
def voltage_sense(self):
Expand Down
2 changes: 2 additions & 0 deletions src/instruments/keithley/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,6 @@
from .keithley580 import Keithley580
from .keithley2182 import Keithley2182
from .keithley6220 import Keithley6220
from .keithley6485 import Keithley6485
from .keithley6514 import Keithley6514
from .keithley6517b import Keithley6517b
158 changes: 158 additions & 0 deletions src/instruments/keithley/keithley6485.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
#!/usr/bin/env python
#
# keithley6485.py: Driver for the Keithley 6485 picoammeter
#
# © 2019 Francois Drielsma (francois.drielsma@gmail.com).
#
# This file is a part of the InstrumentKit project.
# Licensed under the AGPL version 3.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
"""
Driver for the Keithley 6485 picoammeter.

Originally contributed and copyright held by Francois Drielsma
(francois.drielsma@gmail.com).

An unrestricted license has been provided to the maintainers of the Instrument
Kit project.
"""

# IMPORTS #####################################################################

from instruments.generic_scpi import SCPIInstrument
from instruments.units import ureg as u
from instruments.util_fns import bool_property

# CLASSES #####################################################################


class Keithley6485(SCPIInstrument):
"""
The `Keithley 6485` is an electrometer capable of doing sensitive current,
charge, voltage and resistance measurements.

WARNING: Must set the terminator to `LF` on the define for this to work.

Example usage:

>>> import instruments as ik
>>> import instruments.units as u
>>> dmm = ik.keithley.Keithley6485.open_serial('/dev/ttyUSB0', baud=9600)
>>> dmm.measure()
<Quantity(0.000123, 'ampere')>
"""

def __init__(self, filelike):
"""
Resets device to be read, disables zero check.
"""
super().__init__(filelike)
self.reset()
self.zero_check = False

# PROPERTIES ##

zero_check = bool_property(
"SYST:ZCH",
inst_true="ON",
inst_false="OFF",
doc="""
Gets/sets the zero checking status of the Keithley 6485.
""",
)

zero_correct = bool_property(
"SYST:ZCOR",
inst_true="ON",
inst_false="OFF",
doc="""
Gets/sets the zero correcting status of the Keithley 6485.
""",
)

@property
def auto_range(self):
"""
Gets/sets the auto range setting

:type: `bool`
"""
# pylint: disable=no-member
out = self.query("RANG:AUTO?")
return out == "1"

@auto_range.setter
def auto_range(self, newval):
# pylint: disable=no-member
self.sendcmd("RANG:AUTO {}".format("1" if newval else "0"))

@property
def input_range(self):
"""
Gets/sets the upper limit of the current range.

:type: `~pint.Quantity`
"""
# pylint: disable=no-member
out = self.query("RANG?")
return float(out) * u.amp

@input_range.setter
def input_range(self, newval):
# pylint: disable=no-member
val = newval.to(u.amp).magnitude
if val not in self._valid_range():
raise ValueError("Unexpected range limit for currently selected mode.")
self.sendcmd(f"RANG {val:e}")

# METHODS ##

def fetch(self):
"""
Request the latest post-processed readings using the current mode.
(So does not issue a trigger)
Returns a tuple of the form (reading, timestamp, trigger_count)
"""
return self._parse_measurement(self.query("FETC?"))

def read_measurements(self):
"""
Trigger and acquire readings using the current mode.
Returns a tuple of the form (reading, timestamp, trigger_count)
"""
return self._parse_measurement(self.query("READ?"))

def measure(self):
"""
Trigger and acquire readings.
Returns the measurement reading only.
"""
return self.read_measurements()[0]

# PRIVATE METHODS ##

@staticmethod
def _valid_range():
return (2e-9, 20e-9, 200e-9, 2e-6, 20e-6, 200e-6, 2e-3, 20e-3)

@staticmethod
def _parse_measurement(ascii):
# Split the string in three comma-separated parts (value, time, number of triggers)
vals = ascii.split(",")
reading = float(vals[0][:-1]) * u.amp
timestamp = float(vals[1]) * u.second
trigger_count = int(float(vals[2]))
return reading, timestamp, trigger_count
Loading