To download NI software, including the products shown below, visit ni.com/downloads.
Overview
The example demonstrates how to program a Boolean timer ('stop watch') with events.
Description
The example uses a Boolean control to start and stop a timer. The first time the Boolean changes to ON it turns the timer on. The next time it transitions from OFF to ON, it turns the timer off and records the time that was saved.
Also the example uses the timeout event to update the elapsed time. The timeout event is only activated when the timer has been started and is otherwise deactivated.
Requirements
Software
Hardware
Steps to Implement or Execute Code
Additional Information or References
**The code for this example has been edited to meet the new Community Example Style Guidelines. The edited copy is marked with the text 'NIVerified'. Read here for more information about the new Example Guidelines and Community Platform.**
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.
Hi, could you please save it in labView 8.6? Thanks
Done.
Hi,
I find this timer is interesting but I am new to labview. Can you briefly explain the block diagram?
Thanks.
NKR
What about it specifically? It uses shift registers to remember the previous selections for each iteration of the loop.
Hi,
1. I wanted to know what the timers with 50 are for and the 2 timers inside the loop.
2. Is this used for a simulation?
Rgds.
NKR
Hi Thanks for the explanation.
I wonder if I can use the same concept to a have Boolean controlled timer for other application. For e.g. can I have a timer which at the end of it's set time can produce a logic output (0,1) so that I can use it initiate other sequential events.
Thanks.
NKR
Sounds like you want to use the Elapsed Time Express VI. It basically is this under the hood. Just drives a boolean line to TRUE when the timer has elapsed.
Hi I think you have shed some light! Thank you and this looks more like what I am after. I have downloaded some examples and will play around with to develop a better understanding. If I am stuck, I will contact you. Hope you don't mind. Regards, NKR P/S: If you have any examples or if you know where I can find one, please do let me know.
I'd recommend posting over at http://forums.ni.com/ if you have further questions. These example threads aren't really intended for support. There is a huge community in the forums of people ready to answer your questions!
Okay I will thank you.