Quantcast
Channel: LabVIEW topics
Viewing all articles
Browse latest Browse all 69058

for loop iterator jumps from 0 to random number?

$
0
0

Hello everyone,

 

I have a for loop with a auto-indexed tunnle coming off of it.  The for loop is set to run 240 times (4x / sec.), then the array when passed from the loop is averaged and data is played with from there on out.

 

It works great except for the first run which is throwing off data further down the line.  It will run anywhere from 20ish seconds to 50ish seconds.

 

If I put an indicator on the index it will jump from 0 to some number between 7 and 160 at random as soon as the program begins.  From there on out, after the first iteration it triggers every minute.  However the time stamps on all of the data are not on the minute, eg. 1:00, 2:00, 3:00, etc.  They are at some other interval, eg: 1:16, 2:16, 3:16 etc.

 

Why is it doing this?

 

My guess is that the array being output has some sort of memory of the previous runs, and is filling the first n slots with stored data and starting  the iterator up at the next avaialble index and continues on from there.

 

Is there a way to reset the data stored in the tunnle?  I'm not using a shift-register.

 

If I change to a shift register and try to pass the data to the summing function from the output shift-register, there is an error on the output and gives me a bad connection.

If I change to a shift register adn try to pass the data to the summing function from the input shift-register, it will work but continues to count from the arbitrary point.

If I change to a shift register and try to intitialize the array by connecting a constant of 0 to it, it still continues to count from the arbitrary point.

 

Any help would be greatly appreciated.

 

Thanks.


Viewing all articles
Browse latest Browse all 69058

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>