LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

increase to a value then decrease

Solved!
Go to solution

@LandBelenky wrote:

If you want it to go forever, I'd use a while loop and set the condition to "continue if true" and use a constant false.

 


 

NO NO NO.

 

An infinite while loop is just bad programming.  The only way to stop your VI is to hit the abort button.

 

You should put a stop button control and wire that to the stop terminal of the while loop.

 

0 Kudos
Message 11 of 15
(770 Views)

This is what I got.

 

Any suggestion to make it more efficient?

0 Kudos
Message 12 of 15
(768 Views)

Ah 80's TV. Easy way up to 32 LEDs, 64 with a few modifications.

 

Kitt.png

0 Kudos
Message 13 of 15
(764 Views)

blacksnow wrote:

Any suggestion to make it more efficient?


  • The "initialize array" certainly does not belong inside the inner loop
  • Since you are always writing a TRUE, you don't need to index out the false and invert it. 😉
  • Since you never use the value in the shift register, there is no need to write to it. delete the shift register!
  • ...

Here is my quick attempt. Do you really need to be able to change the numer of LEDs live? I assume not.

Modify as needed. 😉

 

Download All
Message 14 of 15
(745 Views)

@LandBelenky wrote:

Surely we can make it prettier than that.


You mean prettier than your first attempt?

-----------------------------------------------------------------------------------------
Reese, (former CLAD, future CLD)

Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
0 Kudos
Message 15 of 15
(722 Views)