Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

External sample clock fails in some situations (NIDaqMx:)

Hi
 
I have a machine connected to a PCI-6251 Daq board. The machine has a signal delivering 1 pulse at each rotation(1/rot), and another signal delivering 180 pulses per rotation(180/rot). I use the 1/rot signal to trigger acquisitions and the 180/rot as sample clock. I read 180 samples at a time so I have exactly one rotation of the machine at each read.
The machine works at variable speed. When speed is constant, everything works out fine, even at high speeds (maximum speed 66 rot/sec). BUT: When there are speed transitions, sometimes some samples are lost. The attached figure shows how the read data seems to have been read later than the rising edge of the 1/rot pulse. This is NOT a trigger problem: the acquisition is continuous and has been triggered some rotations before. This happens when I produce sharp speed transitions.
Now the odd part: If I use as convert clock source the same as the sample clock source, the problem disappears (the problem is that I am aqcuiring two channels and this would make me get only 90 samples per rotation for each one of them). Also, if I use the external sample clock signal as timebase for the sample clock and divide it, I also do not have any problem (once again, I get only max 90 samples per second).
I have already tried several settings for the convert clock, including an external 1 MHz clock, but I seem to be getting nowhere. Does anybody know what to do?
0 Kudos
Message 1 of 5
(3,248 Views)
Actually, I just observed that the problem is there even in the two situations I have mentioned, that is, the sample loss is always present when there are sharp speed variations.
 
I also forgot to sya that my sample clock signal really looks fine in the oscilloscope, but even so I have it passing by a buffer, an optocoupler and I am using a counter to do a debouncing, so I don't know what else to do.
0 Kudos
Message 2 of 5
(3,240 Views)
Hello Helder,
 
The link below may help you:
 

Message Edité par ClementG le 10-12-2006 03:02 PM

ClémentG
0 Kudos
Message 3 of 5
(3,207 Views)

Thank you very much, Clément

I am aware of the significance of channel and scan clocks. Actually, I already tried scan clocking with different channel clocks (internal, external, different frequencies) and channel clocking directly. The problem is always the same: When my machine accelerates(scan clock or channel clock frequency changes), the board misses the conversion of some samples. As long as the speed is stable, there is no problem.

I'm now using a complicated workarround sampling at constant frequency, with the internal clock. When I have some time I will try another board, as I suspect it is a hardware problem. In the meantime, any suggestions are welcome.

Thanks again

Regards

Helder

0 Kudos
Message 4 of 5
(3,196 Views)

I've tested apps on an M-series board where an external clock changed freq very abruptly, and didn't observe any issue with missing samples.  There should be a fairly straightforward solution.  Can you post code? 

-Kevin P.

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 5 of 5
(3,187 Views)