Closes the session to the instrument and deallocates the resources that NI-DCPower reserved.

Syntax

Namespace: NationalInstruments.ModularInstruments.NIDCPower

public void Close()

Remarks

If power output is enabled when you call this method, the channels remain in their existing state and continue providing power. Use Reset or Enabled to disable power output on a per-channel basis.

The Close method can be called safely more than once, even if the session is already closed.

Calling close, disposes the SafeHandle used to hold the instrument handle. The ReleaseHandle method of the SafeHandle is overridden in our concrete implementation of SafeHandle, which calls into the Close of the Underlying driver. If a call to this Close fails for any reason, the most common being the session being closed by some external means, the user won't be notified of the failure. In order to help users identify failures in ReleaseHandle method, managed debugging assistant (MDA) is activated to notify developers when ReleaseHandle fails. Common ways of externally closing a session: paraInitializing a session with a resource name for which a session is already open, within the same process. Initializing a new session with the same resource name causes the instrument handle held by the existing session to become invalid.  paraUser gets the instrument handle out using the  method and closes this handle directly.   NI-DCPower uses the terms "source" and "output". However, while sinking with electronic loads and SMUs these correspond to "sinking" and "input", respectively.  10/3/2012 6:28:00 PM NI False