Hello!
I'm trying to write a dynamic application where the user can control which sub-vis get selected to run in parallel. The problem I am having is that each sub-vi has it's own never ending while-loop, and that the execution of the first one prevents the execution of others. See the example attached.
Now I know at first glance you may say, "Why use the for-loop? Why not just have the two knobs control seperate conditional statements instead of an array that controls a single conditional inside a for-loop?" The answer to that is because in my application, the size of the Control array that spawn sub-vis gets selected by them also!* So I'm trying to take advantage of the for-loop's auto-indexing ability to spawn as many sub-vi instances as there are knobs in the Control array.
An alternative I thought of was to simply execute all the sub-vi's, and have the Control array simply select the correct outputs (outputs not demonstrated in the example attached), but I am running this in Real-Time on a FieldPoint unit, and the processor overhead of running all the sub-vi's that are not necessary will hurt my performance.
If you can understand the problem I am presenting (I may not be completely clear) and have a better way to spawn sub-vi's with internal while loops controlled by an array , I'd appreciate your help!
Thank You
*I'm doing this because the job I am working on will need to be modifiable after my contract is over, and the potential of expansion after I am gone is highly desired my my employer. Sure, I'd rather be rehired to change the code everytime changes are needed, but that's obvously not the best solution for my employer.