Reed, another comment.:
The online documentation of the Timer() function reads:
--- snip-------------------------------------------
Returns the number of seconds elapsed since the first call to
Timer, Delay, or SyncWait, or the first operation on a timer control.
The value is never reset to zero except when you restart your
program.
The resolution is normally 1 millisecond. However, if you set the
useDefaultTimer configuration option to True, the resolution is 55
milliseconds:
--- snip end ----------------
I read in the knowledgebase article, that you do not plan to change the
behaviour.
In this case, you should change the dokumentation, because I chose this
function because of the statement "The value is never reset to zero..." and
this is not correct.
Stephan
"Reed Blake" schrieb im Newsbeitrag
news:3f8c1978@newsgroups....
>
> stephan wrote in message
> <5065000000080000007AA70000-1042324653000@exchange.ni.com>...
> Hello all
>
> >To calculate the correct measure times, I use the Timer()
> >function from CVI. I store the actual value of the Timer() function at
> >each start of an cycle and calculate the time, when I must take the
> >next value. This works good for some time, but after some days of
> >running, I get the first wrong measurement: I want to measure a value
> >at the end of an on-cycle, but I measure it to late so that the motor
> >is already switched of. The longer the program runs, the more often
> >this problem occurs.
>
>
> The Timer() function will roll over every 49.71 days. For details, see NI
> knowledgebase article 0MND339A, at
>
http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/2f80bef68d
> c8b1e2862563530068f0ca?OpenDocument
>
> There are a couple of ways to resolve your problem. If the current Timer()
> value is less than the previous value, add 4294967.296 to the current
value.
> Alternatively, use the ANSI C time() function instead of Timer(). The
time()
> function will return integer seconds, which may not be accurate enough for
> your application.
>
> --
> Reed Blake
> Beta Technology
> Industrial and Scientific Computing
>
>
>
>
>