LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

get X and Y components form 1D waveform array

Solved!
Go to solution

To all:

 

I have a quandary about obtaining X and Y data from a 1D array of Waveform.  I can not use the standard waveform tools (get waveform XY for example). I get a message stating I am wiring different data types.  And, if I try to get the data in array format starting with "TDMS read", it only returns the values, not the time stamp or the data point numbers.

 

So, I am scratching my head how to extract this information without building a new array with the appropriate information.  All other post I read indicate using the waveform tools or assigning a type of data to beging with.

 

The TDMS file I am reading has properties that were written: sample clock rate and author. Might these values have something to do with it?

 

thanks for any advice. I have attached a jpg of the block diagram section I would like to manipulate

 

AL

A. Lopez
0 Kudos
Message 1 of 6
(8,697 Views)

You will need to use Get Waveform Components.  The waveform has 3 major pieces of information:  the Y array waveform, T0 (initial timestamp of the initial element), and dt (timing between samples.)  A 4th less commonly used element is a variant called Attributes.

 

Use T0 and dt along with the size of the Y array, and you could build another array that has a corresponding time for each sample in the Y array.

0 Kudos
Message 2 of 6
(8,693 Views)

Thanks for your reply Ravens Fan,

 

However, I can not use the waveform tools to extract the components. And is the source of my question.

 

I have attached a JPG of the resulting problem if I use the "Get Waveform Components" VI.

 

 

A. Lopez
0 Kudos
Message 3 of 6
(8,677 Views)
Solution
Accepted by topic author lopez
Going back to your first picture, I see a 1-D array of waveforms. So you will need to use index array to get whichever waveform is of interest to you, then use Get Waveform components.
Message 4 of 6
(8,670 Views)

Thanks Ravens Fan,

 

that was the step I did not understand.  indexing the 1D array of waveform worked.

 

thanks

A. Lopez
0 Kudos
Message 5 of 6
(8,668 Views)
You should mark Raven's answer as the solution. If you click the Options button, you can change it.
Message 6 of 6
(8,662 Views)