03-11-2015 12:14 PM - edited 03-11-2015 12:15 PM
Hello,
I am currently trying to run a program where I continuously take measurements from an optical sensor, which detects the flow of liquids in a tube. When liquids of a certain refractive index flow through, the signal is blocked and should drop below whatever I set my threshold to and triggers my case structure, wherein all the valves are switched so the system can be cleaned out and then the valves are switched back. Unfortunately, as it runs now, the program stops taking measurements from the sensor as soon as it enters the case structure and only restarts after finishing that. This doesn't leave enough time for the signal to the program to catch up and the case structure is immediately triggered again.
1. How would I go about having my program continue to read and output values from the sensor to my waveform while in the case structure?
2. If I can't do that, how would I go about adding a time delay after flipping the valves back that gives the system time to place some values so it doesn't immediately trip the case structure again?
Thank you for your time!
03-11-2015 12:34 PM
I can't open your file but i'm guessing this is not what you are doing. Use a producer/consumer architecture pattern. Split the measurement code out into its own loop and use a queue to send it to another loop for processing. There are templates included with Labview to help you get started.