Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

External counter timebase when trying out NI sample Meas2EdgeSeparation_BufCont C#

I have a newbie question on measurement of edge separation between two rising edges.


I am trying to configure an external counter timebase to measure the time between the rising edges of two digital signals. The external counter timebase is 10MHz. Is it possible to phase lock this signal so that the internal 80MHz uses this as the reference?

I am using the C# example code from NI, Meas2EdgeSeparation_BufCont

CIChannel cChannel = myTask.CIChannels.CreateTwoEdgeSeparationChannel(
counterComboBox.Text,"",
Convert.ToDouble(minimumTextBox.Text),
Convert.ToDouble(maximumTextBox.Text),
firstEdge, secondEdge, CITwoEdgeSeparationUnits.Seconds);

cChannel.CounterTimebaseSource = "/Dev1/PFI7";
cChannel.CounterTimebaseRate = 10000000;

Is this the correct way to specify the external counter timebase rate?

0 Kudos
Message 1 of 3
(5,784 Views)

GPS_user, 

 

That looks correct for specifying the external counter timebase.  As far as using a phase lock loop, the actual programming techniques required to synchronize the sample clocks of multiple boards through a phase-locked loop depends on the type of hardware in use.  What devices are you using?

For more information, see this link: http://digital.ni.com/public.nsf/allkb/07BC8D77D4E9AE258625708B007CE74F

 

Patrick W.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 3
(5,761 Views)

Currently we have setup 6602 as mentioned in the forum posting below

 

http://forums.ni.com/t5/Counter-Timer/6602-external-reference-what-pin-to-connect-to/td-p/224354

 

It appears that even if we do this, the counter measurements between 2 rising edges always seem to use

the internal timebase because irrespective of whether the 10Mhz ref was ‘Running’ in Measurement explorer,

we always got valid results.

 

How to tell whether the counter is using the external time base and not the internal?

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