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: 

5 LEDs are circulating one by one at 1 sec interval.( LabView VI)

Hi everyone, I am new user for LabView. May I know how to make 5 LEDs are circulating one by one at 1 sec interval.( In LabView VI). Thanks.

0 Kudos
Message 1 of 12
(1,976 Views)

I only have a Rube-Goldberg-Machine for this problem. It may work for you or not ...

snip.png

 

Joke apart:

It looks like an educational exercise and you should solve it by yourself. If you get stuck, then post your VI and we can help you with the next step.

Message 2 of 12
(1,940 Views)

There is actually an example of this in the actor framework project template! Take a look at the "launcher.vi" after loading the template

----------------------------------------------------
Studying for CLA.
LabVIEW, inherit from social media habits!
0 Kudos
Message 3 of 12
(1,930 Views)

Your problem is much simpler than the problem solved here  (fewer LEDs, no random skipping, etc.). I am sure you can simplify it accordingly. Done correctly, the code will be trivial and fit on a postage stamp.

 

 

0 Kudos
Message 4 of 12
(1,906 Views)

@Martin_Henz wrote:

I only have a Rube-Goldberg-Machine for this problem. It may work for you or not ...

 


Fantastic code and really funny in the details!. Definitely belongs into the Rube Goldberg thread. 😄

0 Kudos
Message 5 of 12
(1,903 Views)

@davidterry wrote:

Hi everyone, I am new user for LabView. May I know how to make 5 LEDs are circulating one by one at 1 sec interval.( In LabView VI). Thanks.


When you say "circulating", do you mean that the LEDs are arranged in a circle? (Thus my reply above).

If they are arranged linear, use an array of LEDs (have a look here). Of course there are many equally simple alternatives to solve this.

 

As an exercise, see if you can recreate the following code:

 

altenbach_0-1600623320872.png

 

Message 6 of 12
(1,900 Views)

may i ask the what is the name of this tool? Thanks螢幕快照 2020-09-21 下午6.43.47.png

0 Kudos
Message 7 of 12
(1,838 Views)

Hi David,

 

its a function to manipulate arrays, so it can be found in the array functions palette!

Hint: it does not insert, but replace…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 12
(1,832 Views)

another option would be to start with a boolean array constant (where one is true) and simply "rotate" the 1D array each iteration of your while loop.  

0 Kudos
Message 9 of 12
(1,820 Views)

I Heard good things about the Rotate function and number to boolean Array.

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 10 of 12
(1,816 Views)