Hi Michael, > Well I'm not arguing the idea of eliminating multiple loops.
Sorry. It seemed to me like that, and I just wouldn't see how you can write a decent app without. > I definitely use the concept in every app I write. I'm stating that > parallel processes shouldn't necessarily be tied to the main > user interface VI by being contained on the diagram of that > VI. Yes, it is comforting to "see" your code in the main menu but > it is easier for me to debug parallel code when it is not linked to > a caller. That easier is only applicable if you don't debug indeed. My applications nowadays usually have one or two main loops and sometimes an embedded UI loop in the main loop to allow for application restart without shutting down. The rest is in subVIs which might be invoked dynamically or not. > Let's not forget that this thread is trying to solve a problem of launching > a VI so it is non-blocking. I really don't see the big deal with dynamic > calls. Me neither I'm using it all the time either by reference for plug-in architectures or tasks as independent running top level VIs. > I guess the phrase "VI Server" conjures-up images of complex code to > perform a simple task. I think the parallel loop ideas with occurrences and > such sound more involved to me (even though I've used them myself). Usually the occurrence stuff can be quite easily hidden away in a more or less generic functional global which also does the task intercommunication. It can get a little tricky at times as the application develops but the same applies with queues or functional globals used to communicate between the different task VIs, so no big difference there. > Honestly, is this code scary?: > <http://lavausergroup.org/labviewimages/dynamicrun.gif> :-) > That's really all you need. Well, you conveniently forget that you usually need to have some means of communicating with this task through queues or in my case more often functional globals. Not much to do about that and no matter how you do it dynamic or not this remains the same, so it is not a drawback of your method but one of using parallel tasks in general, but the benefits can make the difference between a user friendly, safe and easy to use application or a thing not even the programmer himself can use after a few months. The only issue I have with dynamic VIs is that I have managed to get them into a state where they were remaining running in the background while anything in LabVIEW was gone. The only way to get out of this if you don't know which VI blocks and which functional global or whatever you need to load and tickle to abort that task, is to ctrl-alt-del. Rolf Kalbermatter CIT Engineering Nederland BV tel: +31 (070) 415 9190 Treubstraat 7H fax: +31 (070) 415 9191 2288 EG Rijswijk http://www.citengineering.com Netherlands mailto:[EMAIL PROTECTED]
