CIM1
2008-08-08 16:40:17 UTC
This is a hybrid TestStand/CVI question so I am posting it here first...
I have a TestStand 8.1 sequence calling a CVI 8.5 dll. The dll loads .hws digital pattern files from disk. These are normally picked up relative to the path where the dll resides.
However an intermittent problem occurs when the dll is called from TestStand, sometimes the file load fails.
Turns out when the error happens, the path (Current Working Directory?) is being changed from that of the called .dll to that of the TestStand directory (C:\Program Files\National Instruments\TestStand 4.1). Once it goes wrong, it stays wrong in subsequent executions.
I read in the CVI help that when calling File I/O from more than one thread, the OS does not maintain a separate working directory for each thread. Not sure if this is what is going on - can the dll's caller (TestStand) mess with the Current Working Directory that the dll uses?
I am not clear whether this is a TestStand issue or a DLL design issue. TestStand also crashes when I unload all modules after this error condition occurs, suggesting perhaps there is more bad stuff going on "under the covers"...
I should also explain this sequence has a customised process model for use with an Operator Interface but this problem is seen while running from the TestStand sequence editor.
I have a TestStand 8.1 sequence calling a CVI 8.5 dll. The dll loads .hws digital pattern files from disk. These are normally picked up relative to the path where the dll resides.
However an intermittent problem occurs when the dll is called from TestStand, sometimes the file load fails.
Turns out when the error happens, the path (Current Working Directory?) is being changed from that of the called .dll to that of the TestStand directory (C:\Program Files\National Instruments\TestStand 4.1). Once it goes wrong, it stays wrong in subsequent executions.
I read in the CVI help that when calling File I/O from more than one thread, the OS does not maintain a separate working directory for each thread. Not sure if this is what is going on - can the dll's caller (TestStand) mess with the Current Working Directory that the dll uses?
I am not clear whether this is a TestStand issue or a DLL design issue. TestStand also crashes when I unload all modules after this error condition occurs, suggesting perhaps there is more bad stuff going on "under the covers"...
I should also explain this sequence has a customised process model for use with an Operator Interface but this problem is seen while running from the TestStand sequence editor.