04-20-2026 10:33 PM
I'm using TS 2022 with the python adapter. I have an instrument that is accessed via a tcl/tk interface.
Even though I close the connection in python via the tkinter module, it does not fully release the driver if there is a terminated execution. So if I run the sequence, get the pass or fail dialog, and then choose to stop the execution, I am left with a terminated execution. If the operator at that point hits the "Test UUTs" button, the step to open a connection to the instrument will fail because it's being held up by the terminated execution.
Is there a way to programmatically do the same thing as clicking "Close Execution" on the interface does? Or perhaps even restart the python adapter?
04-21-2026 12:04 AM
Hi,
I believe I kind of understand the issue, yet there are still some things which are relevant:
Where in your sequence do you initialize the driver session? (ClientSequence, ProcessModellCallback)
Where in your sequence do you close the driver session? (ClientSequence, ProcessModellCallback)
Which ProcessModel are you using?
Are you saying, that the execution terminates after the PassFail dialog?
Thanks for providing this information
04-21-2026 03:19 PM - edited 04-21-2026 03:36 PM
The driver connection is opened early in the MainSequence and closed in the Cleanup section. I'm using the sequential process model.
Closing code:
import tkinter
def close_tcl_session(tcl):
tcl.quit()
I've also tried "del tcl" in place of "tcl.quit()".
Say the test passes. The operator then sees the PreUUT dialog box.
If they hit stop and then later try to resume by hitting "TestUUTs":
This will cause an error when opening the test equipment handle fails since the terminated execution you see blocks it. If the operator hits "Close Execution" followed by "Test UUTs", it works.
This equipment uses a tcl interface, not visa, and there is nothing I can do about that.
04-22-2026 07:50 AM
Interesting....
When you are using TestUUTs, can you run subsequent UUTs / subsequent runs of the same UUT?
What happens, when you are running your Sequence File without the ProcessModel?
The screenshot you have attached looks like you are using (a variant of) the Simple UI.
What I don't understand, is why closing the display a finished execution
leads to freeing ressources....