Keithley 2600 driver, Handle invalid commands better
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 459
- Forks
- 359
- Avg merge
- 3d 6h
- Merged PRs (30d)
- 73
Description
#1301 Fixes a number of commands that were passed incorrectly to the instrument, but it does also highlight a different problem with the driver. If a parameter is set to an out of bounds value an error message is displayed but this is not reflected as a return code.
This could be resolved by reading the error count before and after a write and then reading any error message back. E.g replace write with something along the lines of.
def write_with_errorhandling(cmd):
n_error_before = self.ask('errorqueue.count')
self.write('{cmd}')
n_error_after = self.ask('errorqueue.count')
if n_error_after > n_error_before:
for i in range(n_error_after):
error = self.ask('errorqueue.next()')
log.warning(error)
raise RuntimeError(error)
But that would probably be significantly slower.
One would need to benchmark this to see if that is an issue. It might be possible to combine the multiple write commands in one for better performance
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Keithley 2600 driver and its write path. Compare the instrument error count before and after writes, read any reported error messages, and benchmark the approach against the current behavior. Done means invalid parameter commands produce an appropriate return or raised error without unacceptable performance impact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100