LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

writing waveform data to a file

I'm using one of the "getting started" vi's in the IVI examples to try and
get
waveform data from a scope.

The data that comes out of the "fetch waveform" vi's- I would like that as a
pair of x and y coordinates,
in ascii, for a spreadsheet (actually another proprietary program). in the
form
0.0000000e+000
or something close to that.

How do I get there? Do I take initial x, and add the change in x, to get
the x? Then how do I get the
scalar and the y array to print out right?

I've looked at the in stock vi's for quite a while, but none seem to get me
closer.
If I use "build waveform", what does that get me?
How is "build waveform" different from the bundle that brings data to the
waveform graph?

Thanks.
0 Kudos
Message 1 of 3
(2,487 Views)
To save a text file with x/y pairs, you have to create an array of time values. One way to do that is to use the build waveform function and wire the waveform array output to the Y input, initial x output to the t0 input, and the x increment output to the dt input. The output of the build waveform function can be wired straight to a waveform graph. To write to a text file as comma or tab separated values, you can use the Get Waveform Time Array function to create an X array. Use the build array function to combine it with the Y array and wire this 2D array to Write to Spreadsheet File.VI from the File I/O palette. You may have to play around with some of the parameters like transpose array and format to get exactly what you want.
Message 2 of 3
(2,487 Views)
Thanks!!!!!!!!!!!!!


"Dennis Knutson" wrote in message
news:506500000005000000135B0000-1011517314000@exchange.ni.com...
> To save a text file with x/y pairs, you have to create an array of
> time values. One way to do that is to use the build waveform function
> and wire the waveform array output to the Y input, initial x output to
> the t0 input, and the x increment output to the dt input. The output
> of the build waveform function can be wired straight to a waveform
> graph. To write to a text file as comma or tab separated values, you
> can use the Get Waveform Time Array function to create an X array. Use
> the build array function to combine it with the Y array and wire this
> 2D array to Write to Spreadsheet File.VI from the File I/O palet
te.
> You may have to play around with some of the parameters like transpose
> array and format to get exactly what you want.
0 Kudos
Message 3 of 3
(2,487 Views)