High-Speed Digitizers

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I set the Sample-Clock-Multiplexer of PCI 5122 to use the external sample clock (CLK IN) in NI-SCOPE?

hey,

I am programming with Labview 2012, NI-SCOPE, PCI 5122 card.

 

Now, in http://zone.ni.com/reference/en-XX/help/370592E-01/digitizers/5122-5124pci_clocking/ 

there is the sample clock multiplexer which selects between internal and external sample clock.

So it should be possible for me to use the external CLK IN signal as sample clock. 

 

The exernal clock example programm for the PCI 5122 card does not use the external clock (CLK IN) as sample clock because

1. When I provide an 80 MHz external TTL signal, I can still specify higher sample rates (e.g. 100 MHz)

2. In fact, the programm uses the external clock just as Timebase for the internal clock

 

How can I use the provided external sample clock?

In particular, I do not want to specify a sampling rate, since this is fixed by the external clock! 

0 Kudos
Message 1 of 4
(8,341 Views)

You should use the niScope EX External Clocking.vi example that shipped with the niScope driver.  

 

The Sample Clock Timebase Source is the property you use to specify where the timebase (clock) should come from, by default the example I mentioned will set it to CLK IN. 

 

You are correct that the sampling rate is fixed by the external clock, but the 5122 does not detect or verify the frequency of the external clock you provide The driver needs to know what the clock frequency is to provide an accurate xIncrement value, that is why you must specify the Sample Clock Timebase Rate.  In the example this is the Rate field.  Yes, you can specify a rate that is different from the actual rate of the external sample clock but doing so will give you inaccurate results because you configured the driver incorrectly.

 

Hope that helps.

0 Kudos
Message 2 of 4
(8,334 Views)

In my case I do not know the accurate external sample rate. 

 

There will be always an error of at least plusminus 1 Hz. To what accuracy do I have to provide the external sampling rate?

 

What exactly is the xIncrement value? I do not see it in the following figure

http://zone.ni.com/reference/en-XX/help/370592E-01/digitizers/5122-5124pci_clocking/

0 Kudos
Message 3 of 4
(8,331 Views)

What exactly is the xIncrement value? I do not see it in the following figure


If you unbundle a waveform that is read back from the niScope Read or niScope Fetch functions, you will see the xIncrement value.  It is not information that is easy to show on that diagram.  It is the inverse of the sample clock rate (i.e. the sample clock period.)

niScope Read (poly)

http://zone.ni.com/reference/en-XX/help/370592E-01/scopevi/niscope_read_poly/

 

To what accuracy do I have to provide the external sampling rate?

There will be always an error of at least plusminus 1 Hz

As far as the driver is concerned, accuracy of the number given is not relevant - as Stephen mentioned, it's used to determine the xIncrement value.  Your only concern is whether the calculations or results you draw based on the data the digitizer returns will be affected by the +/- 1Hz error.


You said the error is at least +/- 1Hz.  Do you know what your maximum error will be?

The hardware itself does not have a specified accuracy need (as per the 5122 specifications - there is only a duty cycle tolerance specified)  However, I don't foresee a variation of +/- 1Hz to be an issue at high sampling rates around 100MHz.  The reason I say this is because the onboard clock (internal VCXO) has a specified timebase accuracy of +/- 25ppm (+/- 25 parts per million, which at 100MHz is +/- 2,500Hz or +/- 2.5kHz) when not locked to a reference clock.  If your external sample clock is at least as accurate as 25 ppm, then the digitizer hardware should respond as expected.

 

-Andrew

National Instruments
0 Kudos
Message 4 of 4
(8,262 Views)