Re: OT: I/V curve tracing made easy with Python and PyVISA

Harvey White
 

On 5/17/2019 11:48 AM, magnustoelle via Groups.Io wrote:
Good Day,

thank you for your kind comments, Gentlemen. And thank you for that weblink and the German figure of speech, Albert! :-)

The trouble is that I am looking at my Keithley 230 programmable voltage source and the Keithley type 195 DMM (with its 100pA resolution)  at the shelves right behind my back right now. Both are equipped with GPIB, but I have never done much with either device yet - and they keep staring at me.
Looking at this from a programming standpoint, you have (generally) measuring equipment and stimulus equipment.  Changing the any of the above that you don't have support for is a matter of looking at what you've told device A (which you have) what to do.  You don't want to know how you told it to do that, that's possibly specific to the instrument (depending on age).  Then you need to look at what you want device B to do.  You compare ranges and functions, and assuming you can live with what device "B" does....

You replace the specific instructions of device A with the specific instructions of device B.

For maximum utility, you devise a switch of some sort (programming switch, very much depends on the language how you do it), so that given choice 1, you produce instructions for device A, and for choice 2, you produce instructions for device B.

In C, C++, this can be done with #define, and #ifdef statements. In basic (haven't used it for years.... likely an "on...... value" statement.  For pascal, you use the case statement unless your version of pascal has the equivalent of #define.

The difference between #define related stuff and case/switch/on stuff is that the former contains only the code you want, and cannot do anything else unless you recompile it.  It is, however, smaller in size.

The latter has all the options, and makes the choice on the fly. You have unused code (for the nonce) , but you're ultimately more versatile at the cost of a bigger program.

Harvey



In combination with the FLUKE 8840A DMM, they might turn into a much better curve tracer setup than the mentioned Grundig Digimess PN300 alone. More to come!

Tot ziens,

Magnus

[..]
A basic introduction corresponding to what Magnus does in his script is
here for example:

https://www.edn.com/design/test-and-measurement/4441692/How-to-automate-measurements-with-Python
I tried Python successfully for command communication (both serial and
GPIB) with my CSA803 but only to verify that it is possible.
(Magnus, I guess "a lot of water has flown through the river Rhein" while
you composed that Python script ;-)

Albert





Join TekScopes@groups.io to automatically receive all group messages.