11-03-2010 07:48 AM
Hey,
I'm trying to write a code to measure the flow rate (pulse outputs). I tried using "Wait until next ms Multiple" to control the time of the while loop but for some reason that doesn't seem to work for me. I thought if I could write a code that take a vavle at t=1s then another at t=2s and then use the difference would be the valvue I use to multiply the volume with the hopefully that would work for me. I don't know how to do that 😞
I attached my code if you'd like to take a look at it..
Thanks,
Amir.
11-03-2010 07:50 AM
I suggest you should use state machine architecture.
11-03-2010 07:52 AM
Its an Abb Aquamaster S electromagnetic flowmeter, and I'm using a cole palmer 1280LS DAQ connected to the counter port.
11-04-2010 06:02 PM - edited 11-04-2010 06:06 PM
Hi Amir,
Instead of multiplying your "Set Time" by 1000, try just wiring the constant of 1000 into the Wait Until Next ms Multiple function. Then the loop will iterate once every second. Hope this helps, let us know if you have more questions.
Also, it's usually easier to attach a screenshot of your block diagram, rather than posting the VI itself (in case folks in the community don't have the same version of LabVIEW and can't open it).
11-04-2010 06:29 PM
@Andy H NI wrote:
Also, it's usually easier to attach a screenshot of your block diagram, rather than posting the VI itself (in case folks in the community don't have the same version of LabVIEW and can't open it).
I wouldn't necessarily say that. Usually a VI is better because you can see all of the hidden things you can't see in a screenshot. (e.g. is that string set for normal display or \codes, how is the DAQ assistant configured, how is an option set on the right click menu for the function.) Plus it gives others a chance to play with the code and see what is working right and wrong and be able to suggest new ways of doing.
Best of all would be a snippet so that you get the code and a screenshot.