LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sine waveform to double indicator (not array)

Hi!

 

I am using the sine waveform.vi, and I get a waveform, as standard output. If I use "Get waveform components". I get a 1D array from "Y". . What I want is to use the current amplitude value of the sine waveform as a double data type. How is this possible? If I use an index array, I can get all the array components, but I don't see how that is going to solve my problem.

 

Thanks for your help!

___________________________________
Is my avatar the dog from the fraggle rock?
0 Kudos
Message 1 of 3
(2,501 Views)

Waveform is combination of DataArray, dt and timestamp usually. So as you use "get wfm component" you will get array of Y data. This is what expected also as waveform is not of single scalar value.

 

But to see the last recent element in your array you can use index array function.If you know the number of element in your array. If you don't know then use Array size function to know size and substract one from it then put it as index of array to get last value inside your array.

 

In my personal experience on any waveform one interest area are amplitude, phase, frequency and sampling info etc.. thease are details which you are using to generate.

 

So please varify once again what you want..

 

- HS

0 Kudos
Message 2 of 3
(2,486 Views)

What do you mean by "the current amplitude value?"  When you have an array (or waveform which includes the array), all of the values are "past," not current.

 

Index array allows you to select any of the values.  If you want to precess each one individually and sequentially, do the processing inside a for loop using autoindexing on the array values.

 

Lynn

0 Kudos
Message 3 of 3
(2,484 Views)