2 of 2 people found this helpful
So this boils down to PI Analysis Service not designed to trigger off multiple inputs at the same timestamp. The current behavior is that we would trigger off the 1st value and ignore the rest, if they are at the same timestamp.
However, if you use AF 2018, you can use the new RecordedValues() function to retrieve all the archived values within a time range, even if there are multiple values at the same timestamp. You can then use the new FilterData() function to filter out the specific alarm that you are looking for.
What I don't understand is why you would want to add one millisecond to the data? By doing so, you've changed the fundamental property (time) of the data.
I didn't necessarily "want" to add anything to the data, but it was the only workaround I could think of for my problem. For the most part, we only look at the second level of granularity on our pi tags so adding a millisecond doesn't pose any major issue to us unless there were 100 entries at the same time. Also, these are alarm tags so the value stored is a string that includes the original timestamp in it, so the only thing we really care about is that it is stored and we can retrieve it.
And thanks! I didn't know there was a new function that could do that. We're currently on AF 2017 R1, but this marks 2 important things that 2018 would fix for me, so I'll have to see about making a push to upgrade.
1 of 1 people found this helpful
I neglected to mention the upcoming release has a new analytics function - split() - that would allow you to rip apart your string/alarm tags based on a user-defined delimiter. This function returns an array. Hope this helps.