ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
Broken_Arrow

Number to Digital Clock Conversion Function

Status: Declined

Any idea that has received less than 5 kudos within 5 years after posting will be automatically declined.

Number to Digital Clock Conversion Function. Great for countdown or count up. Easy to use. The indicator is a cluster which auto-sizes depending on how many units you are showing, font size, etc.

 

23548i1B0149536F8E5672

Richard






9 Comments
elset191
Active Participant

Regarding your overflow, I think I might expect to see 102 minutes rather than 60 minutes +  (42 min) Overflow

--
Tim Elsey
Certified LabVIEW Architect
Broken_Arrow
Active Participant

The overflow is there as a caution, or a reminder that you are using a digital clock format, which can't display 102 minutes. I have many tests that run multiple hours, and the users hate to see things like 294 minutes, or worse, 17640 sec. So, I have to do the Modulus trick and make a "clock" - then you have to format a colon into it, etc. It would be nice if it were just part of the IDE.

Richard






altenbach
Knight of NI

What's wrong with simply setting the display format of a numeric indicator to relative time? No code needed!

 

Or use advanced editing mode, e.g. %<%M:%S>t to only display minutes and seconds.

Broken_Arrow
Active Participant

altenbach: Can't do MM:SS

Richard






Broken_Arrow
Active Participant

altenbach: You edited your post while I was responding. I didn't know about the advanced editing mode ability to do that. OK! File this one under "Redundant".  Thanks. Smiley Happy

Richard






altenbach
Knight of NI

As I added later: Use %<%M:%S>t in advanced editing mode. You need to coerce the value if you don't want it to exceed two digits on the minutes.

Broken_Arrow
Active Participant

We're posting and editing at the same time!

Richard






altenbach
Knight of NI

race condition!

Darren
Proven Zealot
Status changed to: Declined

Any idea that has received less than 5 kudos within 5 years after posting will be automatically declined.