Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Keithley Model 2400 example vi's don't run? Error -1073807346

Solved!
Go to solution

I'm new to LabView, and have a fresh install of LabView 2010.  I have done the various tutorials and have been reading on LabView (I am not new to GPIB programming, just new to labview).  I've found the instrument drivers via the NI Instrument Driver Finder in the Help menu, and when I select the Model 24xx  in the Instrument Driver Finder, it shows me the "Start Using Instrument Driver" window.  When I double-click one of the listed examples, say, "Keithley 24xx Read Single.vi", for example, it loads the front panel and block diagram from the .vi.  I am assuming as they are *example* files, I don't need to do any other pre-configuration in the code before running it; however, when I press "Run" or "Run Continuously" the same error message comes up for every Example .vi that I have.

 

The error message is the following:

 

Error -1073807346 occurred at VISA Open in Keithley 24XX.lvlib:Initialize.vi->Keithley 24XX Read Single.vi
Possible reason(s):
VISA:  (Hex 0xBFFF000E) The given session or object reference is invalid.

 

What exactly is going wrong?  I have VISA 5.0.3 installed, it came with either the drivers for my USB->GPIB cable or with the LabView installation.  The example .vi files are all located in "C:\Program Files\National Instruments\LabVIEW 2010\instr.lib\Keithley 24XX\Examples".

 

Kind of hard for me to follow the examples when I can't run them.  Thanks in advance for anyone's input.

0 Kudos
Message 1 of 9
(4,573 Views)

Did you change the VISA Resource Name control to match the actual resource that the Keithley has in your system? Even before that, did you do a scan for instruments in MAX and was the Keithley found? Take note of the address and click on the pull-down of the VISA Resource Name control. It will list all available resources. A GPIB resource will have the format of GPIB0::n::INSTR where n is the address.

0 Kudos
Message 2 of 9
(4,572 Views)

The Model 2400 certainly is found in MAX, I can read/write with it.  I can use the 'Read and Display' framework in LabView to communicate with the device, to read/plot data, etc. 

 

Am I misunderstanding, or did you mean to click on the VISA Resource Name control pulldown *after* pressing "Run" to execute the .vi?  The problem is that I can't even *run* the Keithley example to do things like clicking the pull-down of the VISA resource name control; I can see/manipulate it in the Front Panel and the Block Diagram, but I can't *get* to runtime to tell the program where the GPIB resource is.  When I press "Run" or "Run Continuously" without having modified anything in the front panel or block diagram, the error window is generated immediately.

0 Kudos
Message 3 of 9
(4,569 Views)
Solution
Accepted by pr59

Hi

Don't ever run continuously except when you want a vi to start and stop very fast over and over again.

Select the visa resource BEFORE you press the run arrow.

greetings from the Netherlands
Message 4 of 9
(4,562 Views)

Didn't realize that one could type in the drop-down box before runtime.  Thanks

0 Kudos
Message 5 of 9
(4,560 Views)

Your thank you is not the solution. You can change the marked solution by clicking on 'Options'.

0 Kudos
Message 6 of 9
(4,556 Views)

?  No one had suggested that I could type in the dropdown box before runtime.  To me, "Select the visa resource BEFORE you press the run arrow." implied that it acted as a dropdown box, not as a text field that I could edit.  I feel that my response contained the solution to the error message I got, and as such, I indicated it was the solution.

0 Kudos
Message 7 of 9
(4,538 Views)

Why would you type anything into the box? The whole point of the dropdown is to allow you to select from valid resources and not risk mistyping? It DOES act like a dropdown box before clicking on the run button so I still don't see where your solution is valid.

 

In case you skipped the LabVIEW tutorial, you can enter anything you want into any control before clicking the run button.

0 Kudos
Message 8 of 9
(4,536 Views)

Well, typing in the GPIB value worked for me yesterday, so that is a valid solution.  Now that I'm at the labview PC again, dropdown with the "operate value" instead of the "position/size/select" does indeed list quantities before runtime.  However yesterday I'm fairly sure that with Automatic Tool Selection engaged, it kept giving me the "position/size/select" cursor, not the "operate value" cursor; not sure why it was doing this though.  No, I did not skip the labview tutorials, and no, I'm not new to GPIB, and thank you for the additional comments.

0 Kudos
Message 9 of 9
(4,532 Views)