LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

timing problem when doing hourly rate

Note:
There are two problems:

1)Usually each passed test takes more than 1 minute, thus incrementing Track no. But what if the 2nd failed test completes in less than 1 minute, track no cannot be incremented, leading to wrong result in hourly rate.

2) For hourly rate, it needs to be calculated after each hour. The problem if the test lapses more than one minute, the same minute skips,
Therefore, hourly rate cannot be calculated at each hour. Using more than or less than function won't work as the hourly rate will be calculated twice or more in each hour.
 See the red box in the bloick diagram

See my attached.
I am using Labview 7.1
Pls advise I will grateful to your generous help

0 Kudos
Message 1 of 4
(2,656 Views)
Can't you use the "Wait Until Next ms Multiple" timing function to control the whole loop period?
0 Kudos
Message 2 of 4
(2,650 Views)
Hi Englund,

Thanks

Ya I know. I am trying to test whether the function is working  for my main program and test machine. Sometimes, in case of of failed test, the whole test will take less than 1 minute to complete. For the passed test, of course the teat machine will continue to test on more stages. But when the test fails in  first or earlier stages, the track number cannot be incremented.

What's more I want the to calculate the hourly rate, so if it misses 60 minute mark, Hourly rate won't  be calculated. I can use the equal sign but the minute tracker cannot possibly detect every minute becos the test takes 1 minute, more or less, missing the mark.

I have checked the function (wait until next ms multiple) as u suggest and found that this is not function I am looking for.

If you think that I missed out. Maybe post your small example  on how it works.

Clement
0 Kudos
Message 3 of 4
(2,637 Views)
Clement,

I think you will need to use the >= comparison test. For the reason you cited, an equality test will not always work. You may need to change the way you set the next limit so that the calculation is not duplicated. Just subtract the timestamps directly. No need to extract the minutes. When the difference is >= 3600 (seconds) then put the current timestamp into the shift register (rather than "last minute" or "update minute").

I doubt that you need the sequences structure. Dataflow will almost always take care of things.

Lynn
0 Kudos
Message 4 of 4
(2,620 Views)