LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Auto-resetting boolean after 5 seconds?

Hey,

 

At first sorry for my bad English, I'm Dutch

 

I have a case-structure and I want it to be 'true' for 5 seconds (after I push the boolean) and then be false again.

I fixed that with an extra case-structure wich contains an  'Elapsed time' that returns 'false' after 5 seconds.

 

But... I want to be able to do that several times while the VI's runs. Right now I can only do it once because the 'Elapsed time' doesnt go back to zero after it returns "false".

ANY suggestions are very welcome 🙂

 

ps I put my VI in the attachement


Cheers

0 Kudos
Message 1 of 5
(3,647 Views)

Try setting the "Auto-Reset" input of the Elapsed Time function to TRUE.  This will reset the timer each time it hits its time target.


Dan

0 Kudos
Message 2 of 5
(3,636 Views)

Thanks for your reply, I allready tried that but then the true false case that contains the 'elapsed time' stays true (it just keeps running)

0 Kudos
Message 3 of 5
(3,609 Views)

Hi chickensoup,

Check this code.I have disabled some code in your block diagram. Have changed mechanical action of Boolean control.

Is this what you want?

Gaurav k
CLD Certified !!!!!
Do not forget to Mark solution and to give Kudo if problem is solved.
Message 4 of 5
(3,603 Views)

Thanks for your help, but unfortunately this is not what I need. For now i made a compromise and use 2 buttons

0 Kudos
Message 5 of 5
(3,565 Views)