AnsweredAssumed Answered

PI ACE does not write to both collective servers

Question asked by IgorP on Dec 18, 2014

I have a trouble with writing values to both servers in a collective(we have two - primary and secondary). Values goes only to primary server. I use PISDK to write values because standart syntax like "acePt.Value = 2" does not work at all, PIACEBIFunctions.LogPIACEMessage does not work too( maybe you can help with it?).  I think it can happens because of I use pisdk and write values only to point's server.

 

 

There is code example:

    Private srv As Server

 

    Public Overrides Sub ACECalculations()

        Dim timeFromMidnight As TimeSpan

        timeFromMidnight = DateTime.Now() - DateTime.Today()

        Dim pt As PIPoint

        pt = srv.PIPoints(minutes_since_midnight.Tag)

        pt.Data.UpdateValue(Convert.ToInt32(timeFromMidnight.TotalMinutes), Me.ExeTime, DataMergeConstants.dmInsertDuplicates)

    End Sub

 

    Protected Overrides Sub InitializePIACEPoints()

        minutes_since_midnight = GetPIACEPoint("minutes_since_midnight")

    End Sub

 

    Protected Overrides Sub ModuleDependentInitialization()

        srv = (New PISDK.PISDKClass).Servers(minutes_since_midnight.Server)

    End Sub

 

minutes_since_midnight  is a tag point that belongs to collective

Outcomes