LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I measure phase difference between two pulse trains using two counters on multifunction DAQ

Is it possible to use two counters in a DAQ to measure phase difference between two pulse trains? If possible, Which DAQ should I use? Thanks
0 Kudos
Message 1 of 4
(2,922 Views)

If you take a look at the NI Examples there is one named

 

Counter - Read Pulse Width and Frequency (Continuous).vi

 

Browse according to Directery Structure and look at

 

DAQmx>>>Counter Input>>>Counter - Read Pulse Width and Frequency (Continuous).vi

 

 

In that VI, there is a tab for 2 Edge Separation measurement. If you run the VI with this tab selected it will give you the time between edges of the two waveforms.  You wil lthen have to convert the time to a phase (based on the frequency of the two waveforms).  I ran it with ctr0 selected and first and second inputs were PFI8 and PFI9.

Randall Pursley
0 Kudos
Message 2 of 4
(2,897 Views)
Thanks for your reply. Would this vi work with any DAQ w counter? I heard this type of measurement only works with a DAQ counter w/quadrature encoder function. What is the DAQ model# that you are using?
0 Kudos
Message 3 of 4
(2,879 Views)

Hey mchips,

 

If you open up this example from NI Example Finder, you'll see a section called "Requirements" in the bottom right corner of the window.  This lists the DAQ hardware compatible with the highlighted example.

 

Myriam

Applications Engineer

National Instruments

0 Kudos
Message 4 of 4
(2,848 Views)