04-13-2015 01:51 AM
Hi.
I need read time from some device HHmmss (hour minutes sec). I read time periodical example every 5 sec. From this time I need make periods of 15 minutes. 00:00.00, 00:15:00, 00:30:00 00:45:00, 01:00:00,
Input in labview code is device time (HHmmss) output is minutes of period 0,1,2,3,4...15min, 0,1,2,3,4....15min 0,1,2,3,4........15min; Every 15 min .... 00:00.00, 00:15:00, 00:30:00 00:45:00, 01:00:00 period is reset and start from 0 minutes to 15 minutes.
Please , can you help me?
04-13-2015 02:55 AM
04-13-2015 05:08 AM
Do you have some idea about my problem?
(143516) is my time format for 14h 35 min 16s, how from this make output 5
or expample
(175414) output result is number 14 (54 min - 45min= 14)
(204153) output is number 11 (41 min - 30min=11)
04-13-2015 05:19 AM
@Qooler wrote:
Do you have some idea about my problem?
Do you?
You are throwing numbers around withpout explaining where on earth they are coming from.
You know the format of your time, but where are the reference numbers coming from? The 45 minutes and 30 minutes you are subtracting, where do they come from?
04-13-2015 06:09 AM
04-13-2015 06:21 AM
There are several functions in LabVIEW that give you time.
As you can see, they each report time in a different fashion -- an integer number of milliseconds (from a free-running clock), a pair of strings holding the Date and Time, and a TimeStamp, an internal LabVIEW method of presenting Time as seconds since 1 Jan 1904. You'd think that the easiest to use for purposes of elapsed time would be the "human-readable" String values, but since you are dealing with elapsed time, or time differences, the other two formats are actually simpler.
You can use either the Millisecond Timer or the Current Time function to measure elapsed time. Subtract the Ending from the Starting Time value (which you get by taking a Time measurement "at the appropriate time") and subtract them. If you are using the Millisecond Timer, your answer will be in milliseconds, which you will need to convert to minutes (I presume you can do that yourself), and if you are using Current Time, the difference, a Dbl, will be in seconds.
Suppose you want to run this "forward" -- you want to know "What time will it be in 15 minutes?". Take the value of either the Millisecond Timer or Current Time and add 15 minutes in the appropriate units (milliseconds or seconds) and you should get the Final Time value that you can use, for example, in a Comparison (to see "Are We There Yet?").
If this didn't answer your question, please ask it again, providing further details.
Bob Schor
04-13-2015 07:03 AM
You need to do a bit better explaining what you need, so, if this isn't it, it's your fault! 😄 I was sloppy with the number formats, but you were sloppy with the math so we're even.
04-13-2015 07:45 AM
04-13-2015 07:52 AM