From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get keithley 2400 work?

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.

0 Kudos
Message 1 of 10
(6,392 Views)

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.

Now Using LabVIEW 2019SP1 and TestStand 2019
Message 2 of 10
(6,389 Views)

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,

Ben

National Instruments
Certified LabVIEW Associate Developer
Certified TestStand Developer
Message 3 of 10
(6,368 Views)

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.

 

0 Kudos
Message 4 of 10
(6,297 Views)

Hi

 

did you try a search for instruments in max with a selected gpib interface.

greetings from the Netherlands
0 Kudos
Message 5 of 10
(6,293 Views)

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.

Message Edited by GovBob on 01-13-2009 12:25 PM
Now Using LabVIEW 2019SP1 and TestStand 2019
0 Kudos
Message 6 of 10
(6,292 Views)

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.

 

 

 

 

0 Kudos
Message 7 of 10
(6,282 Views)

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.

0 Kudos
Message 8 of 10
(6,274 Views)

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?

Now Using LabVIEW 2019SP1 and TestStand 2019
0 Kudos
Message 9 of 10
(6,272 Views)

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.

 

0 Kudos
Message 10 of 10
(6,249 Views)