LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Looping the LEDs with index-ed elements for infinite times

Solved!
Go to solution

Hi, I am a Labview newbie here.

 

While I am trying to convert the characters into infinite looping along the LED boards; say string 'NI',

my expected results would be NININININI......and stopped by a boolen stop button.

 

However, I have been trying hard to find ways in continuosly feeding in the elements of indexed 2-d boolean to repeat the loops by producer loops of queus and etc etc but to no avail.

 

Hope somebody would be kind enough to help. Thanks!

0 Kudos
Message 1 of 7
(4,636 Views)
Solution
Accepted by topic author AaronInnovate

A simple Increment and Quotient & Remainder will do the trick for you.  I used Matrix Size in order to quickly get the number of rows being generated.  Then in the loop, use a shift register to keep track of which index to get.  After getting the index, add 1 (increment) and then get the remainder of the new index and the number of rows.  This will reset the index to 0 after you reach the final index.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 7
(4,619 Views)

Close enough! Crossrulz. But I couldnt get the 1-D array subset and the longer i run it, there is a column loss for each repetition and that could be due to the remainder function.

 

Does your Vi works fine work large repetitions?

0 Kudos
Message 3 of 7
(4,608 Views)

Mine works just fine.  The only real difference between my code and yours is that you are using Array Subset instead of Index Array.  You should only be adding 1 row to the looping array, therefore you should be using Index Array.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 4 of 7
(4,583 Views)

Thanks and it works great! Appreciate your help!

0 Kudos
Message 5 of 7
(4,552 Views)

how when i run program, and change value in string ,led indicator will change follow my new string value ?

0 Kudos
Message 6 of 7
(3,548 Views)

No.  Because the string is read only once at the beginning of the program.  If you want to be able to change the string,  you need a mechanism to reread it during the loop.  You could put an event structure in the loop with an event for the value change of the string.  It would read the new string and build a new array of booleans and reset the looping mechanism indices.

0 Kudos
Message 7 of 7
(3,538 Views)