LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Pulse count - Flow Meter

Looking to for help to count the pulses in a while loop, any suggestions? 

 

The signal seems reasonable, I just can't figure out the logic and would appreciate a push in the right direction.

Download All
0 Kudos
Message 1 of 9
(2,260 Views)

You didn't mention the HW you're using to count pulses and did not share any code that you already have to provide any sort of help.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 2 of 9
(2,247 Views)
  • What does counting pulses have to do with a while loop?
  • What is the signal (voltage? light?, etc.)
  • Do you want to keep count as new pulses arrive or process an existing waveform?
  • Are you using a plain analog input? A counter?
  • What are your time units?
  • What is the typical width of a pulse? A nanosecond? A second?
  • Do you need the count for derived units, e.g. display of RPM?
  • Are you interested in the total count or counts per time unit?
  • ... so many questions!
0 Kudos
Message 3 of 9
(2,241 Views)

Hi Santhosh,

 

I’m using a Keyence FD-Q flow meter:

 

https://www.movetec.fi/images/pdf/AS_79677_FD-Q_C_600I65_GB_WW_1058-3.pdf

 

I have no code, all I’ve done is wired in the sensor to the DAQ. I’ve just plotted the signal for reference. I’ll take a snap shot on Monday - however all you’re seeing is a AI channel in a loop recording the test signals. 

0 Kudos
Message 4 of 9
(2,225 Views)

Hi Altenbach,

 

  • What is the signal = voltage
  • Do you want to keep count as new pulses arrive or process an existing waveform - I’d like to get the total accumulated pulses, I’m trying to track total consumed product where one pulse is 0.5L
  • Are you interested in the total count or counts per time unit? - total count 

I’ll try and answer remaining questions Monday - I appreciate your support. 

0 Kudos
Message 5 of 9
(2,220 Views)

I grabbed an edge counter, how can I increment the value each time the edge rises and falls?

 

The signal is just voltage where the flow meter throws +10V every time it detects 0.5L passing through the system. 

0 Kudos
Message 6 of 9
(2,162 Views)

@JCuneo wrote:

I grabbed an edge counter,. 


I probably would not call that a real edge counter? In what dark corner did you find that?

0 Kudos
Message 7 of 9
(2,150 Views)

Hi JCuneo,

 


@JCuneo wrote:

I grabbed an edge counter, how can I increment the value each time the edge rises and falls?


Where did you "grab" that "edge counter?

 

Why not start with a more simple approach using functions provided by NI?

I count only rising edges in this snippet (that's how flowmeters work in my experience), but you can easily switch to count both edges using the BooleanCrossing function…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 9
(2,138 Views)

You mentioned that you hooked it up to a DAQ but didn't mention the model.

 

If the DAQ has a counter input you can directly use that feature, it accumulates the counts which is what you're trying to achieve.

 

Only concern I have is that the counter input are digital and typically 5V, since your flow meter is 10V you might need to put a resistor divider or an optocoupler to protect the DAQ inputs. 

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 9 of 9
(2,125 Views)