Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Trouble with Prologix GPIB-USB Controller and MaX/LabVIEW

I am unable to have MaX communicate with a GPIB device (specifically the HP8720C Network Analyzer) using a Prologix GPIB-USB Controller.  I am able to use a third-party controller from www.ke5fx.com (the Prologix GPIB-USB Configurator) to send commands to the network analyzer but I am unable to communicate successfully with my device with any NI software, even when I have just turned on the computer and haven't used any other software that might also be communicating with the GPIB controller.  I'm attaching a SPY file that will hopefully illustrate the busy error I always seem to get.  Please let me know if you need more details to help me solve this problem.
 
I am using LabVIEW 8.5.1, Windows XP, and the Prologix GPIB-USB Controller.
 
Thanks!
tomcom
0 Kudos
Message 1 of 10
(13,291 Views)
Did you bother to search the forum for 'Prologix'? You would have found this and this. You are sending only a LF. Try sending CR/LF. You also seem to be randomly trying different VISA Resource Names. Determine exactly what serial port it's connected to. That should be simple to do. Disconnect it and see what resource disappears in MAX or windows device manager. Don't try using a GPIB resource because it's not.
0 Kudos
Message 2 of 10
(13,288 Views)
I did check those posts.  According to the documentation on the Prologix Controller, I'm supposed to be able to see two additional COM ports, but I only see COM4 disappearing when I remove the device so that's why I tested every device that MaX saw (in case it might give some insight to you LabVIEW experts that I couldn't glean).  How do I change to CR/LF?  According to the Prologix Controller, that is the default setting.
0 Kudos
Message 3 of 10
(13,283 Views)
I don't understand why you would see two serial ports. In any case, you send a CR/LF in your LabVIEW and you don't change the controller. In MAX, you add the correct '\' Code. When you first open the VISA test panel, you see *IDN?\n. The *IDN? is just a default command that is send to an instrument. Change it to whatever you want. The \n is the Line Feed character. To send a CR, you need to use \r. The Basic Serial Write and Read example in LabVIEW is similar. The string control is set for '\' Codes Display. You can switch between normal, '\' Codes, and hex by right clicking on a string control/constant.
0 Kudos
Message 4 of 10
(13,266 Views)

Hi, sorry to resurrect this old thread. I'm only a humble autodidactic system administrator at a very small company, but two weeks ago my boss handed me a Prologix GPIB-USB controller, an old book and cd of LabVIEW 8.2, and an Agilent/HP E3631A power supply saying to have fun, I'd be controlling all of the instruments in the lab.

 

I can communicate with the power supply easily via the terminal. I can also communicate with LabVIEW sending basic strings by adding \r\n as mentioned here in the forum.

 

The book specifically said that modifying the device drivers is the last thing one should cut their teeth on, but how would I go about doing so to account for the Prologix controller? Do I concatenate an end-of-line constant for each and every VISA Write that the driver's subVIs make?

 

Even though I have little to no actual programming experience, I feel as though I'm missing something relatively simple. 

0 Kudos
Message 5 of 10
(12,593 Views)

Yes, you'll have to modify the driver and concantanate a CR/LF at each VISA Write. The good news is that a power supply is one one the easier instrument types. However, you might have to do some extensive modifications to perform some low level GPIB functions as opposed to ordinary reads and writes.

 

If your boss is the understanding type, you can tell him that the money he saved by buying the prologix is going to be more than wasted in the time its going to take you to modify the single driver and next time leave this type of decision up to someone who's a bit more familiar with this sort of thing.  Having to modify more than one is just plain stupid, imho.

0 Kudos
Message 6 of 10
(12,587 Views)

Darren,

 

While I agree with Dennis's post, here are a couple links that may help you out:

 

Prologix FAQ:  http://www.prologix.biz/faqUSB3.x.php

Prologix Examples:  http://www.ftdichip.com/Projects/CodeExamples/LabVIEW.htm

 

 

Eric K

Applications Engineer

National Instruments

Message Edited by Eric K on 05-21-2009 09:04 AM
0 Kudos
Message 7 of 10
(12,568 Views)

And here are some of the VISA functions that you simply cannot use and will have to write an equivalent function. You probably will not see some of these in a driver but there are some that you will see quite a bit.

 

Message Edited by Dennis Knutson on 05-21-2009 08:20 AM
Message 8 of 10
(12,564 Views)

Unfortunately, my boss is more the tough love/broaden your understanding type. Smiley Wink

 

At any rate, thank you both for the responses--they've been very helpful. I'll see about enacting these suggestions while letting it be known that an actual GPIB controller card might not be such a bad last resort.

0 Kudos
Message 9 of 10
(12,554 Views)

Hi, I had also this kind of problem. We bought prologix usb-gpib controller. At first connection it installed FTDI drivers to work with serial connection. When I downloaded sample labview program from prologix website it did not work. I started to search for possible problems. It appears I had basically two problems there. 

1)  In labview program Visa resource name's Visa class must be changed to "serial instrument". you will find it right clicking resource name in program diagram.

2) When you write command to instrument it is not sufficient to use command code itself, you need add after that  ++auto 1 which is prologix command to listen, these comands are listed in prologix gpib-usb controller's manual. For example for HP multimeter I use F3 ++auto 1 to get 2-Ohm resistance measurement.

 

If you don't get response from instrument after that just make response time in program larger.

Another mistake that I made: I thought visa serial gpib commands and FTDI VI's must be used together when writing program with prologix, it appears they are two seperate ways, either one is ok.

Hope it all helps.

0 Kudos
Message 10 of 10
(9,761 Views)