Jump to content

As of July 17, 2015, the LabJack forums here at forums.labjack.com are shut down. New registrations, topics, and replies are disabled. All forums are in a read-only state for archive purposes.

Please visit our current forums at labjack.com/forums to view and make new posts. To post on the current forums, use your labjack.com login account. Your old LabJack forums login credentials have been retired. There are no longer separate logins for labjack.com and LabJack forums.


2 timers for long intervals plus 2 counters

  • Please log in to reply
2 replies to this topic

#1 tamm

  • Members
  • 4 posts

Posted 23 November 2013 - 03:02 PM

I have an application where I need to measure 2 gas flows with flow meters giving pulses for a certain gas quantity. These pulses can be quite seldom (one per hour or even less) if the gas flow is low.

Also, I need to measure the rpm of 2 motors, where the pulses are much faster (several per second).

Since the gas flow meters have an error that depends on the flow rate, I would like to use a timer to measure the time between the last 2 pulses and in DAQFactory compute the corresponding flow rate.

Now, my question concerns the timer clock and divisor settings. As I understand, using a divisor clock setting, counter0 will become unavailable (which is, by the way, not very clear from the manual). Since I need 2 timers and 2 counters, I will hence need to use a clock without divisor. But then, the lowest frequency i found would be 4 MHz. With a 32 bit timer, this gives a maximum time between overflows of 1074 seconds or 18 minutes, which is not enough in my application.

Is there any way of handling the 4 signals with one U3? Or would the only solution be the use of two units?


Any suggestions are appreaciated!

#2 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 25 November 2013 - 04:48 AM

The U3 does not handle such lage times very well. If the minimum pulse width is lager enough you could use stream mode to sample the IO at up to 50 kHz and software process the data to find the values that you are looking for. Other than that I don't think the U3 can fulfill all of your requirements simultaneously.

#3 tamm

  • Members
  • 4 posts

Posted 25 November 2013 - 01:14 PM

Thank you for the answer!

In the meantime, anyhow, I have found a way which permits me acquiring all the four channels with one U3. For the two rpm signal, I will be using the 2 counters, querying them with an interval large enough to get the required resolution (probably approx every 5 seconds).

Then, for the two flow meter signals, I will be using the timers in the Firmware Counter (With Debounce)-mode, so they will show me the acumulated number of tilts from the flow meters. If I now query this channel quite often, say 10 times per second, I will be seeing when I get a new pulse with good resolution and can store this event in a separate virtual channel in DAQFactory. Then, to get the flow rate, I just can look at the time between two events in the virtual channel.

I got this idea shortly after having posted my question, but unfortunately could not edit it because it had not yet been published.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users