From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Updated Keithley 196 DMM Driver

Hi all,

 

Like many grad students before me, I am stuck using legacy equipment in the lab.  Specifically for us a handful of Keithley 196 Digital Multimeters.  They still work great and there's no need to buy new more modern equivalents.  However, they haven't really been supported in a while, and the LabVIEW drivers (while available) don't look like they've been updated since 1993.  (Is that really 20 years ago now?  Yikes!)  In an effort to learn more about LabVIEW and also to learn to use VISA instead of GPIB calls I've written an updated driver using VISA calls based on the official Keithley one found here: http://sine.ni.com/apps/utf8/niid_web_display.model_page?p_model_id=953.

 

It also adds some functionality to the driver originally excluded.  I'm not sure it'll be useful for anyone but me, but I thought I'd post it here just in case.  I'd also welcome any constructive criticism, hints, tips, etc, as this is the first time I've written an instrument control driver.

Message 1 of 4
(4,078 Views)

Have you tested this driver?  All of the instruments I have used in the past want some time of termination for a command, usually a semicolon.  But you have all of the commands smashed up together.  If the instrument is fine with that, that's fine.  I just find it weird.

 

And you should look into the Format Into String function.  You can make your code a lot easier to read with that guy instead of constantly concatenating strings together.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 4
(4,072 Views)

Using Ext representation seems silly and when you convert the filter from ext to an integer, even more so. Doesn't affect the operation probably, though.

0 Kudos
Message 3 of 4
(4,070 Views)

Dennis,

Using ext for the filter was just copy paste laziness on my part.  Will definitely take a closer look at the data types I'm throwing around.

 

Crossrulz,

The concatenating strings is what the Keithley guys used in their original driver, I just followed suit. I'll definitely look into using format into string and try to make the code a little cleaner.  I have tested this driver extensively and everything works so far!  Smiley Happy  Not to say there aren't issues that might pop up later.  The 196 is a little odd in that all you need to give device specific commands is a string all smashed up together follwed by X.  X then executes the command.  No other characters necessary as far as I know.  For anyone interested the manual can be found here: http://www.testitnow.co.uk/media/files/test_equipment_manuals/Keithley/Keithley%20196%20(Rev%20D)%20...

 

Thanks for the critiques guys!

0 Kudos
Message 4 of 4
(4,059 Views)