01-18-2014 07:03 AM - edited 01-18-2014 07:08 AM
Hi,
I am working on developing a Flow Meter VI, I am using a flow meter with a pelton wheen that outputs a stream of pulses in proportion to flow.
The flow meter output is attached to the counter line of my 6501, and the pulse count is multiplied by 1.41 (per datasheet) to give ml.
I have the attached VI but not sure exactly what it is doing, would someone mind explaining how it works and how it could be optimised, thanks.
Regards,
Ger
01-21-2014 05:20 AM
Hi Ger,
Looking at the VI it seems to be just acquiring some data off of your 6501 card, and just edge counting the number of pulses received and then processing the data to give the result of flow. It seems fairly simple in terms of what it is doing, but there are a few optimisations I can reccomend to you. In your VI there is an unused shift register in the first for loop which I would reccomend removing as it doesn't seem to be strictly necessary. In the second for loop, there is an uninitialised shift register, and I would reccomend that you initialise that with a suitable value unless you specifically need it, as otherwise it will just use the default value of the data type, which in this case is 0.
Another optimisation you could use is replacing the DAQ assistant with DAQmx functionality however considering how simple this code is currently, the DAQ Assistant should not cause a problem, however if you wish to expand it in the future I would reccomend looking into using the lower level DAQmx VI's.
Best Regards,
James Kent
02-20-2014 07:23 AM
in your program you have that the pulse count is multiplied by 1.41 and that the 1.4 came from the data sheet this will sound stupid but where abouts i couldn't see it? i am doing a simlar program?