LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to setup a graph and store data points in an array to allow me to do analysis with it

Solved!
Go to solution

Hi, 

 

I'm relatively unexperienced with using labview and I am trying to accomplish the following with using a Tektronix TDS 2001C oscilloscope but have no idea how to begin. 

 

1) Load a pre-saved setting in terms of volts/div and s/div onto oscilloscope

2) Pass whatever shows up on the o-scope onto my computer screen

3) Save the data array so that I can do an analysis with it

 

I've looked at some of the example block diagrams that came with the driver I downloaded for this particular device but am still very confused.  Any help would be greatly appreciated

0 Kudos
Message 1 of 9
(4,280 Views)
Solution
Accepted by topic author Chron0

Hello Chron0,

 

I know I'm assuming a little bit here, but did you download a device specific driver from ni.com/idnet?  This is a good spot to find prebuilt drivers for third party devices, and there is one for this particular model.  That being said, when I looked at the examples in the zip file that downloaded, I saw a couple of prebuilt options that look like they should satisfy question #2 of your project based on the method you want to use to acquire a waveform (continously, multiple waveforms, etc.).  Similarly, in the Public folder is a channel configuration VI that I think should satisfy what you're wanting to do in question #1.

 

Depending on what you are wanting to do for data analysis, in terms of software used, functions, etc, there are several report tools in LabVIEW that will allow you to save the array and manipulate it later. A good spot to start with this will be to search "File I/O" in the LabVIEW help search bar and select the option under the "Palette" entry.  There are several options here that I think may be useful, including the Write to Spreadsheet file.vi.  

 

It will also be good to familiarize yourself with the NI Example Finder in LabVIEW.  There are examples there about spreadsheets/saving data, as well as VISA, which you may want to do some reading on, as the VISA interface is how you are communicating with this device (fortunately, the downloadable driver already does that!)

 

Good luck moving ahead, and keep us posted here on your project!

 

-Dave C

 

Applications Engineer

National Instruments

Applications Engineer
National Instruments
0 Kudos
Message 2 of 9
(4,266 Views)

Hey Dave-C,

 

Thanks a bunch for your help. With your past entry I was able get some progress with the project however I've ran into another wall. 

 

I'm using the 'Acquiring continuous waveform.vi' that you mentioned earlier and customized it by spcifying volts/div and sec/divs. 

 

Currently, I have the o-scope connected to a standard sin wave function generator, but when I look at the graph and data points that labview returns it seems that every 10 seconds it reboots the vi. I've tried to go into the block diagram and edit the 'Timeouts' to 100 seconds so that it can continue graphing data past the 10 second point but no luck. Any help would be greatly appreciated.

 

Here's a link to a screnshot of my computer:

http://i44.photobucket.com/albums/f18/azniceblazer/Cantgopass10secs.jpg

 

Thanks

0 Kudos
Message 3 of 9
(4,251 Views)

Oops, I realize that the link in my previous post leads to a resized picture making it difficult to read anything. Here's another link to a better sized picture

 

http://tinypic.com/r/v3dmps/7

 

 

0 Kudos
Message 4 of 9
(4,250 Views)

Hi Chron0,

 

I've taken a look at those functions, and I'm curious you've gotten into the Fetch Waveform.vi?  I found that inside that subvi there was a timeout that was a constant 10 seconds as well, which would precede the change in your top level vi that the screenshot goes with.  If you haven't already tried changing that, please do and let me know if that resolves the issue, and obviously if you have, please let me know and I'll see what else I can find.

 

Thanks,

 

-Dave C

Applications Engineer
National Instruments
0 Kudos
Message 5 of 9
(4,225 Views)

If you save the scope setup as setup 1 in its internal memory you can probably load it using the RECAll:SETUp 1; command with the VISA write function (check in the scope programmer manual I'm not sure if valid with this scope model, available from the Tektronix web site).

 

NOTE, if the scope is in continuous acquisition mode it is a bad idea to save the data to an array, you will have a memory use build up.

 

Ben64

0 Kudos
Message 6 of 9
(4,216 Views)

Hey Dave,

 

Once again thanks for the response. I have gone in there and extended the timeout to 100,000 ms. What I have noticed is that if i set x as my sec/div then the graph will reset at every 10*x. 

 

So if I try to set it to be 1 sec/div then the graph resets every 10 seconds. 

0 Kudos
Message 7 of 9
(4,209 Views)
The graph is supposed to reset every loop iteration. The timeout has nothing to do with it. Each time the loop iterates, you get a new capture and that seems is exactly what you are seeing. A graph does not maintain a history.

P.s. Don't link to some odd third party site. Attach directly to your post.
0 Kudos
Message 8 of 9
(4,204 Views)

Actually nevermind. Thanks everyone for yoru help! 

0 Kudos
Message 9 of 9
(4,183 Views)