I’m having trouble figuring out the order of operations when the test ends.
When a test finishes, what is the order of operations to clean up?
Specifically, what is the order for the following:
- Test Plan Close/Completed Methods (If there are any)
- DUT Close methods
- Instrument Close methods
I would expect it to be DUT.Close → Instrument(s).Close() → Test Plan.Close()
However, I can’t seem to find any confirmation.
Further, what happens in case of Error or Abort? Is it the same order?
Currently, I’m trying to ensure that on abort my test equipment and DUTs safely shutdown/exit.
Thanks.
Hi @matthewdumas,
The purpose of TestPlan.Open/Close is to save some time by not having to reconnect resources. So actually, TestPlan.Close causes references resources to be closed, it is not before or after, it’s a part of it.
There is no predefined order when closing instruments or DUTs, that can happy in any order, except if one resource references another, the dependee is closed before the depender.
Errors are caught and should not affect the order, except that it might cause cascading errors with dependers.
So if I have DUT that depends on a power supply, then the DUT will perform close before the power supply?
I guess that’s the real crux of the issue. I have some switching devices, a power supply, and the DUT, and I want to make sure that all of the critical devices that the DUT is closed/handled before the other devices to prevent damage to all devices.