LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

keithley 6514 and 6220 help!

hey guys help a newbie out,
 
ive got a keithley 6220 current source and a 6514 electrometer.  Im trying to get a simple I-V plot. I am having the hardest time trying to program labview.  Ive downloaded the drivers for the 6514, im just programming the 6514 now and triggering the 6220 manually. I want labview to basically be able to read the voltage values and plot it vs. time. 
 
labview can communicate with the 6514 as the REM indicator is on.  I keep getting a general I/O error, and i cant figure out what it is. 
 
Help!!
 
 
0 Kudos
Message 1 of 18
(6,068 Views)
You're getting this error from the instrument or from the LabVIEW program you wrote? If it's from LabVIEW, was is the exact error code that is being reported and which VI is reporting the error? Can you post an image (no bmp please) or the program itself?
0 Kudos
Message 2 of 18
(6,063 Views)
sorry about the delay, but here is the vi i have been working on...
 
im new at this so dont laugh : )
 
i havent included control of the 6220 yet and I want to add that in as well.
Message 3 of 18
(6,045 Views)
Well, it would nice if you posted the actual error code since I can't run the VI because I don't have the instrument. One thing you should do is wire a single GPIB address control to all of the subVIs. You have two different controls wired to two of the functions and nothing wired to the others. Next, have you actually verified that the instrument is set to address 14? If you open MAX (Measurement & Automation Explorer) expand the Device & Interfaces listing to display the GPIB board in your system. Then, right click on the board listing and select Scan for Instruments. If all you have connected is the 6514 and 6220, these are the only two that will show up in the scan. The scan may or may not list which instrument is which. The scan does an *IDN? command to get the indentification info from the instrument but I don't know if these instruments support that command. In any case, you should only two different GPIB addresses to choose between.
0 Kudos
Message 4 of 18
(6,037 Views)
I looked at your VI (and downloaded the Keithley drivers). I do not have the instruments so I cannot actually test it. One thing is immediately obvious: All the Keithley VIs require a GPIB address. I cleaned up your VI a bit and wired one Address control to all of the VIs which needed it. I also added an error out indicator so that you can see what error is occurring and where.

My experience with Keithley GPIB Vis has been that they are useful in that they contain the code for most commands but their style and performance leave a lot to be desired. My guess is that they were wrtten about ten years ago and the only updates since then have been to recompile with newer versions. I am rewriting all the VIs I need for other Keithley instruments.

I do not like inputs on the right and outputs on the left. If I have more than 4 (or maybe 5-6) inputs or outputs on a single VI, I try to rethink what I am doing and either cluster some of them or break things up.

Another thing to try is to use the simple LabVIEW <-> GPIB.vi in the examples folder to make sure you can communicate with the instrument. Start out by doing an ID query or status and see if you get back the answer specified in the manual. Once you can communicate, then look at the first driver VI which produces an error and see if you can send the commands from the LV <> GPIB manually until you locate and eliminate the problems. GPIB is usually cleaner than RS232, but it can still take quite a bit of detective work and patience to get everything working the way you want it.

Lynn
0 Kudos
Message 5 of 18
(6,034 Views)
thanks for the help,
 
i was able to communicate with the instrument and have verified that it is on gpib address 14 through MAX.  I will take a look at the cleaned up vi.
 
As for the error code, it just an generic code, just saying that there is a generic i/o error.
 
At any rate i will try the new code and see what happens.
 
thanks all!
 
0 Kudos
Message 6 of 18
(6,027 Views)
I tested the vi that you had cleaned up and it works, thank you! Im doing a current sweep from 0mA to .5mA and stepping by .02mA, how would I modifiy that program to read all the values? right now it just gives the first value and the program stops.... would i do a loop?
 
thanks again!
0 Kudos
Message 7 of 18
(6,018 Views)
Yes,

You need a loop. Do all the configuration and setup outside the loop. Inside the loop write the value of the excitation, wait long enough for the instruments to respond and the system to settle (probably 100s of ms), and then read the response. Loop until done or until an error or until stopped by the user. After exiting the loop, set the excitation to a safe value (probably zero) and do any other end of run housekeeping before ending the program.

A state machine architecture is an excellent way to handle test like this.

Lynn
0 Kudos
Message 8 of 18
(6,015 Views)
so i tried it out and made a loop, but before it even gets to the loop it passes an error 6, "GPIB Write in Keithley 6514 Voltage Config.vi" not really sure what it is.... i went to the block diagram and highlighted execution, after all the vi's receive their settings, the voltage config will pass the error once i start the trigger on the current source.... what might be causing this? i cant think of anything...especially if it worked for just one reading...
0 Kudos
Message 9 of 18
(6,012 Views)
GPIB error 6 is a timeout error. You may be trying to do things too quickly. The Context Help for the Block read VI mentions needing a long timeout setting. Try allowing several seconds. If the error occurs on the first write, then the instrument is probably not responding. Check to make sure it is in the remote mode. Some instruments go to remote mode automatically when they receive a command on the GPIB line; others need to be manually placed in remote mode.

Work with little pieces of the program at a time. Use the probe and extra indicators to monitor what is going on. Try writing little programs that test each piece. When you get one part working, add another part. It is supposed to be easy, but getting all the instruments to talk to each other and to the computer often takes patience and some detective work. I Probably will not be able to help much more because you need to be working with the actual instruments, which I do not have.

Lynn
0 Kudos
Message 10 of 18
(6,004 Views)