11-21-2012 02:21 PM
My VI is working as a motion sensor. Each time the motion sensor is activated, the LED comes on, and a beep sounds (a switch is acting as my motion sensor). Once all the LEDs are activated, the system reset is supposed to light up, and then the other three LEDs turn back off waiting to be activiated once again. On my attachment saved as "sensor project," I have the VI working with the DAQ by implementing a random number case, and the VI works here to give a demonstration of the outcome I am trying to work towards. Any information would be greatly appreciated.
Solved! Go to Solution.
11-21-2012 02:22 PM
This is the VI without the DAQ
11-21-2012 02:53 PM
You have some logic and dataflow issues.
Once all three sensor loops stop, all the outputs are necessarily true, so the compound node and case structure in the following (reset) loop is unecessary. Because the termination boolean in the fourth loop is immediately true, the loop will stop and not care about the state of the reset button. Maybe you should wire the termination condition to the wire going to the system reset indicator instead. Since this is also a polling loop, it needs a small wait. Once reset is pressed, the VI completes and stops. (Don't use the continuous run mode!).
Solution: Create a state machine with one single outer loop. You have 4x too much code!
11-21-2012 03:27 PM
Thanks for your help. Before I read your post I was able to get everything working. I found that the DAQ in the true portion of the case structure was unnecessary so I deleted it, while leaving it on the false side. I have attached the working version of it below. Thanks again
11-21-2012 03:40 PM