Closing Switch Sessions (TSM)
- Updated2025-07-31
- 1 minute(s) read
In the ProcessSetup callback sequence of a test program, you must close all instrument sessions and switch sessions stored in the Semiconductor Module context. Refer to the Close Switch Sessions VI in the Switching example for an example of how to clean up switch sessions.
Pass NISimulatedMultiplexer for the Multiplexer Type ID parameter of the Get All Switch Sessions VI to obtain an array of switch sessions from the pin map. In a For Loop, iterate through each session in the Session Data array and close the session. Because the session data is an array of variant data types to allow for any session type, use the Variant To Data function inside the For Loop to convert the variant data type to the correct switch session type.