2 of 2 people found this helpful
Have you tried to use PI Web API to achieve the same goal?
Currently, PI SDK is considered an old technlology. I would prefer starting a new project using PI AF SDK and PI Web API for sure.
1 of 1 people found this helpful
As mentioned above, PI SDK is deprecated and is not recommended anymore and you should try moving away from it.
Refer to Deprecating the PI SDK.
If you intend to program in .NET then PI AF SDK should be used and when using third party libraries use PI Web API.
Having said all this, in your code I would try dServer.PIPoints(sTagName).Data.UpdateValue(testValue, sTime,0,None)
or even make it even easier for debugging by re-writing as
tag = dServer.PIPoints("STagname")
We used PI AF SDK with this function and it worked very well.
def writePiTag(tag, timestamp, value, piServer=PIServers().DefaultPIServer): val = AFValue() val.Value = value val.Timestamp = AFTime(timestamp) serversList = list(piServer.Collective.Members); for colMember in serversList: colMember.Connect(); writept = PIPoint.FindPIPoint(colMember.PIServer, tag) writept.UpdateValue(val, AFUpdateOption.Replace, AFBufferOption.BufferIfPossible)
Thanks for all the help.