Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

GPIB trouble with one instrument

Hello.

 

I have been playing around with some GPIB devices, as I am interested in collecting some temperature data. More specifically, I have a number of 4-wire RTDs that I'm trying to measure with an old temperature controller (Lakeshore DRC-82C, for those who are interested). I've attached a LabVIEW VI I wrote, but can't seem to get to work. I turn on my temperature reader, and I run the program, and it displays the first reading it sees. But then, the temperature reader freezes. I can't get it to run again until I shut it off and restart it. 

 

So then I tried to run the same program with my Keithley 2400, and encountered no problems. The readings displayed on my Keithley are reflected real-time in the LabVIEW display. So what am I doing wrong? Why should this program work for one device but not another? The Keithley source meter will not be available to me in the future, so I must use the temperature controller for my application.

 

Thank you! 

0 Kudos
Message 1 of 8
(4,681 Views)

What I don't understand is why it works the first time and why it would work continuously with the Keithley. You are only doing a read. GPIB instruments require you to send a command requesting a measurement. Find the command in the instrument manual and do a write first. you might want to look for a basic GPIB tutorial.

 

p.s. Please place a Wait(ms) in your loop and try VISA instead of the low level GPIB functions.

0 Kudos
Message 2 of 8
(4,680 Views)

It is an old device (1980s?) so I don't have much to work with. I am unfamiliar with LabVIEW so I am a bit lost. I have not yet been able to find anything that tells me specifically how I have to approach this problem. (The one example program in LabVIEW does not demonstrate how this read/write thing works.) So I need to write... what exactly do I write? What does "write" even do? What does it mean to "initialize"?

I found this online, I don't know if it is helpful: 

 

http://hannahsmac.magnet.fsu.edu/labview/vi_library.html 

 

 

 Again, please keep in mind I have very little experience with LabVIEW.

 

0 Kudos
Message 3 of 8
(4,677 Views)
(I just need it to spit out data, nothing fancy.)
0 Kudos
Message 4 of 8
(4,675 Views)

The issue has nothing to do with understanding LabVIEW. That is why I suggested a GPIB tutorial. An instrument will require a specific command before it will place any data in it's transmit buffer. You will have to determine what that command is from the manual. It varies from instrument to instrument and it's even worse with very old instruments. It might be a command terminated with a '?' or it might not be. If you don't have a manual, you need to find one or you won't be able to do anything.

 

p.s. If you look again at the example called LabVIEW - GPIB, it's default behavior is to write the command *IDN? to the instrument and then read what the instrument returns. The *IDN? query is something that is supported by all modern instruments. It tells the instrument to return identification information (i..e model name, serial number, etc.).

0 Kudos
Message 5 of 8
(4,672 Views)

I was wondering, assuming I figure the code out, how I would place everything on the block diagram. I am confused partly because I have no sense of what goes where. Also, would you be kind enough to point me to a tutorial suited for someone of my level? I have looked around but haven't found anything good for me.

 

There is a manual. It is old and confusing: http://www.lakeshore.com/pdf_files/Obsolete/DRC_82C_Manual.pdf

 

It says it responds to Universal Bus Message Commands, HPL, and HP Basic commands around page 41. Are the Universal Bus Message Commands like the one command you mentioned that most instruments support? If so, is there some table of commands that I could quickly look at to program the thing to spit out data? There isn't, say, a "just read whatever it's reading and feed it to the computer" command? 

 

Also, I don't know why, but the VI I posted seems to work the way I want it to on occasion. 

 

 

0 Kudos
Message 6 of 8
(4,667 Views)

There are GPIB tutorials at Wikepedia, NI, here, and many more. Try google.

 

Universal Bus Commands affect all instruments on a GPIB. What you want are the devic dependent commands. Those commands that are unique to the instrument. HPL and HP Basic are just different progamming languages. 

 

I have not studied the manual to any great depth but table 3-9 looks like a place for you to start. For example, if you were to send the command 'WO' with a GOIB Write, you would then use a GPIB Read to get all of the parameters listed in the table (S5,S4,S3,etc).

 

Also note that the instrument does require additional termination character(s). This is settable with switches. You can use the mode input of the GPIB to change the termination from the default of EOI (End or Identify only) to append CR, LF, both, etc.

 

Before you start writing any code, you can write/read/query any command in MAX. Right click on the instrument listed in MAX and select 'Communicate with Instrument'. 

0 Kudos
Message 7 of 8
(4,656 Views)

I have already looked at all of those but they do not answer my questions.

 

"For example, if you were to send the command 'WO' with a GOIB Write, you would then use a GPIB Read to get all of the parameters listed in the table (S5,S4,S3,etc)"

 

Exactly what I was looking for.

 

Thank you for your kindnes.

 

If anyone else also has any advice please feel free to post. 

0 Kudos
Message 8 of 8
(4,653 Views)