04-17-2017 05:07 PM
Hi everyone,
I am a beginner of learning labview. I am trying to read current values from Keithley Picoammeter 6485 to my PC via RS232(6485)-USB(PC) cable, and then use labview to process and save the data. I have known how to process the data with labview; but I do not know how to obtain the data from 6485 to my PC via RS232(6485)-USB(PC). Could anyone give me some advice? Do I need some extra hardware besides the cable? Thanks!
Solved! Go to Solution.
04-17-2017 09:29 PM - edited 04-17-2017 09:33 PM
Taking a quick look at the manual for the Keithley 6485, I read these sections:
The Model 6485/6487 supports two built-in remote interfaces: GPIB interface and RS-232 interface. You can use only one interface at a time. At the factory, the GPIB is selected. To select the interface, press COMM, select RS 232 or GPIB, then press ENTER. The Model 6485/6487 will reset with the new interface selected.
...
To configure the RS-232 interface, press CONFIG then COMM when the RS-232 interface is selected, then set baud rate, data bits, parity, terminator, and flow control. To assure proper operation, be sure that interface parameters are the same as those used by the controlling computer.
...
With the power off, connect the Model 6485/6487 RS-232 connector (Figure 7-1 or Figure 7-2) to the computer serial port using a straight through shielded RS-232 cable terminated with DB-9 connectors (Keithley Model 7009). Do not use a null modem cable.
So initially, a few key points.
Assuming that you're already past all of that, then you should have something you can communicate with nicely. Once you've gotten it all wired up and you're pretty confident about your connections, you can try using the VISA Write and VISA Read primitive nodes in LabVIEW (they're under Data Communication > Protocols > Serial) to write the message '*IDN?' and hopefully read back the manufacturer, model number, ... to confirm you have working communications.
Then, you can just go ahead and use the commands as you need them from the manual, under the heading "Remote Commands".
It looks like you can set the device to set a LF (line feed) at the end of each transmission - use this with the terminator option in VISA Configure Serial Port to avoid having to read a specific number of bytes - instead you can read a large number of bytes (say 50) and know that it will stop when it hits a LF character. (I made up the number 50 - make sure none of the responses are longer than whatever you set!)
04-17-2017 09:52 PM
Hi cbutcher, Thanks for your reply!
I plan to use a RS232-USB cable (https://www.sparkfun.com/products/11304). I do not know if it is the one you mentioned. I will try the steps your suggested. Thanks!
04-25-2017 04:26 PM
Hi cbutcher, I set up everything like you told me but I have not finished it because I am busy with some other things. Thanks!
04-25-2017 06:08 PM
@Max999 wrote:
Hi cbutcher, Thanks for your reply!
I plan to use a RS232-USB cable (https://www.sparkfun.com/products/11304). I do not know if it is the one you mentioned. I will try the steps your suggested. Thanks!
Get the cable Keithley provides. It's special and will work. Or, post back if the one you think will do does.
05-06-2017 11:37 PM
05-06-2017 11:44 PM
Hi Jeff·Þ·Bohrer,
Keithley did not provide the cable. In the manual, it requires to use a straight-through cable (RS-232). Instead I got a RS232- USB cable. It does not work. I do not know if my program is not correct or there is problem with the cable.
05-07-2017 02:27 AM - edited 05-07-2017 02:29 AM
Perhaps you could try this VI? I haven't wired the inputs to the VISA Configure, because you've shown the defaults in your image - I'm sure you already checked but these should match the settings you have on the device - it doesn't seem to list defaults in the manual.
I suspect the problem is that you're not sending a termination character (LF) on the end of your query (at least that I can see). The display type of '\' for my string constant makes this easier to see. I can see how you would get the string you're sending from what I earlier posted - I apologise for the confusion, I used quotations to specify what you should send, but you don't need to send the apostrophes/quotation marks. Also, the termination character (IIRC) only affects Reads, not Writes, so you have to manually add the LF to your write commands. Usually, you can do this with Concatenate Strings, or similar.
I back-saved to 2012 just in case. If you need an earlier copy, just ask (or recreate from the snippet below).
05-07-2017 02:42 AM - edited 05-07-2017 02:46 AM
@Max999 wrote:
Hi Jeff·Þ·Bohrer,
Keithley did not provide the cable. In the manual, it requires to use a straight-through cable (RS-232). Instead I got a RS232- USB cable. It does not work. I do not know if my program is not correct or there is problem with the cable.
You can make a simple VI to test your RS232 connection works fine. For example, a simple picoamp Read test:
Tell us if you get any error msg, so we can guide you further.
PS.: I am very happy that finally NI/Keithley provides us proper SCPI drivers for the Keithley 6485/6487 units! As I see this driver pack just got released last month 🙂 Last year we had to program our driver for these units, since we could not use the old (DLL based) drivers under LabVIEW Real Time systems...
05-07-2017 03:22 AM
Some more things: