01-14-2010 08:25 AM
I have a nicely stable app that covers almost any contingency or anomaly in operation but one is crawling under my skin. I am using a Tescom ER3000 regulator controller to control a back-pressure regulator on a testing stand.
When all works as it is supposed to, there is never an issues but occasionally my unit under test may fail to activate and when this occurs, the Tescom supplied driver becomes hung, waiting to fulfill the command sent to it. The Tescom driver uses a call library function node to access the various options.
I am trying to figure out a way to put the root call (the call library node function) inside a case structure (not a loop) so that if it reaches a certain time limit, completed or not, it aborts the operation and exits the case.
I have attached the specific vi in question along with the library files (zipped) and the typedef's (zipped) required to run the vi. The actual ER3000 driver may also be required to run and I can upload that as well but it will certainly be larger in size.
Any help with this is appreciated.
Doug
01-14-2010 08:59 AM
The lvlib that you uploaded is just the lvlib container. There are no VIs within that zip file. Not that it really matters in this case, though ...
Once the thread has left LabVIEW and gone into a DLL there's no way to abort it unless the DLL has some sort of aborting mechanism. Trying to abort the calling VI won't work until the DLL call returns. The only surefire way to do this is to run the DLL in a completely independent process - and I mean a full-blown separate process, not a separate VI. This way you can use the OS to abort that process.
I would suggest contacting the developer of the DLL informing them of this situation and asking whether an abort/timeout mechanism can be added to the DLL.
01-14-2010 10:50 AM
01-14-2010 11:45 AM
Thanks for the feedback. As old as the most recent drivers are, I doubt that Tescom will be doing any updates so I guess I will look to see if I can attempt to re-write the serial interface.
Thanks
01-14-2010 02:12 PM
01-15-2010 01:47 PM
As my "C" type programming skills are pretty much non-existant, I may try to find someone local to help me out on this one and in the meantime, find some work-arounds to keep from putting my system into 'stuck' mode.
Thanks