LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Blinking wont work

Solved!
Go to solution

Hi guys,

please for an advice how to fix it. As the picture shows... I want a blinking led while the program wait. In this program the led is still blinking, even if the wait part is over. What to do?

0 Kudos
Message 1 of 10
(3,538 Views)

Hi vlado,

 

your loop will let the LED blink until it is stopped. Oops, that loop will run forever…

 

What to do?

Stop the loop once the time has elapsed. Easiest would be to put the ElapsedTime into the loop…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 10
(3,521 Views)

But now it light 10 second long, and then turns of.. its also infinite loop.. 
how can I set priorities of the time functions?

Thanks for the answer!

0 Kudos
Message 3 of 10
(3,517 Views)

But now it light 10 second long, and then turns of.. its also infinite loop.. 
how can I set priorities of the time functions?

Thanks for the answer!

Download All
0 Kudos
Message 4 of 10
(3,517 Views)

Hi vlado,

 

its also infinite loop.. 

Yes, YOU programmed it this way!

 

You need to provide a stop condition to stop the loop when time has elapsed.

Thanks god, there is an output of the ElapsedTime ExpressVI named "time has elapsed":

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 10
(3,510 Views)

Hi Gerd, it still doesnt work.
It blinks one or two times, and than waits 20seconds to move on.
Do you have any other ideas?

0 Kudos
Message 6 of 10
(3,450 Views)

Hi vlado,

 

Do you have any other ideas?

Yes, I have an idea: do exactly as I have shown above!

Your image shows different code then mine…

 

It blinks one or two times,

I can't comment this as I cannot debug your image.

(When you have problems with your code you should attach that code (aka VI)!)

 

and than waits 20seconds to move on.

You wired a wait time of 20s to the wait function!

Why do you wonder about that 20s wait time?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 10
(3,444 Views)
Solution
Accepted by topic author vladosaurus

My guess from your picture is that the target time of the Express VI is set too short - the total time will wait 20s due to the wait in the sequence structure so if the loop ends after say 5 seconds, the last value will be true for the remaining 15.

 

Either increase the target time for the Express VI in the loop, or decrease the wait outside (20s) if you want a shorter total time.


GCentral
0 Kudos
Message 8 of 10
(3,442 Views)

Finally it works! Thanks guys.. I didnt know that I have to set a time period. I thought that it should be set with some other element. I am a newbie, but totally in love with LabView, so sorry for bothering you.

image.png

0 Kudos
Message 9 of 10
(3,438 Views)

To be clear (and it doesn't directly apply to the image you're showing, because I think you've converted the Express VI to a normal VI), you can double click on an Express VI (or right click and choose Configure) and set some parameters that govern its operation. For the Wait Express, this includes the target time.

 

However, this ability to basically hide information that's critical to the working of the program is one reason that Express VIs aren't always a great choice - here, the duration of your Wait VI was invisible to us just looking at the visual representation. Even though you could double click/configure the function to find out (or hover over using Context Help), it isn't immediately obvious when scanning (your own) Block Diagram for the first time in a few months!


GCentral
0 Kudos
Message 10 of 10
(3,433 Views)