07-22-2010 08:00 PM
Hi,
I am trying to control a Keithley 2602 Sourcemeter using LabVIEW v.8.2, however I am having trouble getting them to communicate. I am fairly new at LabVIEW and have not found the user manuals to be of much help since they specify that the process for this step is different depending on the equipment you are trying to connect to. I have downloaded the Keithley drivers from here: http://www.keithley.com/support/data?asset=51950 as per the advice on previous forum posts.
Then I unzipped the file and copied its contents into C:\Program Files\National Instruments\LabVIEW 8.0\instr.lib\
(I assume this is how you install the drivers, however is there more to it?.. there are no instructions with the driver)
Next I connected the sourcemeter to my computer using an RS-232 cable and turned it on. Then I opened NI MAX and went to Devices and Interfaces -> Ports (Serial & Parallel) -> COM1. The device status message here says that the "device is working properly".
Then I opened up one of the example files (KE26XX Config Source & Measure) included with the drivers to see if I can run it successfully. When I select COM1 and try to run it, i get the error "VISA Open in Keithley 2600 Series/lvlib:Initialize.vs->KE26XX Config Source & Measure.vi" and an error code -1073807246 (which I looked up to be VI_ERROR_RSRC_BUSY The resource is valid, but VISA cannot currently access it.)
The user manual also mentions that configure the VISA device in NI MAX and refer to assigning aliases, however I do not know where or how to do this (maybe in the VISA test panel?). Do I need to somehow configure the sourcemeter before I can use it in a LabVIEW program?
Ultimatly I would like to use Labview to control the keithley sourcemeter and also another device (a multiplexer) to switch between multiple devices, however for now I would be very greatful for any advice on how to get the Keithley 2602 sourcemeter to communicate with LabVIEW and successfully run one of their test programs. Also, any specific details or steps would be of great help as I am new to this program and am not too familiar with everything.
Please let me know if I am missing any crucial information and thanks for your help!
Jason
07-22-2010 08:26 PM
Since the os prevents more than a single process to connect to a serial port, make sure you don't have any other programs open. That includes MAX.
07-22-2010 09:51 PM
Thanks for your reply, I closed MAX and tried to run the example again, and got a new error code:
-1073807339, which corresponds to: VI_Error_TMO, Timeout expired before operation completed.
Is there normally anything else I need to do to get them to communicate with each other?
Jason
07-22-2010 10:23 PM
Verify that the com settings (baud rate, parity, etc.) match at both ends and that you have the correct cable type (null-modem or straight-through).
07-24-2010 12:30 AM
Hi again,
I have checked both of the above mentioned and the com settings all match (device manager settings, the settings set in the keithley instrument, and the settings in MAX). Also, the cable is straight-through.
Thanks again for your suggestions
07-24-2010 12:34 PM
The device manager and MAX settings are actually irrelevant since the initialize function sets up the pc.
The function also sets the termination character so that is something else you could verify. Have you tried a terminal emulation program such as Hyperterminal, Procomm, or Tera Term?
07-24-2010 09:15 PM
Hi, I updated the firmware and tried running an example program not provided by Keithley and it was able to communicate. I think that the problem is that the initialization VI for the Keithley examples always seems reset the settings back to 7 bits whenever I run the program, and therefore I would always get an error since I was using 8 bits. I mistook this for the instruments failing to communicate. After confirming that this, I changed all the settings to 7 bit to match the initialization VI and everything works great now.
Thanks for all your help!
Jason
07-24-2010 09:42 PM
The number of data bits can be set on the initialize function and as I mentioned, you have to ignore what MAX is set to. A quick glance at the front panel would have shown the default VI settings. In the long run, it does not matter whether you change the VI or the instrument.
08-28-2013 09:43 PM
Hi I m new to Labview as well, may I ask whats 7and 8 bits you are talking about? how to choose the right bit?
08-28-2013 10:21 PM