From 11:00 PM CDT Friday, Nov 8 - 2:30 PM CDT Saturday, Nov 9, 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: 

Using feedback node or shift register in while loop

Hello, I want to write a LabVIEW program that uses while loop and a case structure to flash the light for 3 seconds for only the first iteration of the while loop (i=0), and for other iterations (i>0) flash the other light continuously until I stop the program. I am new to LabView and I don't know how to use feedback node and shift register yet. Can you help me with the code?

0 Kudos
Message 1 of 4
(335 Views)

I'm not entirely sure I understand your requirements. But you can "flash" an LED indicator with the blinking property node.

 

Screenshot 2024-07-12 151704.png

0 Kudos
Message 2 of 4
(314 Views)

Thanks for your help. This is what I did and it worked for me. I didn't have to use a feedback node or the shift register.

Screenshot 2024-07-12 at 7.05.37 PM.png

0 Kudos
Message 3 of 4
(289 Views)

@Likusha wrote:

Thanks for your help. This is what I did and it worked for me. I didn't have to use a feedback node or the shift register.

Screenshot 2024-07-12 at 7.05.37 PM.png


This is still poor. We also cannot see most of your code (e.g what's in the other case or outside the cropped area.

 

You also need to define what you mean by "flash for 3 seconds. Blink n times over 3 seconds? Have it True for 3 seconds? Something else?)

 

Your indicator belongs outside the case structure. There should never be long waits, etc. all you probably need is a proper state machine that changes state based on elapsed time.

 

Please attach your VI and we'll fix it.

0 Kudos
Message 4 of 4
(259 Views)