06-13-2011 02:29 PM
06-13-2011 03:22 PM - edited 06-13-2011 03:22 PM
The basic SCPI (GPIB protocol) command for this is to send *IDN?
That should return the Instrument name string. If it's returned, you're communicating.
06-13-2011 04:11 PM
Thanks for your response, I guess I should have been a bit more specific though. I'm trying to do it programmatically so that I can check the connectivity each time a button is pressed. Is there a way to send the identification string programmatically and get a boolean response?
Thanks!
06-13-2011 05:24 PM
I have had the same exact problem with a Tektronix scope or function generator; I do not remember which one.
Some Tektronix instruments seem to have a problem with USB control through LabVIEW. I would lose contact with the instrument if I was using USB communications, however, same instrument same program with USB to GPIB did not have that problem.
I would suggest using the FIND VISA Resources function to see if your instrument is still attached; to make it into a boolean, use the MATCH String Function with -1 being false. (You should be able to find the VISA device ID in MAX.)
If your program is critical, then try GPIN if possible to avoid this problem.
Cheers,
Andrew
06-14-2011 09:33 AM
*IDN? can easily be used programatically. You just send it to the instrument using VISA, GPIB, serial or whatever; and then read the return string. [see example LABVIEW - GPIB.vi]
As mentioned Find VISA Resource will work too (it uses *IDN? internally). Or, the GPIB status VIs will also verify communication. The Instrument Drivers you're using for your TDS 3000 series scope should have a simple VI that works as well but I don't use that model so I'm not sure. The 5000 and 7000 series drivers have revision check VIs that will return the firmware version, and the initialize VI can be set to return the ID string. All these techniques will verify your connection.
BTW, I've also had trouble with Textronix USB comm but NOT when using a USB-GPIB interface, only plain USB.
06-14-2011 09:43 AM
Find VISA Resource does not use *IDN? internally. It reads the visaconf file which is created by MAX.
If the USB-GPIB goes off line as described in the first post, any command is just going to return an error. Even with a successful response, there would be no guarantee that the connection would not be lost in the middle of the test. You want to eliminate the lost connection problem. I did have the same problem and fixed it by using a quality USB hub or by connecting directly to one of the PC's USB ports. Also make sure there is no power saving options turned on.