mabuchilab / Instrumental

Python-based instrumentation library from the Mabuchi Lab.
http://instrumental-lib.readthedocs.org/
GNU General Public License v3.0
117 stars 77 forks source link

Update Agilent function generators driver and correct Rigol detection #121

Closed sylvainpelissier closed 3 years ago

sylvainpelissier commented 3 years ago

The previous regexp for Rigol will detect any strings started with USB as a Rigol instrument. A common class for Agilent function generators was created which gather commands for 81110A, 81150A, 81160A, ...

natezb commented 3 years ago

Thanks! After merging, I'm gonna make one small change to the rigol code to make it more pythonic.

natezb commented 3 years ago

Is the \d in your query string meant to be the regex escape for a digit? There are two problems with this:

  1. '\d' in an ordinary Python string is the same as 'd', i.e. just the letter d and not a special escape.
  2. I don't believe VISA supports the \d escape.

I just pushed changes that replace this with e.g. USB[0-9]*::; let me know if there's a problem with this.