07-12-2017 02:50 AM
I have a process chain where each process is a SubVI, and a main VI calls them one after one via open VI reverence -> Method "Run VI" (I don't know the exact english names)
This works great, since I can easily add new steps or change the order of steps.
However, during development it often happens that a SubVI is not executable e.g. due to an open connection. And it is a bit nasty to find this out while running the (time consuming) process chain.
I already check if the SubVI files exist, but is there a way to check if they are executable without actually executing them?
This example DOES EXECUTE the VIs, if possible:
Solved! Go to Solution.
07-12-2017 02:55 AM - edited 07-12-2017 02:58 AM
Hi Sebastian,
create a new VI called "VI Tree.vi" in your project.
Drag&Drop all of your "subVIs" into this VI.
When the "VI Tree" is executable all of your subVIs are executable.
Do this ALWAYS before distributing your code.
As a responsible programmer you do only distribute tested code, don't you?
Btw. there is a property "Execution.State" (deutsch: "Ausführung.Status") of the VI. This one says "bad" when the VI is not executable…
07-12-2017 03:36 AM
Hi Gerd!
Well, the VI Tree has the disadvantage that the developer has to remember to add every single independent VI, and it is easy to forget one. Plus, who has a look at that VI Tree each time he touched one of the SubVIs? Maybe before deployment, but while development?
But in general I of course make VI Trees, since they also give a neat overview of a library etc.
However, the Execution.Status does the trick, and in principle, one could create a test tool checking every single VI in a directory. Thanks for that!
07-12-2017 03:40 AM