Disconnect

<< Click to Display Table of Contents >>

 

Disconnect

Disconnect()

This method clears current data and prevents a Pen from receiving more real-time data from its linked Tag. If a Pen is already disconnected, this method remains inactive. When this method is used with a Historic and Realtime-type of Pen (its DataSourceType property equal to 2), it removes its real-time part and keeps the historical part. At run time, the Connect method must be used to show real-time data again. The next script contains an example of using this method.

Sub CommandButton1_Click()
  Set Pen1 = Screen.Item("E3Chart1").Pens.Item("Pen1")
  Pen1.Disconnect()
  Pen1.Connect()
End Sub

Was this page useful?