-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Point update method does not work as expected (sometimes) #607
Comments
I also experience strange behavior. I expect the new entry to appear in the attribute's time series, and the new entry appears with the correct time, but the value is of the previous entry, i.e. (point.time, PrevValue) instead of (point.time, point.value) |
so, are you sure that point you have tried to update older than 'Pt Created' (as in my example)? |
In my case, I just insert a point between two points, and the inserted point has the correct time, but the value of the point to the left of it. |
ok, thank you for the replay, interesting... Can you share what is |
Code to reproduce. DataUpdateMode.REPLACE is PI.PIConsts.UpdateMode.REPLACE
$ pip show piconnect
$ sys.version AF SDK Version 2.9.1.8106. Assembly Version 4.0.0.0. .NET: v4.0.30319 |
Hello. Can you write your Python version, PiConnect version and PIAF Version (including SDK). |
This is some strange behaviour, but I'm not sure I can fix this myself. I don't have a server at my disposal on which I have write permissions, so I'm not able to test this. Is this issue still occurring with the 0.10 release of |
Bug report
Description
When I have used
update_value
beforePt Created
withREPLACE
option PI Server merely flushed recently updated data (I guess, it flushed rows where the special flag had a place, i.e.Substituted flag
, via: https://docs.osisoft.com/bundle/af-sdk/page/html/T_OSIsoft_AF_Data_AFUpdateOption.htm). I have not expected that, ofc.However, for data that is updated after the
Pt Created
REPLACE
method works as expected as I can see and test.To Reproduce
Expected behavior
In my work, I have created test points in order to reproduce service behavior (aka test stand).
So, newly created test points have their
created
stamp in a "recent" time, however, I was supposed to start debugging with historical data and hereupdate_value
method came to help me as I thought. So, I faced the bug mentioned above and spent time locating the one in a code. I believe, if there were a kinda warning about the buggy behavior it would save me time.Possible solutions
Not sure that we want to dig into the PI problem hard, maybe there should be a simple warning on
update_value
older thancreated
property (as for unexpected hardcode on your own risk behavior).Screenshots
System
Additional context
Ofc, maybe there is a good workaround how to fill the PI server with a lot of data for a newly created point. For me, I found the solution: use
INSERT
as an option forupdate_value
of the test point.UPD: I can report that the bug sometimes does not occur (you can possibly check it via several runs of the code).
UPD2: I added
screenshotresult of script executingThe text was updated successfully, but these errors were encountered: