gustav Posted December 6, 2007 Report Share Posted December 6, 2007 I am having trouble with a built application under labview 7.1 . The problem is that under some circumstance the application doesnt exit properly. Basically, after the application exits there is still a process running until I go into the task manager process list and kill it. This happens if I call the 'Exit labview' VI at the end of the application, or if I close the front panel with an invoke node. If I do not call any of these, when the appliation ends the front panel will still be open but the application not running. If I then close the frontpanel no process is left. I am trying to track down what causes this, main suspicons at the moment are that it is related to either DAQmx or to an externall dll. Does anyone have some knowledge about what could be causing this behaviour? It would be of great help. thanks, gustav Quote Link to comment
gustav Posted December 6, 2007 Author Report Share Posted December 6, 2007 It seems now the problem is related to using a timed loop triggered by a counter output event, see the attached image. As to why this causes the problem I am experiencing I have no idea. It doesnt seem to matter wether the timed loop is triggered by the actual event or not (the loop can also be stopped by a notification). The task used to create the timing source is cleared before the application exits. Anyone has any clue what is going on? Quote Link to comment
TobyD Posted December 6, 2007 Report Share Posted December 6, 2007 QUOTE(gustav @ Dec 5 2007, 04:32 AM) Basically, after the application exits there is still a process running until I go into the task manager process list and kill it. What is the name of the process that is still running? The Quit Labview function should kill all LabVIEW processes, but it won't affect external processes that were launched from LabVIEW. Those need to be handled manually in your program. Quote Link to comment
gustav Posted December 6, 2007 Author Report Share Posted December 6, 2007 QUOTE(TobyD @ Dec 5 2007, 05:20 PM) What is the name of the process that is still running? The Quit Labview function should kill all LabVIEW processes, but it won't affect external processes that were launched from LabVIEW. Those need to be handled manually in your program.Ah, I forgot to mention this, the process that is left behind is the same process that runs the application. It has the same name as the application. So quit labview in this case does not seem to kill all labview processes as it should.Probably I should also add that the process left behind does not seem to use any CPU time at all after the application has exited. Quote Link to comment
venkatesh Posted December 7, 2007 Report Share Posted December 7, 2007 hi i need to access the computer which is in remote.how do i need to communicate.plz help in doing so Rgds J.Venkatesh Quote Link to comment
Rolf Kalbermatter Posted December 8, 2007 Report Share Posted December 8, 2007 QUOTE(gustav @ Dec 5 2007, 12:43 PM) Ah, I forgot to mention this, the process that is left behind is the same process that runs the application. It has the same name as the application. So quit labview in this case does not seem to kill all labview processes as it should.Probably I should also add that the process left behind does not seem to use any CPU time at all after the application has exited. The timed loop apparently calls into external DLLs. Somehow and somewhere that external code does not properly get informed about the shutdown so the process hangs on the exit callback of that external DLL, most probably. I haven't used the timed loop very much but I think this is one thing that has happened to me too in the past, including in the development environment. Asynchronous external code is tricky in LabVIEW, even for the creators of LabVIEW :-) Rolf Kalbermatter Quote Link to comment
gustav Posted December 8, 2007 Author Report Share Posted December 8, 2007 QUOTE(rolfk @ Dec 7 2007, 02:03 PM) The timed loop apparently calls into external DLLs. Somehow and somewhere that external code does not properly get informed about the shutdown so the process hangs on the exit callback of that external DLL, most probably. I haven't used the timed loop very much but I think this is one thing that has happened to me too in the past, including in the development environment.Thanks, yeah, that seems to be the case. After fiddling around a bit my guess is that the timed loop requires some kind of clean up code to be ran when the VI gets unloaded, but this is not done properly if calling the 'Quit Labview' function (or if calling FP close) . It seems I found a workaround by having the main VI use an invoke node for calling a dynamically loaded VI that calls the 'Quit labview' , with 'Wait until done' set to false. I guess this causes the main VI to unload properly and clean up the timed loop before the dynamically loaded VI calls 'Quit labview' . This is of course just guessing, so if anyone has any comments on this it would be interesting to hear it .I should add that it was also necessary to add a delay in the dynamically loaded VI before calling Quit labview. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.