Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

If the external clock is sometimes too fast, can we just ignore a sample?

Hello,

I'm using a NI PCI-6221 to capture digital signals on an external clock.  It all works fine, except that maybe once every week or so, I get an error message that an edge occurred too quickly on the external clock.  I quote:

Digital input detected a new sample clock before the previous sample was latched into onboard memory.

If you are using an external sample clock [I am], ensure that it is connected, within the jitter and voltage level specifications, and without glitches.  If applicable, reduce your sample clock rate or use a product capable of higher sample clock rates.

Task name: _unnamedTask<0>

Status Code: -200715

And after this error message appears, the task refuses to do any more acquisitions. I understand this error message, and I know it points to a systematic error in my setup.  Nonetheless, I am hoping to "fix" this problem in software.

Question: Is there any way that I can make the DAQmx task simply ignore that bad reading, and keep going, instead of refusing to go on?

Thanks, Nick Johnson

0 Kudos
Message 1 of 2
(2,872 Views)
Hi Nick -

I'm sorry to tell you that there's no way to make the device/driver ignore the error internally, so even if you try/catch it to throw it away, the device will stop acquiring.  You'll have to reset the device when the error is thrown, then restart your DAQmx Task.   This will take some time, and you could miss out on data while it's reconfiguring itself.  I recommend improving your clock signal instead.
David Staab, CLA
Staff Systems Engineer
National Instruments
0 Kudos
Message 2 of 2
(2,839 Views)