LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Flowmeter NPN Output

Hi,

 

Could I ask for some help, I'm getting bogged down in a simple DAQ VI. I am using a flowmeter outputting a series of NPN pulses through the counter line on my USB-6501. I have set the DAQ Assistant within a For Loop that counts the pulses within each iteration but naturally after each iteration the count resets to zero so

my indicator (gauge in this case) appears erratic despite a steady flow through the meter. How would I go about creating a VI that can output a steady reading on

the indicator but still be senstive to changes in flow? Thank you very much for any help.

 

 

0 Kudos
Message 1 of 5
(4,013 Views)

Hi Evan

 

Thanks for posting.

I've attached a modified version of your code which uses shift registers to remember the value from the previous loop iteration.

Please let me know if this is what you needed, or if you need help understanding what I've done.

 

 

Kind Regards

Chris | Applications Engineer NIUK
0 Kudos
Message 2 of 5
(3,966 Views)

--> Why FOR loop and why noy WHILE loop??

--> Why DAQ assistant, and why not low level DAQmx functions (if you've difficulty using/understanding low level DAQmx functions then after you've configured DAQ assistant, just right click it and select 'Generate NI-DAQmx Code'. As DAQ assistant creates and closes the task everytime it runs, the counter value will be reset to 0, on the other hand if you choose to use low level functions, probably you can create the task once and then read the counts in loop (WHILE loop) and before existing the application you can clear the task.

 

Low Level DAQmx Functions


I am not allergic to Kudos, in fact I love Kudos.

 Make your LabVIEW experience more CONVENIENT.


0 Kudos
Message 3 of 5
(3,960 Views)

Thank you both for your help, but unfortunately both VI's do not seem provide a solution, 

the first VI thanks to Chris using shift registers does output the pulse count per iteration but 

the gauge still returns to zero (erratic gauge). Moderartor1983's solution does not give flow, but a total pulse

count. Sorry moderator1983 I am using DAQ assistant as I am very new to LV and I find it very

easy to use the assistant. Is there a method of acquiring the value after one iteration/reading,

keeping this reading until the next is taken which then replaces the previous. So instead of the output 

showing 0-75-0-100-0-120-0 etc it will show 0-75-100-120, thanks again, very grateful for your

help on this.

0 Kudos
Message 4 of 5
(3,939 Views)

@Evan117 wrote:

Is there a method of acquiring the value after one iteration/reading, keeping this reading until the next is taken which then replaces the previous. So instead of the output showing 0-75-0-100-0-120-0 etc it will show 0-75-100-120, thanks again, very grateful for your help on this.


I suppose, with the code that I shared in previous reply, should work for your experimental application and also it should never come to zero (if you can see the pulse counts on the front panel, the pulse rate is really slow)...

Also I would like to mention a 32 bit counter can count up to (2^32)-1 or 4,294,967,295 before it ro....

 


@Evan117 wrote:

Moderartor1983's solution does not give flow, but a total pulse count.


I'm using the same convesion factor what you were using in the VI that you attached. So you should be able to see both, Pulse counts and Flow.

Low Level DAQmx Functions_2


I am not allergic to Kudos, in fact I love Kudos.

 Make your LabVIEW experience more CONVENIENT.


0 Kudos
Message 5 of 5
(3,924 Views)