Close the Session

Use the NI-DCPower driver to close a session with the PXI-4110.

Use the niDCPower Close VI or the niDCPower_close function to close a session.

Closing a session is essential for freeing resources, including deallocating memory, destroying threads, and freeing operating system resources. You should close every session that you initialize, even if an error occurs during the program. When debugging your application, it is common to abort execution before you close. While aborting the execution should not cause problems, NI does not recommend doing so.

When you close a session, the channels continue to operate in their last configured state. If you close a session while the output channels are enabled and actively sourcing or sinking power, the channels continue to source or sink power until they are disabled or reset.