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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Charging of capacitor, timing and flat-sequence struture

Solved!
Go to solution

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!

Regards,
Even
_________________________________
Certified LabVIEW Associate Developer

Automated Test Developer
Topro AS
Norway
0 Kudos
Message 11 of 15
(426 Views)

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

Message 12 of 15
(417 Views)

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 LabviewSmiley Very Happy

Regards,
Even
_________________________________
Certified LabVIEW Associate Developer

Automated Test Developer
Topro AS
Norway
0 Kudos
Message 13 of 15
(412 Views)

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

0 Kudos
Message 14 of 15
(406 Views)
Posting to an old thread that is marked as solved is not recommended. You should have asked the moderator to move your other thread to the LabVIEW board.
0 Kudos
Message 15 of 15
(284 Views)