Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

how to use 20 MHz clock of the 6602 Timing card on other boards?

Hello,

I have a 1042 PXI with 6602 timing card and several other boards including 6534 Digital I/O board and 5122 Digitizer.
I want these boards (6534 and 5122) to use the 20 MHz clock of the 6602 board as their Sample Clock.

But when I set "/TimingIO/20MHzTimebase" as the source of the Sample Clock for the 6534 board I get the following error sometimes (sometimes everything works fine) :

"""Error -200621 occurred at DAQmx Wait Until Done.vi:2
Onboard device memory underflow. Because of system and/or bus-bandwidth limitations, the driver could not write data to the device fast enough to keep up with the device output rate. Reduce your sample rate, or reduce the number of programs your computer is executing concurrently. """

When I use "OnboardClock" as the source of the Sample Clock for 6534 I never get this message. I tell 6534 to use 6602's 20 MHZ clock by connecting "/TimingIO/20MHzTimebase" terminal to the appropriate input of the "Sample Clock vi" in the 6534's task. Output rate of the 6534 that I use is (much) less than 1 MHz.
Could somebody explain the source/reason of the error message above? It seems like 6534 can not use 6602's 20 MHz clock though it has 20 MHz oscillator itself...
Is there a way to use 20 MHz clock of the 6602 for 6534?


Thanks in advance!


0 Kudos
Message 1 of 8
(5,080 Views)

Not really sure here, but will take a shot...

1. The type of error you get and the fact you only get it sometimes suggests that you can indeed use the 6602's 20 MHz timebase as a sample clock for your other board(s).  The problem sounds more like a case where you get a faster sample rate when using the 6602's clock.

2. What are you specifying as the sample clock rate in your call to DAQmx Timing?

3. Have you verified that the actual output rate is identical for the case where you use the 6602's "20 MHz Timebase" and the case where you use the 6534's "Onboard Clock?"  When you use the "Onboard Clock" setting, I'm pretty sure the driver will try to divide down the internal clock to produce the sample clock rate you wired in.  However, when you use the 6602's "20 MHz Timebase" setting, I'm not sure it does the same thing, and I'm not near a system where I can check.  I *DO* know that if I specify a generic terminal like "PFI 4" as my Sample Clock Source, then the "rate" input doesn't seem to do anything at all (though it insists on being wired).  In such a case, I get one sample per active edge on PFI 4.

Perhaps when you specify the 6602's 20 MHz Timebase, it samples on every active edge, making a 20 MHz actual sample rate regardless of what you wire to the rate input?  Try wiring in a super-slow rate so you can easily tell whether it really tries to divide down to that rate or whether it simply tries to output at 20 MHz.

-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 2 of 8
(5,064 Views)
Hello Ampm,

Seems like you are trying to generate at that speed, and definitely your computer cannot write fast enought. For the 6534, make sure you write the data before starting and then do not think you can stream 20 MHz data continuously, this would be a perfect task for the new PCIe 6536/7 (www.ni.com/hsdio).

Now a tip for the digitizer. If you look at the digitizers help, the section called "NI PXI-5122/5142 Clocking" you will see that you can only use a RTSI line to PLL to an external clock. To can see what external clocks you can use by looking at the section "Features Supported by SMC-Based Devices".
I would use the function "Clocking:Reference (Input) Clock Source" to configure this, and then use the rate what you want. This clock will be sync with the 6602 one.
Hope this helps moving forward,

Gerardo O.
RF SW Engineering R&D
National Instruments
0 Kudos
Message 3 of 8
(5,062 Views)
Thank you very much, Kevin!
The output rate in the case of "20 MHz Timebase" is 20MHz indeed. This explains the reason for the error message.
Now I am wondering if there is any other way to phase lock Onboard clock of the 6534 board to the 20 MHz clock of the 6602.....

0 Kudos
Message 4 of 8
(5,042 Views)
Hi Gerardo ,
I am not trying to generate at 20MHz. As I wrote in the first post I use much slower output rates.
My question - is there any way to phase lock Onboard clock of the 6534 board to the 20MHz clock of the 6602?

"NI PXI-5122/5142 Clocking" says:
"""The NI PXI-5122/5142 can accept a reference clock from its front panel (CLK IN) as well as from PXI_CLK10. This reference clock can be any frequency from 1 MHz to 20 MHz (in 1 MHz increments) if it is provided to CLK IN. The PXI_CLK10 is always a 10 MHz clock."""
So it means that Digitizer can only be synchronized with 20 MHz clock of 6602 via CLK IN input, am I right?

Message Edited by ampm on 12-18-2006 04:14 PM

0 Kudos
Message 5 of 8
(5,045 Views)
Hi Ampm,


Thank you for stating your point again:
- No, the 6534 cannot PLL to a 20 MHz clock (almost none of our PLL can lock into that frequency directly) and you can only use it as the primary clock source for this device.
- No, the 5122 cannot PLL to this same 20 MHz clock. You could export the 20 MHz clock into PXI_Star and use it as your reference clock in PXI-5122 (no PLL) or use the PXI internal 10 MHz as the device reference clock.

As an alternative, you can PLL all your devices (including 6602) to the PXI 10 MHz clock. This will make all devices been sync to a single source which is as accurate as your 6602.
Hope this give more insight about the functionality,


Gerardo O.
RF SW Engineering R&D
National Instruments
0 Kudos
Message 6 of 8
(5,022 Views)

Hi Gerardo

Thanks for your reply!
Can you please answer several (simple/stupid) questions?

""" - No, the 6534 cannot PLL to a 20 MHz clock (almost none of our PLL can lock into that frequency directly) and you can only use it as the primary clock source for this device."""
Does the "primary clock" = Sample Clock?
As I see on practice the only sample rate I can get with 6534 when I use the 20 MHz clock of the 6602 as the Sample Clock for 6534 is 20 MHz, i.e. 6534 does not divide this clock to get lower sample rate. Is it a supposed behavior or there is a way to get the lower sample rate?

"""- No, the 5122 cannot PLL to this same 20 MHz clock. You could export the 20 MHz clock into PXI_Star and use it as your reference clock in PXI-5122 (no PLL) or use the PXI internal 10 MHz as the device reference clock."""
My 6602 board is in PXI slot 2 which (as I understand) is a "Star" slot.
As I understand PXI_Star = PXI_Trig6.
But in LabView I can not choose 6602/PXI_Trig6 as the "output terminal" in the "DAQmx Connect Terminals" vi to export the 20 MHz clock of the 6602 to it.
Should I choose 5122/PXI_Trig6 instead or "export the 20 MHz clock into PXI_Star" should be done by some other way?
In "niScope Configure Clock" vi I can not choose "PXI_Star" as the source of the reference clock. So I am a little bit confused how can I "export the 20 MHz clock into PXI_Star and use it as your reference clock in PXI-5122"....

Thanks for your help!

0 Kudos
Message 7 of 8
(5,014 Views)

Hi Ampm,

The two answers are related to each of the answers:

1) In this knowledgebase we can see that actually the 6602 cannot export his clock into PXI_Star. Since your digitizer cannot received but from this line, we need to find a different solution (see below).

2) PXI_Star is actually a signal and should be named something like this “/Slot5/PXI_Star”. Make sure you PXI chassis is configured in MAX.

There are two possible approaches:

1)      I would suggest to PLL all clocks to the PXI 10 MHz clock. This takes full advantage of the hardware you have.

2)      Export the 6602 20 MHz clock on a front panel PFI line and externally connect it to the CLK IN of the 5122.

 

Good luck,

Gerardo O.
RF SW Engineering R&D
National Instruments
0 Kudos
Message 8 of 8
(4,980 Views)