Well.... sort of.....
the crystal itself is very good, but Windows has control over when labview
gets to see the output of the crystal ("the tick"). The problem comes
when windows decides to go off into LALA land for a while, and then either
generates an extra "fast" tick to catch up, or skips a tick so it doesn't
get ahead....
IF Windows is allowing Labview to operate at the instant that the tick
happens, and IF windows allows labview to execute the call to the serial
port in the next instant, all is well. Otherwise..... well, don't hold your
breath. In a hardware solution, the call to the port is generated on the
card, and the data is buffered (on the card) until such time as the
operating system gets around to dealing with it. The only time you have a
problem is if the operating system gets so far behind that the buffer
overflows. There's nothing wrong with using the tick count, but I wouldn't
count on it for accuracy of better than a millisecond or two. In general,
it will be right on, but when it's not, you have no way of knowing....
Craig Graham
wrote in message
news:8d4emp$cr5$1@sponge.lancs.ac.uk...
>
> wrote in message
news:8cr7fn$c0g$1@nnrp1.deja.com...
> > Michael,
> > Do you have any ideas ?
> > Do you know what kind of timer can i use to get some real accurate time?
>
> Unless you want to change your DAQ hardware to latch the output from a
> crystal based counter on the same trigger pulse as the data is latched,
then
> read both buffers via the serial port, you're not going to get any more
> accuracy than the tick counter.
>
> The tick counter itself should be pretty accurate. The errors come in
> because of the variable time between reading the tick counter and reading
> the data from the serial port- this is far more significant than the error
> in the tick counter itself which, being crystal driven, will be pretty
good.
>
> Assuming you want a solution in software, rather than hardware, I'd take a
> tick counter reading immediately before the read operation, and one
> immediately after. You then have the two bounds between which your real
time
> value lies and you can give a value and uncertainty from there. Then it's
a
> case of living with the uncertainty- some of which is going to be present
no
> matter what you do, even if you adopt a hardware approach.
>
> It'd be useful if you could give more specific information on the
mechanics
> of how you get the data- i.e. do you issue a trigger command, then read
the
> data? If so, you just need the tick count before and after issuing the
> trigger command- assuming the trigger latches the instantaneous value
(read
> the instrument's instruction manual to find out what the relationship
> between the trigger time and the aquisition time are).
>
>