08-17-2005 10:07 AM
08-17-2005 10:37 AM
You probably can't add the numbers because your representation is not enough (maybe an I16 or a U16). Try changing it to U32.
A better solution would be to simply change the formatting of the indicator to show the extra 0s. Right click the indicator, select Format & Precision, select Floating Point and play with the options to get what you want (especially Minimum Field Width).
08-17-2005 10:51 AM
08-17-2005 10:57 AM
08-17-2005 11:01 AM
Hi Dennis,
Many thanks 🙂
Time to sleep...
08-17-2005 11:03 AM
08-17-2005 11:12 AM
08-17-2005 11:13 AM
Dennis, my problem with using the 'pad with zeros' setting is that I need to use the number elsewhere in my code rather than just displaying it. I think Ian's code will work. Thanks again to you both.
- Paul
08-17-2005 11:57 AM
08-17-2005 01:07 PM
Dennis, I'm actually using the large number as a time code. I'm trying to build a generic timer where the user can enter in a length of run-time. Months, days, hours, minutes, seconds. I'm trying to use a number that the user generates by entering in the length of run time (for instance: 4 months, 7 days, 8 hours, 30 minutes looks like: 04070830) and adding that number to the system time formatted in the same way. (--- this is where I was having the problem with adding numbers with lefthand zeros)
I'm trying to use this method so that the vi will be generic and totally independant of the point in time when the vi is called. Attached is my code so far if you're at all interested (keep in mind this is a work in progress and I am a complete newby at programming).
This started as a very simple sub-vi until I decided to make it as generic as possible. The difficult thing is trying to match the system clock. What if someone sets the run-time to run 9 hours overnight? After 23:59 hours the clock resets to 0100 and the day increments by one. Same problem if the vi happens to be running on the last day of the month or the last day of the year.
Oh well - once I get it debugged it should be truly generic and I can use it in any number of different applications.