01-30-2006 12:57 PM
01-31-2006 04:32 PM
Could you package the Matlab Script Node code into a subVI and call that subVI dynamically using VI Server? The idea would be that you could poll the error output from the Matlab Script node to see if the Matlab window has been closed, thus closing the link. If it does occur, terminate the dynamic subVI and call it again from the main VI. This should completely emulate "closing and reopening the app."
Here is a link on getting started using VI Server to call VIs dynamically. The Help document references LabVIEW 8, but the process is the same for earlier versions.
01-31-2006 04:49 PM
Here's an example of what I mean. There are two VIs, main VI.vi and Dynamic subVI.vi. Main VI calls Dynamic subVI, which should simulate your script node code, and then polls the error output of the subVI. If the subVI generates a specific error, the main VI automatically relaunches it dynamically.
The example was written in LabVIEW 7.1. Just make sure the VIs are in the same directory when running them. Hope this helps!