LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

10 second countdown timer

I am working on a countdown timer VI that counts down from 10 and goes to 0.

Need to be able to pause, stop, and reset the timer whenever the user has pressed the button dedicated to that event.

very simple VI, however, I am stuck on the reset aspect of this VI

0 Kudos
Message 1 of 9
(1,930 Views)

Hi Snow,

 


@Snow22 wrote:

very simple VI, however, I am stuck on the reset aspect of this VI


You forgot to attach your "very simple VI"!

How should we help when we don't know your code?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 9
(1,911 Views)

I recommend using FGV Timer SubVI

 

-------------------------------------------------------
Applications Engineer | TME Systems
https://tmesystems.net/
0 Kudos
Message 3 of 9
(1,873 Views)

my apologies 

0 Kudos
Message 4 of 9
(1,838 Views)

Hi Snow,

 

unfortunately you are using a very recent LabVIEW version.

To get more audience you should downconvert to some older versions as many of us don't use LV2022/2023 due to subscription license issues. (File->Save for Previous)

 

I prefer LV2019…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 9
(1,833 Views)

makes sense. I changed it to 2019

0 Kudos
Message 6 of 9
(1,829 Views)

Hi Snow,

 


@Snow22 wrote:

makes sense. I changed it to 2019


Where's the new attachment?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 9
(1,824 Views)

sorry I don't know why it didn't post it.

0 Kudos
Message 8 of 9
(1,818 Views)

Hi Snow,

 

please read the help for the event structure, especially the paragraph on "caveats…"!

(You should not place a loop running for a long time inside an event case. NEVER!)

 

Why don't you place the countdown logic in a timeout event case? Use the outer loop to keep the shift register(s)!

You may use the GetTick/GetDateTime function to accurately measure the elapsed time…

Best regards,
GerdW


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