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.


Photo

Flow Meter With Pulse Input


  • Please log in to reply
5 replies to this topic

#1 u3cool

u3cool
  • Members
  • 18 posts

Posted 21 April 2014 - 09:25 PM

I would like to use the flow meter at this link with a U6:

 

http://www.proteusin...00/PV6000SG.pdf

 

I would like to use the meter with the pulse square wave output option to reduce costs.  The U6 currently has ten 4-20 ma analog inputs and one DI (0/1).  With the flow meter application, 6 DOs would be added.  I'm using the U6 with DAQ Factory Lite. 

 

I haven't had any experience with programming pulse inputs.  The meter has an output frequency of 24 to 382 Hz.  Would there be any problems using the meter with a pulse output with the U6 and DAQ Factory Lite?

 

From an accuracy or programing standport does pulse output have advantages over analog output?

 

In reading the DAQFactory - LabJack Application Guide, it looks like I would need to use streaming since the output refrequency is >100 Hz.  The meter I would be getting has a flow range of 0.48 to 8.5 gpm.  Would each count then be equal to about 0.022402 gpm (8.02 gpm range / 358 Hz range)?  If so, would I then just set up a conversion to mutiply the inputs by 0.022402 to get gpm?

 

If I used streaming for this meter, would it adversely affect the acquistion of the analog inputs?



#2 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 22 April 2014 - 07:17 AM

On the specs you linked I don't see anything about the voltage levels of the square wave output.  I assume the low is driven near 0 and the high is driven near the supply voltage?  If you are powering the sensor with 5 volts, that should be good, but I don't see a spec about how much current the sensor needs?

 

There are various ways to measure frequency:

 

https://forums.labja...?showtopic=1105

 

I suggest you try using a period measurement timer:

 

http://labjack.com/s...s-guide/2.9.1.3

 

First try it in the Test panel in LJControlPanel.  If that works, then go to Config Defaults in LJCP and make your desired timer configuration the power-up default, and then in DAQFactory you just need to read the timer value.



#3 u3cool

u3cool
  • Members
  • 18 posts

Posted 01 May 2014 - 09:59 AM

The voltage levels are 0-5.  Can you provide more input on how exactly to do the timer set up.  The U6 has four timers.  For each timer there are 13 modes.  Which mode would I use?  In DAQ Factory under the channel setup, one of the I/O choices is Timer.  I assume I would select that.  Would the channel number then be the ID number of the timer that was being used or would it be the IO channel I was bringing the input into (FIO0)?  Would the ground side of the meter be connected to SGND through a 100 ohm resistor or to a GND terminal?



#4 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 05 May 2014 - 04:55 PM

Looks like you connect VS to pin 1, GND to pin 4, and FIO0 to pin 3.

 

I suggest you use the 32-bit period measurement mode:

 

http://labjack.com/s...s-guide/2.9.1.3

 

The default 48 MHz clock is fine, and the default pinoffset of 0 will put 1 timer on FIO0.  First try it in the Test panel in LJControlPanel.  If that works, then go to Config Defaults in LJCP and make your desired timer configuration the power-up default, then power cycle the U6, and then in DAQFactory you just need to read the timer value.  Use channel number 0 for Timer0, regardless of where it appears on the U6.



#5 u3cool

u3cool
  • Members
  • 18 posts

Posted 12 May 2014 - 12:22 AM

The described approach worked except that with 48 MHz the input read a constant large value even with flow.  A clock value of 4 MHz and lower worked.  I ended up using 4 MHz.  The other thing I found was that first I used the FIO0 on the CB37 board.  I got no readings and a timer sharing conflict in DAQ Factory.  When I connected the meter to FIO0 on the U6 it worked.  The output I understand I'm seeing in DAQ Factory with the timer mode of 32-bit period measurement is the number of clock cycles between rising edges.  The meter frequency then is the clock value divided by the number of clock cycles.  Is that correct?  Right now I'm using a 1-second timing for the DAQ Factory channel.  Would accuracy be increased if the channel timing was set at 0.1 or 0.01 seconds?



#6 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 12 May 2014 - 11:32 AM

 

 

The described approach worked except that with 48 MHz the input read a constant large value even with flow.  A clock value of 4 MHz and lower worked.  I ended up using 4 MHz.

 

Must have been or is something else going on, as 48 MHz should work fine for 24 to 382 Hz.  Let us know if you want to troubleshoot more.

 

 

 

 

The other thing I found was that first I used the FIO0 on the CB37 board.  I got no readings and a timer sharing conflict in DAQ Factory.  When I connected the meter to FIO0 on the U6 it worked.

 

That does not make sense as the U6 does not know where you are connecting to FIO0.  Those 2 locations are the same thing.  Again must have been something else going on that we can help you with if you can reproduce the problem.

 

 

 

 

The output I understand I'm seeing in DAQ Factory with the timer mode of 32-bit period measurement is the number of clock cycles between rising edges.  The meter frequency then is the clock value divided by the number of clock cycles.  Is that correct?

 

Correct.

 

If you want a test frequency, enable a 2nd timer in PWM16 mode with timer value = 32768.  If your base clock is 4M and your divisor is 1, the frequency of the PWM output will be 4M/65536 = 61 Hz.

 

http://labjack.com/s...s-guide/2.9.1.1

 

 

Right now I'm using a 1-second timing for the DAQ Factory channel.  Would accuracy be increased if the channel timing was set at 0.1 or 0.01 seconds?

 

 

No, that has no effect on accuracy.  The U6 is taking measurements of every cycle and updating the timer value each time it has a new measurement.  If the frequency is 24 Hz, the timer value will be updated 24 times per second, so if you read the timer value 100 times per second not every read will have a new value.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users