From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

gbip with tektronix tds540

I have a tektronix TDS540 Oscilliscope where I am using a GPIB to transfer data to labview.  My goal is to get an FFT analysis out of this.  I am using the tktds5xx.vi application.  When using the .vi, the oscilliscope screen clears and the labview screen gives a bunch of sketchy lines that are not the data from the scope.  Twice, it has randomly worked and displayed the waveform.  Can someone please help me understand how labview and the oscilliscope are interfacing and/or what the problem might be.
 
Thank you!
0 Kudos
Message 1 of 12
(4,577 Views)
Hi GoofyTallKid,

I took at look at this driver, and I'm not sure I would recommend using "Application Function.vi" if that is what you are using.  Start out with "Getting Started.vi" and see if that works.  Then add functions as necessary to fill out what you want to see from your device. 

It is possible that the driver was written for a different firmware version than you currently have installed.

Feel free to post some screen shots of good and bad waveforms, as well as the code you are using to communicate with the instrument.

Hope this helps!
Robert Mortensen
Software Engineer
National Instruments
0 Kudos
Message 2 of 12
(4,562 Views)
What is firmware and how can I find out if I am using the same firmware versions?
 
I have attached a screen shot of the data.  I am using the "getting started.vi" and running it without alterations.
 
Ideally I would like to have FFT data.  I can currently get an FFT waveform on the oscilliscope.  I would like to either just transfer the FFT waveform to labview or use labview to do the FFT analysis.
 
Thank you for your help!!
 
-Jay
0 Kudos
Message 3 of 12
(4,547 Views)
Hi Jay,

From your screenshot, it looks like you were able to transfer some data from your instrument to LabVIEW, so I think your firmware is fine.  You can use a similar process to get your FFT data from the o-scope into LabVIEW, or you can use LabVIEW to perform an FFT on the data you already sent to LabVIEW.  I think your next step is to play around with this instrument driver and its different functions, and with LabVIEW in general.  How familiar are you with LabVIEW?  There are some excellent tutorials on our site for developing instrument drivers as well as general LabVIEW tutorials.

Hope this helps,
Robert Mortensen
Software Engineer
National Instruments
0 Kudos
Message 4 of 12
(4,536 Views)
Robert,
 
I am fairly new to Labview and have little programming experience, in general.  I read up on how instrument drivers work and played around with the VIs from the VI tree and it's making more sense now. 
 
I have attached a screen shot of one thing that I have not been able to figure out yet.  I was able to get the waveform with the TKTDS 5xx Getting Started.vi; however, the frequency/amplitude data is all valued at 9.9E37.  What might be the cause of this and is there an easy way to move the frequency and amplitude data to an excel file? 
 
Also, I tried connecting the application function's waveform out to the FFT spectral analysis tool.  My variables are of different types and I am not sure how to get the graphical data to what the FFT likes.
 
Thank you for your help!
 
-Jay
0 Kudos
Message 5 of 12
(4,530 Views)

I'm not sure why none of the measurements are working when you are obviously getting a waveform back. You're using the getting started example unmodified? If you made some changes to any of the VIs, could you post the VIs (not images). If you didn't modify anything, in the subVI Application Example, right click on the first VI called TKDS Read Meas and select Set Breakpoint. This will pause the program before reading a measurement. You should be able to go to the scope, take it out of remote mode and see if the measurement is being displayed on the screen. Once you get correct data, saving to a file can be done with Write to Spreadsheet File or Write Characters to File.

To convert the data from the scope to be used by the LabVIEW FFT functions, you need to convert the data to a waveform data type. The attachment shows how to do that.

Also, in the future, please don't post bmp files. They take way to long to download. Use paint to save the image as a jpg or png file.
0 Kudos
Message 6 of 12
(4,526 Views)
Dennis,
 
I am working on converting to a waveform data type.  Could you possibly send me the .vi that the convert to waveform.jpg came from?  I am able to figure out a lot more using the context help. 
 
Thank you,
Jay
0 Kudos
Message 7 of 12
(4,520 Views)
The functions I used are an Unbundle (cluster palette) and a Build Waveform (waveform palette).
0 Kudos
Message 8 of 12
(4,516 Views)

Dennis,

I created a .vi that has the functions to capture the waveform and perform an FFT analysis.  The waveform is returned as I have it on the screen.  However, the FFT waveform shows a straight line at a negative amplitude.  I have attached the VI.  Any thoughts to why this is occuring?  A couple of things I have tried (adding the initialize sub-vi to this VI and using the FFT in the application function) produced the same results as I am getting in the VI I have attached. 

Thank you for your time and help!

-Jay

 

 

0 Kudos
Message 9 of 12
(4,475 Views)
Can you run the VI and re-post it with the data you're getting. The way to do this is that after you run and have the scope waveform, go to the Operate menu and select Make Current Values Default. Save the VI and re-post. With some actual data, someone can run the VI without having a scope.
0 Kudos
Message 10 of 12
(4,474 Views)