Showing results for 
Search instead for 
Did you mean: 


Go to solution


i want your help to create a stopwatch with LabVIEW and the time will be shown in the Front panel like this   (hh:mm:ss:msms ).

Thank you .

0 Kudos
Message 1 of 6

Where are you stuck?

Show what you've attempted so far.

0 Kudos
Message 2 of 6

Sounds easy.  What sort of variable will you use to hold time information?  Do you know of any "Time" functions?  Have you "played" with them by putting them on a Block Diagram, wiring up inputs and outputs, and seeing what they produce?  Have you read any "Help" associated with them?  Do you know how to use LabVIEW to do arithmetic?


Please do not ask us to do your homework for you.


Bob Schor

0 Kudos
Message 3 of 6

@arosss wrote:

Be aware that if this is for either homework or a job interview, you would be very ill advised to use this directly. I guarantee your instructor or interviewer has done the Google search that lead acrosss to this link.

0 Kudos
Message 5 of 6
Accepted by Emna20

@Emna20 wrote:

i want your help to create a stopwatch with LabVIEW and the time will be shown in the Front panel like this   (hh:mm:ss:msms ).


So, first make a full list of requirements. Having a time display on the front panel is not sufficient to qualify as a "stop watch". You need more than that.


If you know LabVIEW, you are all set to proceed. (If not, first do a few tutorials.)


First design the front panel:


  • Three Controls: Buttons for Start, Stop, reset (maybe also pause and lap, depending how fancy you want to make it)
  • One indicator: Time display (Formatted string, numeric with time format, timestamp indicators, etc.)


Now connect it on on the block diagram:


  • Since the buttons need to be read and the time display updated at regular intervals, you probably need a loop and since you don't know how many times it needs to loop, use a while loop. Decide how fast the loop needs to run and place an appropriate wait.
  • Look into state machines. You have (at least!) two states: stopped and counting time.
  • Operating the tree buttons needs to change state and operate on a reference time. (Time is not absolute, but relative to the start time). Figure out the required logic and how you want to maintain the reference time across iterations. (hint: shift register).

Once you have something composed and run into a problem, feel free to come back here, show us what you have, and ask specific questions



Message 6 of 6