LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

A little bit of help with arrays

Solved!
Go to solution

Hi guyz

 

I have a problem regarding reading and processing element of an array. I have a "Reference Base Generator" and for example I generate a sine wave. Then I use "Get waveform components" to get the data from the graphic, after this i have a 1-D array of data  (right?) at the output of the "Get waveform component' bloc. I need to read every element, process it and then send it as a value further to a function input. So, how can i get every element of that array and send it further ?

 

I hope I was clear with my problem.

 

 

It would be great if you could provide me with some help. 

 

Thanks alot,

Andrei_L. 

0 Kudos
Message 1 of 6
(2,613 Views)

Andrei,

 

what is it when you say "process every element"? Is it a computation which is the same for every value as adding an offset?

Is it a computation specific to waveforms, so different for each value depending on "previous results"? Or block computation like FFT?

 

Please provide more information, including an example on how you currently try to solve it.

 

thanks,

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 6
(2,609 Views)

The processing step doesen't matter that much (just wanted to divide each value from that string). I think i found a solution for reading the elements of the array by using auto-indexing with a while loop. 

 

Andrei_L

0 Kudos
Message 3 of 6
(2,604 Views)

String?

Where do you get a string?

 

You can, if the value you use for division is constant for all array elements, use the polymorphism of the arithmetic functions. Simply wire the array to the division function and wire a single (scalar) numeric element to the other input.

This is a little more performant (faster) than your FOR loop.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 4 of 6
(2,584 Views)

While loop is not suitable, its For loop meant for 'Auto Indexing'...!!

 

Process Individual Elements of Array.png


I am not allergic to Kudos, in fact I love Kudos.

 Make your LabVIEW experience more CONVENIENT.


0 Kudos
Message 5 of 6
(2,580 Views)
Solution
Accepted by topic author Andrei_L

And just for completeness sake:


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 6 of 6
(2,566 Views)