LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I add statistic data continously to an array while my program is running?

Solved!
Go to solution

Hello everybody!

 

First of all I am very new in LabVIEW. I have been studying it for about 2 weeks, so please be broadminded :). 

 

My project: I have loads of tdms files from an experiment at my university (I am studying mechanical engineering) and I need to analyze them. I need to find correlation between them, or between the mean, spread value, rms, etc. of them. 

The object I propose to myself is that i will have a block of usable and manageable data in an array or in a matrix, which after I can use to make graphs, export to excel or make further analyzation finding more correlation.

 

I visited lots of forums, topics, watched videos used google as my friend but I could not manage my problems 😕

 

My questions:

 

How can I add the data one after an another continously to an array while my program is running? (shift register, insert into array, how to use them)

How can I make my program simplier? (Yes I know or think that there are tons of mistakes and unwanted things)

What is about the virtual memory of the 32bit LabVIEW? Is there anything what I can do without reducing the segment size? (probably trying x64?)

How to work with TDM Excel Add-In Tool?

 

Thank you in advance for your answers and assistance!

 

Download All
0 Kudos
Message 1 of 9
(1,873 Views)
Solution
Accepted by topic author Elfia
  • If you want to append data to an array, you should delete the inner FOR loop and anchor the initialized shift register to the outer loop (See picture).
  • It is not clear at all how you want to append your data plus your array constant containing a 0 and a 1 (please set the index to 0 and resize to show all elements to avoid confusion!). How should the output look like (1D array? 2D array? what order?) Please be very specific.
  • Why do you wire N? Don't you want to process all tdms files in a given folder or just the two that are alphabetically first?
  • "path" is not a useful default value for a path control.
  • You have some dangling code (e.g. a "to dynamic data") What's the purpose.
  • What problems do you have with "segment size"? Please explain.

 

altenbach_0-1648403196882.png

 

0 Kudos
Message 2 of 9
(1,818 Views)

Thank you a lot for your kind help Sir!

 

After all I could manage my problems with your help.

0 Kudos
Message 3 of 9
(1,777 Views)

Since you have many values per iteration, all you need is one single shift register containing a 2D array, of course. Make sure not to overcomplicate things! Feel free to show us your latest code so we can offer more constructive advice. 😄

 

0 Kudos
Message 4 of 9
(1,772 Views)

Here you are!

Yeah I know my code is extremely chaotic... 😕

0 Kudos
Message 5 of 9
(1,763 Views)

Can you "save for previous" (2020)?

0 Kudos
Message 6 of 9
(1,757 Views)

Here you are, I hope it works. 🙂

0 Kudos
Message 7 of 9
(1,749 Views)

Here's how that could look like.

 

altenbach_0-1648656974088.png

 

This assume that you want to see the graphs (etc.) update while the loop is running, i.e. if the iterations are slow and you like to watch the data building. If not (most likely) you can move all indicators and associated code after the loop, of course.

 

altenbach_1-1648657199487.png

 

... which is of course the same as this much cleaner version:

 

altenbach_0-1648658518367.png

 

Message 8 of 9
(1,737 Views)

Hello everybody! 

 

Can somebody help me with my code?

 

I'd like to simplify my code. I have five parts of every tdms file and I have 47 tdms files. I'd like to calculate mean, rms, variance etc. 

So that means I'd like to get 5*47 samples in my graphs but my code is quite chatoic atm. And because of the horrific amount of information it works quite slowly.

 

Thanks in advance for your help!!

 

 

 

 

0 Kudos
Message 9 of 9
(1,662 Views)