LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Question on creating a driver

I am building a driver to work with labview 8.5 for a keithley 181 nanovoltmeter, and I am doing it by basing it off of a driver I found for another multimeter, the HP3456A (a screen shot for [some of] the HP driver is included below and is available here).

I have never tried to create my own driver before, but the HP driver I have is not very complicated, so it's been fairly easy to modify the driver, but since I'm new to this, there are a couple of things that I am not sure about.

 

3456A Block.jpg

 

2 questions.

 

1)  The long string in the upper left "SM104W6STGZ1".  I am unsure what this number refers to.  It's probably something I can look up in the manual, but if I don't know whart the number is for, then I can't go look it up.

 

2) With regards to the 2 multi-line strings attached to the measurement and range controls and the 2 T/F strings attached to the filter control, is the text arbitrary or does it have to do with the machines programming code that I will have to look up in the manual.

0 Kudos
Message 1 of 19
(4,301 Views)

To clarify question 2:  by "the text" I mean what is entered into the string, i.e. FL1 and FL0, R1, R2, R3 etc.  The keithley 181 has a filter button as well, can I just name the true and false strings FL1 and FL0 as well or do I need to look up in the manual the correct way to call those functions?

0 Kudos
Message 2 of 19
(4,297 Views)

 


@LarsUlrich wrote:

I am building a driver to work with labview 8.5 for a keithley 181 nanovoltmeter, and I am doing it by basing it off of a driver I found for another multimeter, the HP3456A (a screen shot for [some of] the HP driver is included below and is available here).

I have never tried to create my own driver before, but the HP driver I have is not very complicated, so it's been fairly easy to modify the driver, but since I'm new to this, there are a couple of things that I am not sure about.

 

3456A Block.jpg

 

2 questions.

 

1)  The long string in the upper left "SM104W6STGZ1".  I am unsure what this number refers to.  It's probably something I can look up in the manual, but if I don't know whart the number is for, then I can't go look it up.

 

2) With regards to the 2 multi-line strings attached to the measurement and range controls and the 2 T/F strings attached to the filter control, is the text arbitrary or does it have to do with the machines programming code that I will have to look up in the manual.


1)  The long string in the upper left "SM104W6STGZ1".  I am unsure what this number refers to.  It's probably something I can look up in the manual, but if I don't know whart the number is for, then I can't go look it up.

 

I would suspect that this is the name or address of the device.

 

2) With regards to the 2 multi-line strings attached to the measurement and range controls and the 2 T/F strings attached to the filter control, is the text arbitrary or does it have to do with the machines programming code that I will have to look up in the manual.

 

The multi line properties take the user input to concatinate a sting to give the correct command to the device.

Tim
GHSP
0 Kudos
Message 3 of 19
(4,295 Views)

That's really one of the worst examples you could have picked to base your driver on. It used the stacked sequence structure, the address is hard coded on the block diagram, and does not use the VISA functions. Have you seen Tools>Instrumentation>Create Instrument Driver Project. There is a template for a DMM. Look at the 34401 driver that comes with LabVIEW. That is how a driver should be written now.

 

Yes, all of those strings are unique to the HP instrument. The comments tell you what the parts are for. See the comment 'SRQ on data available (SM104)' and the others? Don't see why you would need to look those up in the HP manual. You are writing a driver for a Keithley and would need to look up the commands for the measurement function, range, etc.

0 Kudos
Message 4 of 19
(4,293 Views)

Lol, I didn't mean to imply that I would be looking these up in the HP manual, I am writing this for a Keithley so any info I need will obviously come from the Keithley manual, and of course I realize that each device has its own capabilities that the other does not, i.e. the keithley has a high resolution function.  I have altered the driver to reflect this.

 

Anyways, I picked the HP3456A driver to model mine off of because 1) it works (and I know this because I have an HP3456A sitting right next to my keithley) and 2) the driver is simple, and I have been just learning labview so don't want to start with anything too complicated.

 

I don't need the driver to be complicated, and I don't need it to be a commercial product that I can sell, I just want it to work.

 

So back to my questions:

1) For the keithley, I am going to have to write something similar to the "SM104W6..." string, but for the Keithley. I am unsure about how that string is built and what it refers to. (AKA the big comment in bold you are refering to, "SRQ on data etc etc...."  I don't know what that means)

 

and 2)  Just to clarify, the FL1 and FL0 are programming codes that the HP identifies, and I will have to look in the Keithley manual to see what code it understands for its functions, correct?

 

 

0 Kudos
Message 5 of 19
(4,288 Views)

That piece of junk driver for the 3456 is much more complicated than a more modern driver.

 

The SW104 etc is something you may or may not need to implement and understanding it is quite simple. As the comment says, in order to turn on SRQ for data available, you have to send the string 'SM104'. In order to turn on 6 1/2 digits, you have to send the string 'W6STG'. Autozero is the string 'ZI'. Basic instrument functions but the commands are old (non-SCPI) and unique. Command strings for the Keithley are going to be be built on the syntax description in it's manual.

 

And yes, if you have a filter function on the Keithley, you need to look up it's unique command syntax.

 

 

0 Kudos
Message 6 of 19
(4,274 Views)

Fun with old interfaces!  Back in the day they had a hard time getting up to 300 baud on serial interfaces (and the processors wern't too quick either) so they used short mnemonics to keep the interface responsive. 

SM= Set Mark

104= 0b 1000100  or Enable SRQ(0x64) and(bitwise) Data Ready (4)

 

Z(0|1) = autoZero Off|On

 

W6 = Width 6

 

STG =Single TriGger

 

You WILL need the manual


"Should be" isn't "Is" -Jay
0 Kudos
Message 7 of 19
(4,264 Views)

Found it

 

For the Kiethly B[n] is Digits of resolution and P[0|1] turns the filter off or on

 


"Should be" isn't "Is" -Jay
0 Kudos
Message 8 of 19
(4,260 Views)

Awesome, thanks a bunch!

0 Kudos
Message 9 of 19
(4,236 Views)

You can download a LabVIEW Instrument Driver for Keithley model 192 from the NI Instrument Driver Network.  It may not suit all your needs but combined with the 181 manual that Jeff Bohrer found for you, it can be a jumping off point in your development. At the least it will show you how Keithley does their messaging. There are many other drivers there that you can look at for inspiration.

 

There's a model 181driver in the collection as well but it is a LabWindowsCVI and can be converted to LabVIEW. You can try the LabVIEW Instrument Driver Import Wizard. Or, if you have a copy of LabWindows/CVI you can follow the procedure in the tutorial: "Conversion of an Instrument Driver from LabWindows/CVI to LabVIEW." 

 

JohnCS

0 Kudos
Message 10 of 19
(4,211 Views)