PISDK.PISDKClass.Refresh(Object TargetObject)

Discussion created by jdouglas Employee on Apr 28, 2014
Latest reply on Apr 28, 2014 by Marcos Vainer Loeff
The following error has happened the last two Fridays. Program runs every minute and hasn't had any problems, but got this error the last two Fridays. Program checks if there's a connection to the PI server, then calls Function GetDigitalStateDictionary Message: The server threw an exception. (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT)) Assembly Version: Stack Trace: at PISDK.PISDKClass.Refresh(Object TargetObject) PC running program is at SDK version PI version is 3.4.380.36 Any ideas what this error means or how to avoid it? Here's the function. It came from the SDK help file. The refresh method updates the states incase they. I'm thinking about just removing it, because the digital states aren't changing for this tag.         Public Function GetDigitalStateDictionary(tagname As String) As Dictionary(Of Integer, String)             Dim tmpList As New Dictionary(Of Integer, String)             Dim stateSet = GetTagAttribute(tagname, "digitalset")             piSDK.Refresh(m_LocalServer.StateSets)             If stateSet <> "" Then                 For Each setSet As DigitalState In m_LocalServer.StateSets(stateSet)                     tmpList.Add(setSet.Code, setSet.Name)                 Next             End If             Return tmpList         End Function