09-11-2006 10:54 AM
Well....
Humm....
With reference to the block diagram that you posted earlier, the "Query Inputed Devices.vi" doesn't do anything.
You could use the info from the input device to select from the case statement..
I'll do an example and post it..
back in a minute..
RayR
09-11-2006 11:06 AM
09-11-2006 11:29 AM
09-11-2006 11:29 AM
The easiest way to discover what is going on with respect to dataflow is to run the VI using execution highlighting while watching the diagram. Wires are NOT like their electric equivalent.
Throwing the switch at any random time during execution will NOT switch the wire state and everything that is connected to it. Everything occurs strictly by dataflow. The switch terminal is read once it gets its turn in the outer loop and its values is fed to the input tunnel of the next structure. The value of that tunnel will only change next time the terminal is read again, which only occurs once the outer loop recycles.
In your particular case, the switch control is never read while the inner loop is running. You are painting yourself into a corner. Typically, you should place controls in the innermost loop.
Simple things like that are easiest done with an event structure.
Also don't forget to place a small wait (e.g. 10ms) in the inner loop. It is not nice to all other processes to hog 100% of the CPU by spinning a trivial loop millions of times per second.
09-11-2006 12:45 PM
09-11-2006 12:59 PM
Thanks Altenbach for the detailed description.
You deserve 5 ***** for the info, buddy..
Yep.. I should have added the delay in the example... 🙂