LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Tips for reading from a TDS 620A into a spreadsheet

Good evening,

 

thus far I have managed to obtain the waveform on the screen of the oscilloscope and place it on a waveform on my computer. I have also managed to write the data to a file. I have a few issues though and I would be most grateful for your input.

 

My objective is to capture transients using the oscilloscope. I will eventually put the oscilloscope into single shot mode and capture what is on the screen the instant after flashing my sample with a YAG laser.

 

However, at present my save files are only giving me lists of numbers despite me attempting to put it in array form that I thought would give me a table. x = time y = intensity etc

 

I am also having issues with labview seeming to put the oscilloscope back to default settings meaning I lose where I am. For example, if I'm zoomed into 20eV and 200Ms/s with a trigger at 30mV; as soon as I initialise the program I've made, those settings will switch to default for the oscilloscope and I will lose the trace to static. I am able to find the trace again but I'd rather not have 30 seconds worth of meaningless data at the beginning of each of my data files while I find the trace.

 

Since I only want to take one shot every second or so, I'd like labview to only get the trace (with x terms and y terms complete for a short time aftr the flash) put it in a table and export to file.

 

Labview 7.0

Tektronix TDS 620A

Connecting using GPIB-USB 

 

If anyone can help me I'd be very appreciative.

 

Thanks 

0 Kudos
Message 1 of 7
(3,206 Views)

I have attached for reference my VI thus far.

 

There are two methods for saving to file that I have tried hence the two 'save' VIs 

0 Kudos
Message 2 of 7
(3,203 Views)

Hello Anubie,

 

After reading your post, it seems that you are having problems with saving the oscilloscope data to a file and preventing the oscilloscope from changing its settings. I have looked over you code and I did notice suggestions about how you are saving the data to a file. First, when you are using the Write to Spreadsheet file, I noticed that you used both 1D and 2D data inputs. This subVI will only save one data type or the other. Since both are connected, it checks to see if the 1D has data in it and saves this.

 

Instead of this design of saving it, I would suggest to use the Write Waveforms to File VI. This VI will take care of changing the data type into a suitable form to save it to a text file. In order to use this though, we have to change the waveform data from the oscilloscope to an Analog waveform type for this funcion. I have created a picture below how to implement this.

 

change data type.PNG

 

 

 As for the second part of your questions about preventing the oscilloscope settings from changing, how are you setting the settings for the oscilloscope? Are you doing it manually on the oscilloscope? If you are, the initialize is overwriting it. If you look at the block diagram of the initialize VI there is a section of the code that states it sends a default setup.

 

I hope this information helps you application.

 

JimS

 

 

 

 

 

 


Jim St
National Instruments
RF Product Support Engineer
Message 3 of 7
(3,171 Views)

Thanks Jim_S for your input.

 

I was indeed controlling from the oscilloscope but have fixed that now.

 

Regarding your fix for the problem of saving to file. I have implemented the VIs you recommended yet I seem to be getting an output file of random characters. Could I have done something wrong or is there a setting that I have not set correctly.

 

Thanks

 

~Anubie 

0 Kudos
Message 4 of 7
(3,126 Views)

At the heart of Write Waveforms to File is a Write to Datalog function.  Datalog is a binary file format.

 

If you want to maintain it in a human readable format, you will need to use Write to Spreadsheet File like you are, or one of the other Write to Text File functions.

 

If speed is an issue, you may want to use a Producer/Consumer Architecture where you use queues to pass the data off to a parallel while loop that handles the writing of the data to a file.

Message 5 of 7
(3,118 Views)
On the same palette as Write Waveforms To File is Export Waveforms To Spreadsheet File. Also try that if you have no idea how to write a heder or the dt data.
Message 6 of 7
(3,096 Views)

Thank you Jim_S for your instructions at first

Thank you also Ravens Fan and Dennis Knutson for suggesting the export to spreadsheet function

 

I may need more help in the future but thus far you've all helped me

 

so THANKS!

 

 

Anubie 

0 Kudos
Message 7 of 7
(3,033 Views)