06-25-2013 01:22 PM
I'm new to using a NI-Scope, and quite new to Labview in general.
I'm trying to read a waveform from an NI-5133, and I'd like to write it to a spreadsheet file. I don't know how to go about this, though, as the write-to-spreadsheet sink is for a 2-D array of doubles and the data coming out of the NI-Scope Multi-read cluster is a 1D-array of 3-element clusters.
Basically I need to break the clusters up so that instead of a 1-d array of n clusters, it becomes a 2-d array of n rows of 3 elements.
How can I do this?
I'm using Labview 2011 and Scope 3.9.4
Thanks!
Wolley
06-25-2013 06:58 PM
The data type returned is an array of waveforms. A waveform is a specific type of cluster with 4 elements (the attributes element is hidden).
So the elements in the waveform cluster are:
t0 = timestamp
dt = delta time (time between samples)
Y = array of data points
attributes = variant data type to contain all sorts of information such as NI_ChannelName
From what you have described you want to extract the Y values.
If you run the array of waveforms through a for loop and using the "Get Waveform Components" primative you can extract the values.
Having said that, it may not be the best way to store your data. This method does not store any timing information and all the values are stored as ascii which can result in a very large file with reduced accuracy due to the conversion to text.
You may wish to look into storing your data in a TDMS file. Programming > File I/O > TDMS Streaming.
Have a look at some of the built in examples for how to use it.
06-25-2013 07:31 PM