Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

keithley 6517a serial interface help

Solved!
Go to solution

Hi,

I am using an instrument, Keithley 6517A electrometer, to control it using Labview and I am very new to this software (1 week). All i have is an RS232 cable. I dowloaded the driver, but it is for IEEE 488.2 (GPIB) cable, which doesn;t work with RS232. I did some research, and found out that u can use SCIP language to control the instrument using RS232.

Can someone please help me write a simple program that uses RS232 cable to control the instrument?

The program that I want to implement is basically to measure voltage change across the two leads, while incrementing the power source voltage built-in the instrument by around 0.1V.

 

For ex, The power source voltage will increase by 0.1V, wait around 3 seconds to stabalize the voltage reading, read and save the voltage reading to a file, repeat after incrementing 0.1 again. 

 

Information That might help

Instrument: Keithley 6517A

Cable interface: RS-232

Software used: Labview 8.5

Computer info: Vista X64 bit

 

Any help would be appreciated.

Thank you very much

 

0 Kudos
Message 1 of 28
(10,343 Views)

The GPIB driver uses SCPI so you should be able to modify the driver for RS-232. The driver uses tow functions to read and write. Instead of the GPIB functions, you can replace them with the equivalent VISA functions. It's not really a very difficult task. More tedious than anything but you might want to spend some time learning LabVIEW basics and the structure of an instrument driver first.

 

At the very least, you can use the old driver as a learning tool to show how the commands are built and selected. You also have the option of using the Instument I/O Assistant. You would need to have a copy of the programming manual in order to know what commands to send.

0 Kudos
Message 2 of 28
(10,331 Views)

The GPIB driver uses SCPI so you should be able to modify the driver for RS-232. The driver uses tow functions to read and write. Instead of the GPIB functions, you can replace them with the equivalent VISA functions. It's not really a very difficult task. More tedious than anything but you might want to spend some time learning LabVIEW basics and the structure of an instrument driver first.

 

At the very least, you can use the old driver as a learning tool to show how the commands are built and selected. You also have the option of using the Instument I/O Assistant. You would need to have a copy of the programming manual in order to know what commands to send.

 

edit: sorry for the double post. 

 

Look at this. It uses VISA so all you would have to do is add the VISA Configure Serial Port and serial termination character. Looks like the two of you have about the same class assignment.

Message Edited by Dennis Knutson on 06-17-2009 09:43 PM
Message 3 of 28
(10,330 Views)

Thank you very much for your reply. Sorry if i replied late.

I will try what you said and see if I can make it work and post any problems I may have.

 

Thank you

0 Kudos
Message 4 of 28
(10,317 Views)

I have written made a VI file based on what I know.

Can somebody just check very quickly if there is anything i need to change?

 

I have also posted the two pdf files that I used to write the program.

 

Quick question: how do we determine the resourse name? For ex, the one written in the VI file is "GPIB0::27::INSTR", but I am using a serial cable, so what would it be?

 

Thank you very much

0 Kudos
Message 5 of 28
(10,308 Views)

Hi,

I tried running the program, but it wouldn;t work.

I can;t figure out what the problem is.

I am thinking it;s with the Resourse Name. I kept it as COM1. If anyone know what it should be or how I get it for a serial port, can you please tell me?

I used the same VI as shown above by my previous post.

 

Thankyou.

0 Kudos
Message 6 of 28
(10,294 Views)

How are you taking a measurement. I only see the Auto? command and I don't see that command listed in the manual. don't you want to do a MEAS? or READ? at some point?

 

Your resource name is selectable with the control. Click on the little arrow on the right side and choose the port yuo are connected to.

0 Kudos
Message 7 of 28
(10,292 Views)

Sorry for late reply.

I changed the code a bit and still doesn;t work.

I tried to use a simple example from the library of serial to test if my serial cable is working properly (see attached VI).

When i say :SOUR:VOLT/s2/r/n in the example, the voltage source value is changed to 2V, indicating that it works.

BUT that;s only for a constant value. In my case, the value has to change periodically, so I change the # into a string and combine all strings, and it doesn;t work.

I am guessing the problem is in the Format Value icon, since the program works when i write a constant value in the string control, but doesn;t work when it changes.

 

Please help me fix this problem. I don;t want to continuesly change the value myself, but I want the computer to change the value and read the data itself.

 

Any help would be appreciated

 

thanx

Download All
0 Kudos
Message 8 of 28
(10,250 Views)
You are not using the Format Value function correctly. Have you looked at the help for it? If you want to format a numeric and add it to the string, you have to have something for the Format Striing. For example, a format string of %.3f would create a numeric with 3 decimal places. You also are not sending a CR/LF (\r\n). You could do everything in one step with a different format string. Right click on the format string and select '\' Codes Display. Use a format string of :SOUR:VOLT\s%.3f\r\n
0 Kudos
Message 9 of 28
(10,248 Views)

Hello,

Thankx to you I fixed the problem of controlling the source voltage.

But i get a new problem now.

I get an error -110:command header error.

I am sure this error is in the visa part where I tell it to :READ?, since it works when i take that visa off. I can;t figure out what the problem is

You have been a great help to me. If only somehow i can fix this reading problem then I will be able to completely measure the voltage and control the source at the same time.

 

Thank you very much in advance

0 Kudos
Message 10 of 28
(10,220 Views)