LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Clock VI with elapsed time

Solved!
Go to solution

Hi guys. I want to realize a clock that show me hours and minutes. I was using the elapsed time.

Could you check if this solution is fine?Because I'm not so sure if I have done mistakes.

0 Kudos
Message 1 of 9
(5,324 Views)

The first issue I see right off the top is your elapsed time in seconds is never going to equal 60, at least not every minute like you expect it to occur.

aputman
0 Kudos
Message 2 of 9
(5,314 Views)
Solution
Accepted by topic author inuyasha84

Example_VI_BD.png

 

you can always use "tic count"

Message 3 of 9
(5,304 Views)

Personally, I'd convert the elapsed seconds to a timestamp and play around with the timestamp display to be "HH:MM:SS".


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 4 of 9
(5,284 Views)

Hi cross what are those timestamps you are talking about?can you do an example?I'm curious to learn this feature.

Thank you

0 Kudos
Message 5 of 9
(5,254 Views)

A timestamp is an internal LabVIEW data type.  You can find controls in the Numeric palette.  It's use is very common in both VIs and LabVIEW primitives.  For example, on the Timing palette, many of the VIs use it for inputs and outputs.  The Waveform Data Type (WDT) used by most NI data acquisition APIs, contains a timestamp.

 

Timestamps come in two flavors - relative and absolute.  Absolute timestamps contain the number of seconds since midnight, January 1, 1904.  Relative timestamps shift this epoch to something more convenient for the particular use case.  For example, the NI-SCOPE driver returns WDTs whose timestamp is the time of the first data point relative to the trigger position in the waveform.  Under the hood, timestamps are a 128 bit fixed point number with enough range and resolution for all but the most demanding situations.

 

Check out the LabVIEW help for more information.

0 Kudos
Message 6 of 9
(5,234 Views)

something like this...

Example_VI.png

0 Kudos
Message 7 of 9
(5,217 Views)

Why convert to a time stamp?  You can drop a numeric indicator, go into the display format properties, and set it for relative time.

0 Kudos
Message 8 of 9
(5,212 Views)

also, you are right....

0 Kudos
Message 9 of 9
(5,207 Views)