LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Countdown Timer

Hi.
 
I am trying to create an application that  consists of 2 timers (count down in seconds). When 1 timer finish, the other timer will start. When the other finish, the 1st timer will start. These will loop for a pre-determined number of cycles.
 
I have tried modifying the timers found at http://sine.ni.com/apps/utf8/niepd_web_display.display_epd4?p_guid=B45EACE3DFD556A4E034080020E74861 but I can't seem to get it to work in terms of seconds.
 
Kindly advise.
0 Kudos
Message 1 of 11
(13,669 Views)

Hi.

I have managed to do it out.

But I can't seem to be able to use DAQ to output 5V. I could only input logic in, and the output will be 1V. If I input a value of 5 in, the output will be 0V.

Does anyone know what's wrong?

0 Kudos
Message 2 of 11
(13,662 Views)
Hi novfac,

What is your card? All of our counter outputs are at a 5V TTL signal. If the signal is less, then there has to be some voltage division going on. Make sure that all your connections are properly made and that you are not dividing the voltage off on some other component on your circuit.

Please let us know what you find.

Best regards,

Nathan Yang
Applications Engineer
National Instruments
0 Kudos
Message 3 of 11
(13,642 Views)
I am using a 6062E DAQ card. I have tried to output 4V and 0V, using 2 DAQ. The output should vary between the 2. However, after it's 4V, then 0V, the output just remains at 0V. It no longer goes up to 4V even though the program did go into the loop.
0 Kudos
Message 4 of 11
(13,631 Views)
I would like to clarify things. I am using one DAQ card 6062. But in the program I am using 2 DAQ assistants. I have loop it such that the 1st DAQ will output then the 2nd DAQ will output. This will then continue. However, now, the loop only occurs once even though the program did enter the loop.
0 Kudos
Message 5 of 11
(13,626 Views)
Hi novfac,

Please read the following tutorial. It should help you understand how
http://forums.ni.com/ni/board/message?board.id=170&message.id=196686

When you're saying that you output two signals, is that two digital outputs, or two analog outputs? You cannot program two analog outputs simultaneously using two DAQ Assistants.

If the loop only runs once, I would look at the Condition Terminal of the while loop. You can look at it in Highlight Execution mode and see why a True is being passed to it.

Best regards,

Nathan Yang
Applications Engineer
National Instruments
0 Kudos
Message 6 of 11
(13,605 Views)

The Countdown Timer is great, but it is quite limited.  I'm saying this because when one pushes "Stop Timer,"  it stops the program immediately.  It would be nice if this VI worked like the Stopwatch VI (see attached).  There is a reset and a stop button available.  I'd like have a "Pause" and a "Reset" button on my countdown, but am unsure as to how I'm supposed to do this.

I hope this makes sense.  I'd like to do the same thing as Stopwatch.vi, but instead of counting up, I'd like for a user to input a value they'd like to countdown, and be able to Pause, Reset, the Countdown without stoping the program.  The only way to stop running the program is if I click "Stop."

Any help would be appreciated.

Thank you! 🙂

Amal Patel
Download All
0 Kudos
Message 7 of 11
(13,510 Views)
Hi Amal,

If I understand correctly, you would like the Countdown LV6.vi to have additional functionality, similar to the Stopwatch v60.vi.  You would like to add pause and reset capabilities to the Countdown LV6.vi.  If this is correct, I believe that the attached VI achieves this.  If I am incorrect, and the VI does not behave as expected, please do not hesitate to let me know and clarify what you would like that VI to do.

Best of luck on your application, and have a great day!!
Regards,
Ching P.
DAQ and Academic Hardware R&D
National Instruments
Message 8 of 11
(13,474 Views)
Mr. Ching,
That is precisely what I wanted.  Thank you very much!  I'll rate you a 5 🙂
Amal Patel
0 Kudos
Message 9 of 11
(13,469 Views)
There are a few things I need help with.  For this new vi (Countdown with options.vi), I would like for the countdown to stop at zero when it's finished counting down.  I don't want it to start up again at 60 min. 
 
Also, just as a boolean lights up when the countdown is complete, is there a way I can make a boolean light up when the countdown is not activated, and another boolean when the countdown is running?  For example: 
 
When "Start" is NOT pressed: Green Boolean
When "Start" is pressed: Yellow Boolean
When Countdown is complete: Red Boolean
 
Anytime the countdown is Reset, I would like for the Green Boolean to light.
 
I hope this makes sense.  I am very new to LabVIEW.
Thank you 🙂
Amal Patel
0 Kudos
Message 10 of 11
(13,445 Views)