LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Count Timeout of an Event Struct

Solved!
Go to solution

Hi,

 

i'm using an event struct to manage a pop up. One of the requirement is to be able to show a count down of the timeout before the pop-up close by himself.

I have used an event struct to maange also the actions on 3 different button, so i have thought to use the TimeOut event to manage also the previous requirement but i can't find a solution to show the indicator decrement with time. is there any solution?

 

Thank you for the help!

 

Best Regards,

Zuc

 

ver LabVIEW 2019

0 Kudos
Message 1 of 5
(306 Views)

Use a relatively short event timeout and repeatedly measure the elapsed time, then stop the loop when that happens.

0 Kudos
Message 2 of 5
(295 Views)
Solution
Accepted by topic author Zuc_lab2

@altenbach wrote:

Use a relatively short event timeout and repeatedly measure the elapsed time, then stop the loop when that happens.


I don't have your Teststand tools, so I cannot test, but here's a sketch that might need some debugging but can give you some ideas.....

 

 

0 Kudos
Message 3 of 5
(288 Views)

Hi  ,

 

it works perfectly for me. But i don't get why, if i call the VI more times in my Teststand sequence, the timeout value after the first call jumps from the Value passed by the Sequence to half it's value. For example i set Timeout = 30s i see the 30 at first iteration and at the second it appears = 14s... what i missing?

 

Best regards,

Zuc

Download All
0 Kudos
Message 4 of 5
(166 Views)

Sorry, I don't have teststand and have no means of testing this. 

 

Some general LabVIEW comments:

 

  • Why is the timeout orange if you are only using whole seconds?
  • You have two "cooks" working on the timeout: (1) A boolean=False AND a timeout=-1. Can you guarantee that the timeout is always -1 if the boolean is false and never -1 otherwise?
  • You could eliminate a lot of duplicate code by combining all events into one single event case, place all the button terminals in it and have small case structures connected to them for the specific handling and stop condition. Many parts of the shared code (e.g. the property nodes) could go after the toplevel loop.
0 Kudos
Message 5 of 5
(158 Views)