06-22-2014 10:37 PM
I have a gas meter with a pulse output (or maybe more accurately, a contact closure) for every cubic foot put through the meter. The tricky part is that the closure length varies in duration as the flow of gas increases.
I am sucessfully measuring the total gas volume used in a "run" by using a shift register to compare a change (either closed or open) and divide the total changes by two. However I'd like to record the elapsed time it takes for each cubic foot to pass through the meter and putput that to the screen. This number must only update when each cubic foot passes through the meter. This would be simple if there was just one pulse, or even two a set amout apart, but I'm having trouble with the irregularity.
It doesn't matter if the elapsed time timer starts on the rising edge or the falling edge as long as it starts and ends the same place and the reciprocal of that number is then displayed on the screen.
My current control loop is a timed loop iterating at 250ms on a cRIO 9072.
Any advice on how to implement/display this would be great!
Solved! Go to Solution.
06-23-2014 03:32 AM