02-04-2011 01:11 AM
Solved! Go to Solution.
02-04-2011 03:12 AM
02-04-2011 03:15 AM
02-04-2011 03:59 AM
02-04-2011 04:15 AM
It looks like that the attachments were suppressed too :-(. another try fgrom another PC.
02-08-2011 07:26 AM
Markus,
to my knowledge, one would not start CVI prior to the TestStand Sequence Editor for debugging purposes. CVI is launched automatically when needed. Keeping this in mind, I can imagine that the instrument handle is reset after each step when having an IVI project open in CVI and using CVI parallely to debug a DLL.
So please try the following:
--8<---------------------------
1. Open the sequence file.
2. Complete the following steps to enable the LabWindows/CVI Adapter to execute steps in an external
instance of LabWindows/CVI.
❑ Select Configure»Adapters.
❑ Select the LabWindows/CVI Adapter.
❑ Click Configure.
❑ Enable the Execute Steps in an External Instance of CVI option.
❑ Click OK to close the LabWindows/CVI Adapter Configuration dialog box.
❑ In the Warning dialog box, click OK to unload all modules.
❑ Click Done in the Adapter Configuration dialog box.
3. Place a breakpoint.
❑ Click to the left of one of your CVI code module sequence steps to place a breakpoint at the step.
4. Compile a debuggable DLL.
❑ Select the step with the set breakpoint.
❑ Click Edit Code in the Module tab.
❑ In LabWindows/CVI, select Build»Configuration and verify that Debug is enabled.
❑ Select Build»Create Debuggable Dynamic Link Library to compile the debuggable DLL.
❑ Click OK when prompted that the files were created successfully.
❑ Close LabWindows/CVI.
5. Execute the sequence in TestStand.
❑ Select Execute»Single Pass.
❑ When the execution pauses, click Step Into to step into the LabWindows/CVI code module.
The LabWindows/CVI Debugging window launches, where you can use the LabWindows/CVI
debugging tools, Watch window, and Variable window to debug code.
--8<---------------------------
Are your power supplies then reset, too?
Best regards,
Sebastian
02-09-2011 12:36 AM
Starting CVI prior to the TestStand Sequence Editor for debugging purposes used to work with CVI7/Teststand-3.1.
Running the cvi code in an external instance of CVI seems to solve the problem. But another question: How to debug a teststand code module by attaching the debugger to the running process ( new feature in cvi2010) . Attaching it to the teststand process seems to trigger the same side effects as starting CVI first.
02-09-2011 03:33 AM
Markus,
I have not yet worked with the new process debugging feature, but I believe that when you try to debug the TestStand in the "normal" CVI environment, it will again auto-init and auto-close the IVI drivers when stepping through the code to prevent reference leaks.
Best regards,
Sebastian
02-09-2011 06:17 AM
You speak about Teststands "auto-init and auto-close IVI drivers" ? Is this documented somewhere ? And could you point me to the documentation ? If it is properly documented this can be considered as feature. But if it lacks documentation it should be considered as bug.
PS: Does it make sense to switch to the Teststand Forum to discuss that further ?
02-09-2011 06:32 AM
This behaviour is not caused by TestStand, but by your attempt to share IVI code across two processes. The DLL is called by your test execution. If you now try to debug (= execute) this code in a separate CVI environment, the IVI session will to my knowledge be terminated and re-initialized for every new call in order to arbitrate access.
I do not know if this really needed special documentation, because it is in my opinion logical behaviour, and the recommended debugging way does not expose the user to this issue.
Best regards,
Sebastian