10-14-2008 01:02 PM
Take a look at this program and let me know if it does what you want it to do. You may have to relink the State Enum.ctl.
Regards
10-14-2008 03:49 PM
10-14-2008 04:15 PM
On 1st attempt.
1. Writing a new value to a local variable does not generate an event that the event structure can detect. It only detects button presses, or writing a value to the property node Val(Signalling).
2. Your inner while loop containing the event structure never stops because you have a False wired to the stop terminal. Thus the subVI will never execute because it will be waiting for its inputs to come from the inner while loop that never ends unless you abort the VI.
On 2nd attempt.
I suspect something about your subVI. You say the right loop only executes once. What is happening in the subVI? Does it ever end so that the code inside the loop can complete then begin its next iteration?
Overall, I suspect you don't quite get the concept of dataflow. Code won't execute until all of the inputs going to it are available. A loop won't end until all of the code inside of it has executed.
10-14-2008 04:45 PM
10-14-2008 05:59 PM
aeroomega-
Are you still having issues with your code? The examples posted by jmcbee appeared to be what you needed. Data flow is difficult to grasp at first but once you get it down, it's really easy. I always think of it as text-based. You can use something unless you declare it (initialization) and you can't make things function together unless you tell them too (wiring).