01-07-2009 05:13 PM
Hi, folks:
I am new here and not familiar with labview.
My professor just gave me a task that i need to connect KEITHLEY 2400 via a PCI GPIB and read some data from the machine.
My question is how can I hook it up? I tried to use input->instrument I/O assistant->GPIB. and i am required to type some query in a command line. can somebody tell me what language it is?
Or, I did totally wrong with it. What should i do?
thank you.
01-07-2009 05:55 PM
I suggest that you open up LabVIEW and see if you have the driver for the Keithley on the computer. Open up a blank new vi. Go to the block diagram. Right click on the block diagram Programming>>Instrument I/O and look for the driver. If not you can download from http://sine.ni.com/idnetwork/main/p/sn/n25:IK/sb/navsRel?q=KEITHLEY+2400&x=11&y=16
You did not mention which version of LabVIEW you are using and the manufacturor of the GPIB card you are using. If it is a NI card open up Measurement and Automation Explorer (MAX) and see if it lists your card. Click on the card and turn on the Keithley. Click on search for instruments and if your Keithley shows up you have established communications. Then open LabVIEW and try the driver (might be an example in the driver). Make sure you enter the correct address for the instrument.
01-08-2009 10:00 AM
LichKing,
As GovBob suggested, first make sure that your instrument is recognized using Measurement and Automation Explorer. I've linked below a tutorial that describes further the steps that GovBob listed.
GPIB Instrument Control Tutorial
Next, install the instrument driver from ni.com/idnet if you haven't already. Here is a tutorial that describes what an instrument driver is (not a hardware driver) and how to program with one with LabVIEW.
How to Use an Instrument Driver in LabVIEW Tutorial
I hope this helps you get off and running on your application.
Regards,
01-13-2009 12:01 PM
Thanks to GovBob and Burban.
I just came back and followed your instructions this morning.
The edition of our LabView is 8.0. The GPIB is NI's, I think.
I tried to run the GPIB example comes with the LabView, each time when I use "1" as address, it will pop up a message with following words:
LabView: Internal Error, Wrong Memory Zone Accessed
NI-488: GPIB Controler not Addressed Correctly
Or, if I choose other numbers as the address, like 0,2, and etc. It will say:
LabView: Generic File I/O Error;
NI-488: I/O Operation Aborted.
I tried to biuild a simple circuit, just an Address String, a Read, and a Read Indicator. I highlighed "Highlight Execution" and "Retain Wire Value" button, and could see the address value which I typed in. But there is no value came out.
I replaced the Read with Initialization, Status, and the result are the same: there is no positive reply.
Could anyone help me?
Thank you again.
01-13-2009 12:12 PM
01-13-2009 12:17 PM - edited 01-13-2009 12:25 PM
As Albert said open MAX. On the left hand side select Devices and Interfaces. Does it show a GPIB card? If so select it and then press the scan for instruments button. Make sure the Keithley is on when you scan.
The instrument should show up if everything works correctly. On the left side select the instrument. This will show you the correct address to use.
Open LabVIEW. Select the Init and Close functions from the kiethley driver and wire those togather to begin with. Right click the Init address and select create control. This should give you the choice of the correct address to use. Wire the error out. run the vi.
01-13-2009 01:55 PM
Thanks again to GovBob, and new friend Albert.
I open MAX and find:
GPIB interface number: 0
Instrument0: Primary Address= 24
I tried to input 24 in the LabView Example official example, it still say:
LabView:Generic File I/O Error;
NI-488: I/O Operation Aborted.
01-13-2009 02:12 PM
There is no such VI called 'Example official example' so you are going to have to be a little specific on what you did and what code you are trying to run. It would also help if you attached the program you wrote but first you should try using MAX to send some commands to the instrument. Just write click on the instrument in MAX and select to communicate with it. If the instrument supports it, the default command (*IDN?) on the query tab should work.
If that works, then you should download the driver and use that.
01-13-2009 02:14 PM
Sorry but I do not have that instrument nor do I have the example you are using. Since the instrument is recognized in MAX you can communicate with it. When you said you put "24" in the control do you mean exactly that? The format should be more like GPIB::24::Instr for this to work correctly. If you look at that front panel control it should have a drop down arrow where you can select the proper address.
The error you reported Is this in a popup box?
01-13-2009 10:06 PM
Thanks to all your help my friends.
I think i have solved the problems I met. Though I don;t the reason, I can use LabView with 2400.
Anyway, I should say thank you for your help.
Have a good night 😛
PS: This is my first time to use this kind of software, I learned some from this. That is enough for me.