Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Trouble programming Keithley 2400 to source constant current for a time

Hello,

I have been working on a code to program my Keithley 2400 sourcemeter to source a constant current for a given period of time and measure the voltage, output into a waveform chart (which i understand i can easily extract excel files from). I am brand new to LabView and Keithley, but have been reading user manuals and these forums for the past 2 weeks to try and figure it out. So far, I have written about 4 different .vi's and none of them are working properly. I attach the one that I tried to incorporate the timing into. 

When I try to run the program, I am getting the ERR (30) at pretty much every point after entering the while loop. Is there some reset after entering the loop that undoes the previous naming of my GPIB device on the front panel? I'm running out of time to try and get this program working, so that is why I'm posting here to see if anyone can offer me some help.

Additionally, even if I'm not getting this error, I have no idea if the program is going to do what I want it to do, is there someone who can tell me at least that much?

By the way, I AM able to successfully communicate with the Keithley through MAX.

Thank you in advance for any and all help!

0 Kudos
Message 1 of 2
(4,422 Views)

Hi bpspain,

 

The error code 30 pertains to how the GPIB address is input to the latter VIs that use the GPIB address to perform a function. You code is missing the Initialize.vi, Read (Multiple Points).vi, and the Close.vi, but I think we still have some information to go off of.

 

In your program you are using the GPIB Write.vi but you are using the VISA Resource Name control. Based upon the example Simple GPIB.vi the Address String input on the GPIB Write.vi should be a string.

 

If you would prefer to use the VISA API, which is perfectly valid as well, you will need to use the VISA  Resource Name control along with the VISA Write.vi instead of the GPIB Write.vi.

 

See if one of the shipping examples will communicate to your device without error. Here are the location of the GPIB examples: LabVIEW Help >> Find Examples.. >> Hardware Input and Output >> GPIB.

Sam Burhans
Senior Product Manager
National Instruments
0 Kudos
Message 2 of 2
(4,399 Views)