-
Re: Multiple future values in a trend
gmichaud-verreaultJun 12, 2018 5:03 PM (in response to BillBPA)
Are the other events relevant, or only the last one to come in?
-
Re: Multiple future values in a trend
BillBPA Jun 12, 2018 9:32 PM (in response to gmichaud-verreault)All are relevant in showing how the future demands were changing.
-
Re: Multiple future values in a trend
gmichaud-verreaultJun 13, 2018 3:45 PM (in response to BillBPA)
Since this is time series data and you care about all the data points as they are relevant, Roger Palmen is absolutely correct, and it is not solvable. In a time series, you cannot (and would not) want to differentiate multiple events at the same timestamp as a "first" or "last" because they are timestamped the same.
You could set up a separate tag to only retain the latest value by changing how the data is stored in the system and using an ARCREPLACE() instead of appending the duplicate events. This would be configured at the interface / application level that is sending the data.
Gabriel
-
Re: Multiple future values in a trend
BillBPA Jun 13, 2018 8:17 PM (in response to gmichaud-verreault)See my reply to Roger
-
-
-
-
Re: Multiple future values in a trend
rschmitzJun 12, 2018 5:33 PM (in response to BillBPA)
1 of 1 people found this helpfulI'd be interested in seeing what this looks like in PI System Management Tool's Archive Editor for this tag. Even future tags shouldn't have multiple events for one timestamp. If the events were coming in with a single timestamp I would expect the value to be substituted and marked as such. Perhaps we could take a look at the source data (however it maybe coming in) and make sure that there aren't millisecond differences in the timestamps, which are making these unique events. If we can prevent the data source from adding on millisecond differences, we can ensure only the most recent value to come in is the only one retained.
--Rob
-
-
Re: Multiple future values in a trend
rschmitzJun 13, 2018 11:28 AM (in response to BillBPA)
So even if you're seeing identical timestamps in SMT with your current settings, that doesn't mean you aren't displaying sub-seconds. These are still unique events with unique timestamps. So for example, if I query for the following two events for a tag using the Windows Format for time (which is what it looks like you currently have set), they appear to have the same timestamp
However, if in SMT I go to View > Settings > Time Format and switch it to the settings below:
I see that these events in fact do have different sub-second timestamps
That being said, if you need to retain all values to capture shifting predictions, this inherently won't work because Processbook will trend all timeseries values in the range you ask for. You're either going to need a second tag with filtered data or to write your own visualization tool/symbol to change this behavior.
--Rob
-
Re: Multiple future values in a trend
BillBPA Jun 13, 2018 7:09 PM (in response to rschmitz)Changing the format shows that all the values have the exact time stamp to the sub-second since the data source providing the values is setting the time stamp the same.
-
-
-
-
Re: Multiple future values in a trend
tramachandranJun 12, 2018 5:42 PM (in response to BillBPA)
When you say that all the events have the same timestamp how do you classify the 'newest value'?
If it is possible to configure the data source, you should specify AFUpdateOption.Replace for data writes. This will ensure if any values exists at the same time, the new values overwrite them and set its Substituted flag.
-
-
Re: Multiple future values in a trend
Roger Palmen Jun 13, 2018 5:09 AM (in response to BillBPA)1 of 1 people found this helpfulJust from the data in PI you cannot know which value is the 'latest', and therefore this is in principle unsolvable if you whish to store all values in PI and not just the latest. I suggest to look at your process how you create these values and find a solution there.
-
Re: Multiple future values in a trend
BillBPA Jun 13, 2018 8:16 PM (in response to Roger Palmen)I know what order the values are shown in SMT or Datalink are the order they are received. I've confirmed this by watching new values come in and where they are shown in the column.
Also, the PB trend shows the last value that was received by the horizontal line connecting the vertical lines representing the range of values.
Also, if I use Datalink to return a timed value, interpolated returns the last value whereas exact returns the first value.
So perhaps there's a way of using a data set to return the latest value, but since it's an element relative display, that won't work.
The data comes from a third party. I have little influence on how they time stamp the data and I'm not the only one capturing the values for use. I may be able to do something with the interface that is receiving the values.
-
Re: Multiple future values in a trend
Roger Palmen Jun 14, 2018 6:16 AM (in response to BillBPA)Like in most databases, there is no guarantee that the order of display is the order in which the data is received. Ever tried archive reprocessing, PI2PI interfaces, etc?
It is try that it is quite likely that data is shown in order of receipt, but likely is not enough to solve this problem. I really think you either have too much data, or too little.
-
-
-
Re: Multiple future values in a trend
BillBPA Jun 18, 2018 7:51 PM (in response to BillBPA)So, I have created a solution I was looking.
I created a data set that is just the tag value but the sync time is 00:00:01 so it get the latest value and calculation interval of one minute.
Ta da!
For extra credit, I created a context change event and update the data set with the tag name associated with the selected element.