LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Create an array and save data of n elements

Solved!
Go to solution

Hi,

I am trying to create an array to save n number of rms values received from crio. It will save data according to index number. When the array is full, I will run some calculation and the number will start again from zero. But till now I couldn’t figure it out how to create a new array. All the video on YouTube, they are inserting values manually. Any solution? Thanks

 

0 Kudos
Message 1 of 3
(858 Views)

There are different ways to Create/Use Array Functions.

 

If you have Known Array Size (Use Initialize array)

If your Array size changes dynamically use Build Array.

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 2 of 3
(842 Views)
Solution
Accepted by topic author mub.re

Youtube is probably not the best way to learn labVIEW. While there are some good tutorials, there is a lot of total garbage out there (and you found it!). As a first step, start with the learning resources listed at the top of the forum.

 

As a second step, explain exactly what you are trying to do, what you have tried, how your program is architected, etc. and we will provide you with a perfect solution. This is trivial beginner stuff!! It always helps if you could attach a simplified version of your code. Is the array on the cRIO or on the PC part of the code?

 

What kind of "calculation" do you need to do? For some problems (e.g. a running average or similar), you don't even need an array!

 

To create an array of fixed size, use "initialize array". To keep it persistent across iterations, keep it in a shift register. Use another shift register to keep track of the insert point and use "replace array subset" to overwrite the current position with new data. Detect whenever all elements have been replaced and trigger your posts processing. Simple enough? See how far you get!

0 Kudos
Message 3 of 3
(813 Views)