From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
08-24-2010 07:23 AM
Thanks for the link:) I'll study it!
As for the other tip, it worked also:) I have to modify my program abit, but the Subset function gave me atleast some values on my graph.
Thanks alot!
08-24-2010 07:50 AM
A quick explanation for the code you posted with the DAQ Assistant feeding a for loop: The Build Array creates an array with one element: The dynamic data from the DAQ Assistant containing 1000 datapoints. You feed that via an autoindexing tunnel to a for loop which also has 100 connected to the N terminal. A for loop with both autoindexing and the N terminal wired will run minimum(N, length(autoindexed array)). In your case that minimum is 1, the length of the array of dynamic data. Note that this has nothing to do with how much data is in that dynamic data signal.
If you want 100 samples, take the dynamic data from the DAQ Assistant, convert it to an array, then use Array Subset to get the smaller array.
Lynn
08-24-2010 08:04 AM
Thanks, Lynn!
That explained alot:) However I got a bit suspicious when I saw some examples where there was an array and a for loop. Of course will the forloop get N from the auto-indexing the array provides. Just like in C++. I managed to get some smaller arrays with the tips from Felix, but now I also know what I did wrong:)
Best way of learning for me is by trying and failing an then do it right, so thanks alot to you all for helping a lost soul in the world of Labview
08-24-2010 08:19 AM
We are always glad to help someone learn. When you try something and it does not work as you expected, feel free to post it with your questions. If you are not already doing so, use the context help and the linked detailed help. Many times the explanation is right there. Execution highlighting (the "light bulb") is also very useful when trying to understand how a VI works.
Lynn
01-02-2014 05:59 PM