PISystem.Disconnect Method
- Last UpdatedNov 18, 2025
- 2 minute read
- PI System
- AF SDK 2024 R2
- Developer
Disconnects an open connection to the PI AF Server.
Namespace: OSIsoft.AF
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public void Disconnect()
Public Sub Disconnect Dim instance As PISystem instance.Disconnect()
public: void Disconnect()
member Disconnect : unit -> unit
Events
| Event Type | Reason |
|---|---|
| PISystemConnectChanged | This event will be raised when the connection status for the PISystem changes. |
Remarks
This method is usually called when no more work will be done on the PISystem and objects
retrieved from the PISystem are no longer referenced. Disconnecting from the server allows
the SDK to free resources used by the connection. This method is also called before making
a configuration change to a server that is currently connected.