LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

updating boolean array

I am trying to update my array the "furthest down" index needs to be updated it is also random but stays towhere it looks like the LED's are connected so... if anyone could help it would be wonderful

 

the second picture is what i want it to look like

 

 

Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
Download All
0 Kudos
Message 1 of 11
(3,957 Views)
The first thing I would try is using a shift register to hold your boolean array.  You are starting over and only replacing one element per cycle. 
0 Kudos
Message 2 of 11
(3,940 Views)

Ran out of time to edit last post.

 

UpdateArrayBD.png UpdateArray.png

Message 3 of 11
(3,929 Views)
i did try the shift register and it did work the only problem is it follows the the next indext to its spot I don't want it to do that (in other word it recenters itself over the next randomly generated index.
Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
0 Kudos
Message 4 of 11
(3,922 Views)

I'm not sure of the purpose of you initializing the array in the while loop itself... If you do that, you're basically overwriting whatever is done in the replace array subset.

 

Please ignore this post. Apologies...

Message Edited by NitinD on 28-08-2009 11:16 AM
0 Kudos
Message 5 of 11
(3,920 Views)
very nice now all it has to do is keep updating from the bottom
Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
0 Kudos
Message 6 of 11
(3,916 Views)

I am not totally sure what you are shooting for, but you could add another shift register to keep track of a fractional index.  You could use 2 * Random[0,1] - 1 to generate a random number between -1 and 1 and then add that in each cycle.  The replace array subset function will simply pick off the integer part, you could add a round as well.

 

Past my bedtime, good luck. 

 

I am getting some deja vu, seems vaguely similar to this little game I posted, if you can sift through the code you may get a few ideas.

 

http://forums.ni.com/ni/board/message?board.id=BreakPoint&message.id=8209#M8209 

Message Edited by Darin.K on 08-28-2009 01:01 AM
0 Kudos
Message 7 of 11
(3,909 Views)

lol wow took you a while I saw the game and I figured I would try it out and the only thing I have left is making the background flow properly thanks for noticing lol

 

have a good night

Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
0 Kudos
Message 8 of 11
(3,891 Views)
here is what I have so far
Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
0 Kudos
Message 9 of 11
(3,871 Views)

I'm still confused... But are you trying something like this?

0 Kudos
Message 10 of 11
(3,869 Views)