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

Counting Edges and Frequency from the Same Measurement Device

$
0
0

Hi, I have a LED open collector tied to my gas meter that sends out pulses as my gas meter dial turns. I then convert the number of pulses into a gas reading. This gives me the total amount of gas that I have used, but I also need to measure the frequency of the pulses to determine a gas flow rate. I am running at a very low firing rate so my frequency from the open collector is very low (less than 1 Hz).

 

I am using a cDAQ-9178 with a NI-9401 module inserted into slot 8. The open collector sends pulses of 5VDC, and I am putting the 5V+ wire into terminal 14 and the 5V- wire into terminal 1. I am also counting pulses on a WattNode Pulse meter for my power draw. It sends out pulses of 5VDC, and  those wires are inserted into 16 (+) and 3 (-) of the 9401 module. If I only set up my code to count the number of pulses for each measuring device then everything works fine. Once I try and also measure the frequency of the open collector I run into issues.

 

I was initially trying to read my frequency from the same physical channel, but that didn't seem to work because the counter was first in line and hogging up the resources for the frequency signal. My next step was to daisy chain the signal from the open collector in terminals 14 and 1 to 17 and 4. After doing this I couldn't read a signal at all, edge counting or frequency. So now I am asking for guidance here. When I tried daisy chaining the wires I used ctrl0 & PFI0 for my counter and ctrl2 & PFI2 for my frequency measurement. 


Viewing all articles
Browse latest Browse all 1271

Trending Articles



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