11-10-2011 01:43 PM
I am trying to use LabView 2010 to control a Keithley 2400 Sourcemeter on an RS-232 Interface. I want to configure a measurement and take a reading (e.g. plot voltage vs. time)
I took an example code from the library "Keithley read single", however error 1073807346 pops out from the "Initialize" box. THen i looked into "Initialize. vi" and found there is an error from VISA read (timeout error ?). I have attached both screenshots that shows the errors. Can anyone tell me how to solve the problem? By the way, i am very new to labview, could someone suggest a solution that's not too "advanced"? THanks alot.
Solved! Go to Solution.
11-10-2011 02:56 PM
Hi Michigan,
Thanks for joining the forums!
- Do you have any other programs which may be using that COM port?
If you do then that could cause this error. One thing to try is to query the device (from MAX or LabVIEW) with a simple command like *IDN? - if we cannot get a response from this then there could be an issue with your serial port. Although try sending the command for now, and then we'll work from there.
11-10-2011 03:28 PM
A few possible errors:
1) the serial cable is wrong, you need "straight through"connection pin 1..1, pin 2..2, pin 3..3 etc.
2) the buadrate is not the same on pc and keithley (or another serial line parameter that I would like to see on the frontpanel of the initialize)
3) the keithley is still configured for GPIB
so try these first mayb by typing *IDN? in hyperterminal and see what coems back
or directly in MAX on the serial port device.
11-11-2011 09:20 AM
Hi Pete,
Thanks for the input. i opened MAX and selected COM1 which i am currently using as the interface channel. and then i clicked opened VISA test panel, in viWrite under Basic I/O, i typed *IDN? and then press execute, Keithley immediately turns to REM. and the return status is x0. But is this the right way to query the device? and i don't think i have other program using that port.
i am just starting to learn labview, please advise what i should do next. THanks.
11-11-2011 09:29 AM
Hi Albert,
Thanks for you replies. How can i check this is a straight through cable? i think the the baudrate as well as other parameters are the same in pc and keithley. Also, the keithley is configured for RS232 mode. I tried query the device in MAX and in my response to Pete, i have detailed the procedures how i do it. I am just not sure if i am doing it right and what i am supposed to get from sending *IDN? command.
11-11-2011 03:20 PM
Hi,
The *IDN? is an identification query. If the device is properly connected it will respond with its identification string. (such as Manufacturer, Model name, etc). I suggest you first disconnect the device and perform a loopback test on the cable itself. If the cable passes the test you should be able to successfully execute *IDN?. Make sure you follow these steps:
Open VISA test panels:
1. In the viWrite tab, type in *IDN?\n and then click Execute. This will send the 488.2 identification command "*IDN?" to your instrument followed by a termination character "\n"
2. Now from the viRead tab, select a count of 100, the length of an expected response. and then hit Execute. Your instrument should return an identification string.
Also have a look at this article/lab that gives a good introduction on serial communication.
11-14-2011 11:01 AM
Hi Sev,
I tried what you desribed in your previous message and performed a loopback test with the cable, once i execute in viWrite, the device goes to REM, and in viRead, i can see the instrument identification string being returned "Keithley Instrument, blah blah blah".. with a return status shown in red "BFFF0015". is that normal ? if so, i guess my cable passed the loopback test.
ANy idea about how i should proceed from here ? Thanks
11-14-2011 12:15 PM
Hi
did you download the driver from IDnet?
If not do it.
Try to run a small example from that driver and play around with it.
IDnet can be found:
11-14-2011 03:08 PM
hi Albert
I downloaded Keithley 24xx meter, certified LabView plug and play (project style) Instrument Driver for Labview 2010. I extracted the zip file in the instr.lib, but the problem still exists. Would you suggest what to do next ?
THanks,
11-14-2011 04:26 PM