Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Tektronics TDS 5052B oscilloscope control without GPIB

Hi..I need to use LabVIEW to control the TDS5052B digital phosphor oscilloscope..I am using the scope to capture waveforms. But I don't have a GPIB connector on my PC. Can I use the serial port(RS232 DB9 or the USB) or the printer port to interface the scope to PC and control it using LabVIEW?
 
  I need to see the waveforms(1 - 10MHz sine bursts) on my PC in realtime(with least delay possible).Can it be done using serial communication?
 
        Also, I am using LabVIEW7. When I searched for the instrument driver, I got only those for LV7.1 and 8.0. Is there any way I can get the drivers for LV7.0?
0 Kudos
Message 1 of 15
(6,202 Views)

The LabVIEW Plug and Play drivers says it supports GPIB, USB, and Ethernet. If your scope has a USB connection, plug it in and and try it. If you do want to try to use an RS-232 connection, modifications to the driver are usually trivial. A driver that ships with every version of LabVIEW is the 34401. Look at how that is written for both serial and GPIB.

As far as conversion, you could download the driver and then post it and ask for help in converting it. You would probably have better luck posting the request to the LabVIEW board. Your other options are to get the driver from Tektronix or create a 7.0 IVI driver youself. You do that by downloading the CVI version of the driver and running Tools>Instrumentation>Import CVI Instrument Driver. I don't know if either the Tek or CVI driver support RS-232. A USB connection might work with them.

0 Kudos
Message 2 of 15
(6,196 Views)
I got the driver for the 5000 series from the CD that came along with the scope. Installed that. I tried connecting the PC to scope via RS232 serial port using DB9 connector.The connector has only TX,RX,RTS,CTS and GND lines connected.Now, set the port to use no flow control. I can communicate from the PC to the scope using Hyperterminal. If I open a hyperterminal on the scope as well, then i can commn properly.So I think the connections are proper.

Now, When I try to use LabVIEW, it creates problem. The initialise block itself is not completing. Now, I tried running th initialise.vi after keeping a Hyperterminal window open in the scope.Now, I saw the IDN command coming on the scope(in the Hyperterminal screen).So the vi is sending commands, but the scope does not seem to respond. How to get it working?..Even when I open Tekscope application on the scope and run the vi, the vi still times out. Please help!!
0 Kudos
Message 3 of 15
(6,184 Views)
I don't have the scope and because of that, I don't have the CD. Therefore, I don't know the type of driver you are trying to use. You could post the driver for someone to look at or ask Tektronix The possiblity exists that the driver does not support a serial connection. If it's a native LabVIEW driver, it can be modified to work. The version 7.1 driver on NI's site can be modified to do serial. I've done that and converted the driver to 7.0. I have no way to test it but it should be close. The only thing I did to NI's driver was add a case statement that checks the connection type. If it's serial, then it configures the serial port and sets up VISA to automatically append a termination character on a write.
0 Kudos
Message 4 of 15
(6,175 Views)
Thanks..Dennis..The driver I use is the same as the one here..http://sine.ni.com/apps/utf8/niid_web_display.download_page?p_id_guid=E3B19B3E91E2659CE034080020E74861
But, that does not support serial comm.

I tried your driver. Some of the subvi's were broken and I had to fix it to make the initialise block to run. But here again I am facing a new problem..
The VISA write works fine. But the VISA read never completes. So it always times out at the VISA read blocks inside the main vi's. However I noted that in the Error Query.vi the VISA read was working fine!! I just can't get heads or tails of this stuff!!


0 Kudos
Message 5 of 15
(6,172 Views)
sorry ..please forgive me for asking so many doubts!!..just one thing I was wrong there abt the error query vi..there also  the VISA read is not working!
0 Kudos
Message 6 of 15
(6,172 Views)

I don't understand why some of the VIs would have been broken. I did a save for previous version of the VI Tree and I can open that just fine. What did you have to do to the initialize to fix it? Post the VI if you can.

What I did to make the VI work for serial was to just paste in some code from the shipping 34401 driver. Looking at it again, I see the term char settings are enabled for write but I don't see the actual term char being set. You might need to do this. Try adding the property Message Based Setting:Termination Character and wiring a xA to it. This is the LF character. You might also want to add the property Message Based Settings:Termination Character Enabled and wiring a True to it. Look at block diagram of VISA Configure Serial Port to see how this is done. Also verify that the com settings in the initialize function match what the instrument is set to and what you used in Hyperterminal.

0 Kudos
Message 7 of 15
(6,168 Views)
that does not seem to be the problem(I tried it out..but the same result persists..)..Also from MAX..I can open Visa test panels..and I tried writing data from there also..I can write and read drom MAX..but only  if I keep a Hyperterminal open in the scope and I type data in there..so comm settings seems to be fine..Also..I can see the commands send from the labview Vi's in the hyper terminal..

To operate the scope I have to open an app called Tekscope on the scope..So even if I send the read command from the PC via serial port..I think the Tekscope software is not responding..and I cannot see anything related to a serial port in it's menus..

Comm settings have been double checked..But why is the scope not responding?..Do I need to start some other service on the scope for it to respond via the serial port?..
0 Kudos
Message 8 of 15
(6,165 Views)

I guess the first step should have been to verify that serial control is even possible with the instrument. This scope is basically a pc with a custom data acquisition card. The fact that you open Hyperterminal on the scope and can communicate with Hyperterminal on the pc would lead me to believe that the scope's serial port is not for external remote control by a pc but so the scope can control a different instrument. I think this is one of the Tek scopes that you can install LabVIEW on.

Presumably, you have the manual for the instrument. What does it say about the serial port?

0 Kudos
Message 9 of 15
(6,156 Views)

I serached through the manual. It does say it's possible to control via GPIB but I am not sure abt serial. This is what the manual says:-

"The hard drive and CD-ROM provide access to stored waveform data and software to customize your oscilloscope with your measurement needs. The GPIB port allows for external control of the oscilloscope. You can make hardcopies on the GPIB, RS-232, and Centronics ports. The PC Interface board includes a VGA connector for an external monitor to display the oscilloscope screen."

So why did they actually give that serial port on the scope?!!..

It also has a USB type A port. Can I use such a port for transferring waveform data to LabVIEW.My PC also has two Type A USB ports. But NI MAX doesn't detect them. If I plug a USB drive in, WinXP detects it but why can't MAX see the ports?...

Can I get any Type A  to Type B  usb convertors and use them? 

0 Kudos
Message 10 of 15
(6,145 Views)