From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Clocking error below 17.5 MHz (PCI-6541)

We are using a NI PCI-6541 with external clock input (at the CLKIN input) at different frequencies. For 44, 40, 32, 28, 22 and 20 MHz input the card works as expected, but for 16 MHz, the first niHSDIO_WriteNamedWaveformU32 errors with error code 0xbffa4a7e:

DAQmx Error -200385 occurred:
Measurements: Hardware clocking error occurred.

If you are using an external sample clock or an external reference clock, make sure it is connected and within the jitter and voltage level specifications. Also, verify that the rate of the external clock matches the specified clock rate. If you are generating your clock internally, please contact National Instruments Technical Support.

Status Code: -200385


Some more testing with a programmable generator revealed that input frequencies from 50 MHz down to 18 MHz work, but 17.5 MHz downwards fail with this error. The code used does first configure the card and sets the frequency using:

niHSDIO_ConfigureSampleClock( TxSession, NIHSDIO_VAL_CLK_IN_STR, ClockFrequency );

I think we are doing something wrong as the spec tells us that the card should be able to work with an input frequency from 20 kHz to 50 MHz...

Any pointers what might be wrong?
0 Kudos
Message 1 of 5
(3,828 Views)
emvee,

The 654x should be able to use the CLKIN input down to 20kHz with a square wave input.  With a sine wave, you are limited to a larger value depending on what your input swing is.  The limitation is actually input slew rate.  You'll notice that each sine input spec voltage and frequency results in similar input slew rates.  What sort of signal are you applying to the SMB CLKIN terminal?  Is it square or sine, what voltage levels, what duty cycle.  Also, is there any time between when you apply the clock to the CLKIN terminal and when you start your task?

Any extra information you have to help recreate your scenario would be greatly appreciated.

-Ryan M
0 Kudos
Message 2 of 5
(3,808 Views)
emvee,

I'm sorry, one more quick question.  Are you specifying the input impedance of CLKIN to be 50 or 1kohm?
0 Kudos
Message 3 of 5
(3,805 Views)

The clock used is a square wave with 0 and 3.3 volt levels. I tried both our DUT and a signal generator and monitored the signal using a scope. There the signal did look fine, fast rise times and no real difference between say 20 MHz and 16 MHz.

As far as I know I am using the CLKIN with high impendence just like the normal data lines, I can find not function in the help files to change or configure this. If high impedance, I am sure the signal has the 0/3.3 volt levels when entering the CLKIN input as I just did put the cable on the scope.

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

Hi emvee,

Based on your posts, it seems you are performing a frequency sweep.  I am guessing your program configures an HSDIO session and then calls niHSDIO Configure Sample Clock, niHSDIO Initiate, and niHSDIO Fetch in a loop.  With each iteration of the loop, the frequency is changed.  When certian frequencies run (44, 40, 32, 28, 22 and 20 MHz) the program runs, but other frequencies (16 MHz) do not work.  Is this correct?

I tried to reproduce the issue you described using the above setup, but was not able to do so.  Even though I was not able to reproduce the problem, I may have the solution.  Try adding an niHSDIO Abort to the end of the loop (i.e. niHSDIO Configure Sample Clock, niHSDIO Initiate, niHSDIO Fetch, niHSDIO Abort).  If you are encountering what I think you are, this will fix the problem.

Ryan

0 Kudos
Message 5 of 5
(3,786 Views)