I'm using an external DLL that freezes sometimes and blocks all my LV application. I would like to generate a timeout to stop the DLL if it takes too long to send an answer to LV. I do not have access to the DLL code, so I would have to implement this in the caller VI. I cannot simply abort the execution because I need to alert the user that something gone wrong.
The unique solution I could imagine is:
1) Generate timeout;
2) Start error procedure (close files, send email alert, etc);
3) Abort execution.
Aborting execution can generate several errors and let the system unstable so it would be really nice to stop only the Call Library node or just the subVI that calls the DLL. Is it possible? Does anyone have other suggestion?
Message Edité par Rasputin le 10-13-2006 08:51 AM
I was wondering if there is a better way to do this in LabVIEW 2011. The original post was from 2006 and LV7.1 was mentioned. I am having the same issue and was wondering if there was another method besides creating a seperate exe to wrap the dll call.
All of the above comments are still relevant. There have been no changes in LabVIEW that would allow you to abort a call to a DLL.
I've made somewhat of a workaround; using the Application Control functions, I use my main VI to run a separate VI (make sure Wait Until Done is false). The main via writes some data to a file, starts the new VI (which runs the DLL function), and waits for 3 seconds for a response file to be written. If it doesn't find the response file within that time, it force closes the separate VI. There's probably a better way to communicate data from one VI to another, but writing files was easy for me to whip together.