Quantcast
Channel: Counter/Timer topics
Viewing all articles
Browse latest Browse all 1271

Determine phase difference using PCI6602 NI Card with NIDAQmx Driver in C language

$
0
0

Hello everyone,

I have 2 frequencies. I want to determine its phase difference and want to check who is leading or lagging among both. For that, I am using PCI6602 NI Card with NIDAQmx driver and writing a code in c language. I have created two tasks and two counter channels for both the counters. I am counting pulses with the help of counters within certain time and then comparing its count value. But it is not giving proper output(eg. if I have frequency A and frequency B as input then output is sometimes 'A is leading' and sometimes 'B is leading') as I am unable to start both counters at the same time. How can I start both counters at the same time? Or Is there any other solution to determine who is leading among two frequencies? 

Thank You.


Viewing all articles
Browse latest Browse all 1271

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>