Hi all, I'm having some trouble with the triggers of an Event Frame Generation Analysis. It seems like it lost some random trigger, but the strangest thing is that it seems that it lost only ending triggers.

I have a simple EFG analysis:
EFG Analysis.png
It has only three trigger: 'Daily Trigger' which is a tag written everyday at 6:00 AM, but with a Timestamp of 12:00PM (so 6 hour before), 'Irr_alm' a flag tag used to identify day by night (is 1 during the day and 0 during the night, I don't think is important in this case), and the last one which is a calculated tag:


Mode_Calculated.png
Here, the trigger is only 'Mode' which is a tag given by our customer (it's coming from a PItoPI interface).

So that's the situation which is relative simple, now the issue I'm having is that for some days of August the EFG analysis seems to have lost some triggers from 'Mode_Calculated'.

Here are the EF generated in real time during that period:


EF generated.png
Here the EF I was expecting, based on Preview:


EF expected.png
Also the Time Series Data of 'Mode_Calculated':


expected values.png
 

I don't understand why it seems that on 02/08 and 05/08 the EFG analysis seems to lost the trigger of the mode_calculated, but only on the ending trigger, 'cause the start of the events is correct, also the end time on the real time generated events is perfectly aligned with the Daily Trigger. I really don't know what's happening here.

Also there is no Automatic Backfilling on the analyses.

 

Thanks for the help,

Michele

  • Hi Michelle,

     

    Let's understand the subtle difference of some triggers.

     

    In the first image, where you have a variable named DailyTrigger, it is not neccessarily a trigger just because it has "Trigger" in the name. Rather, the Analysis is defined as Event-Triggered in the lower left, in which case DailyTrigger is indeed A trigger. But what type of trigger is it? It is a trigger to have the Analysis execute, but it is not a trigger to cause an event frame to start or stop. The Analysis will execute and then examine the Start Trigger expressions. If the Start Trigger is false, no event frame is generated by the new DailyTrigger.

     

    Triggers to start or stop and event frame have their own set of expressions as is evident in your image. You may omit the End Trigger as it will be implied when the StartTrigger changes from True to False. That is to say that the default End Trigger is the simple negation of the Start Trigger.

     

    However, you have defined an End Trigger and I want to stress that it is NOT identical to the simple negation of the StartTrigger. Your end trigger is when 'Mode_Calculated' is no longer 1. The negation of the StartTrigger is EITHER when 'Mode_Calculated' is no longer 1 OR when 'IRR_alm' is no longer 1.

     

    Note also that an event frame will not be created just because 'Mode_Calculated' equals 1. 'IRR_alm' must also equal 1 for the start trigger to fire. While you have been gracious enough to include some recorded values for 'Mode_Calculated', you should also review the recorded values for 'IRR_alm' during the same time period.

     

    Hope this helps,

    Rick Davin

  • Hi Rick,

    thanks for your answer, however it does not help me very much.

    I understand all you said, and I agree. But I think you're missed the focal point here.

    The issue is not caused by the StartTrigger (so I don't think is relevant to include timeseries of 'IRR_alm' here), but it is caused in the EndTrigger.

    The events generated in realtime seems to be closed because the EndTrigger was satisfied (i.e. the Mode_Calculated=0), but the Analysis was triggered by the DailyTrigger, not the Mode_Calculated, so the End Time is at midnight.

    What I do not understand is why the analysys lost the trigger of the Mode_Calculated, but when it is triggered by the DailyTrigger it sees that Mode_Calculated has changed its value.

    This is also the reason why I attach the TimeSeries of the Mode_Calculated tag and the Preview of the Analysys.

    I hope it is more clear now what I'm trying to understand.

    Thank you.

  • Hi Asle,

    thanks for the answer. The situation is not so simple, I can't just restart the Analysis Service, I won't go into too much detail, but there are multiple systems intersecting in this project, and the AF events generated here are just a part of the project, I can't just regenerate them or stop the service at a moment's notice.

    Regarding your explanation about the closing of the event, the 'Irr_alm' is not going to 0 at midnight, but at sunset (let's say at around 8 pm). But also if this is the case the irr_alm going to 0 is not an end condition for the event. The closure at midnight is defintely triggered by the DailyTrigger.

    Anyway, this situation happened just for some days, from August till now the events are being generated correctly and no changed has been made to the analysis. I just don't get how this situation could possible arise. Even I have no idea how to recreate the issue on my local system for debug for example.

  • Hi Michele

    In general, when ever I encounter a situation where the Preview differs from the actual output, I'll restart the Analysis Service.

    The difference between a Preview and normal operation or a Backfill operation is that the Preview is generated by your PI System Explorer client, while the normal/Backfill operations are done in the Analysis Service. The two should produce the same outputs, so either your client has a problem or the service.

    Since both EF's are closed at midnight, I would lean towards the explicit end trigger not being interpreted properly by the Analysis Service. 'Irr_alm' probably resets to 0 at midnight, which would make the StartTrigger false, and thus close the EF.

     

  • "The closure at midnight is defintely triggered by the DailyTrigger."

    So, as ​ says, the analysis is being evaluated any time DailyTrigger receives a new value, but whether it receives 0, 1 or 1000 is irrelevant. It's just there to invoke the analysis to evaluate the conditions.

    Your start trigger relies on Mode_Calculated and Irr_alm, and the latter is irrelevant for the closing of the EF. Mode_Calculated is definitely evaluated to 0 on midnight between 2 and 3rd of August, so you're right about the DailyTrigger being the triggering event for evaluating the analysis at that time.

     

    So that leaves us with the conclusion that Mode_Calculated did NOT trigger the calculation at 2-Aug 18:34:50, nor at 18:42:53 or 19:31:14. My best guess is that there's something wrong with the way the Analysis Service interprets which tags to trigger from (i.e. Mode_Calculated isn't set as a trigger), and that this bug is best resolved by restarting the Analysis Service.

     

     

    • You could try recreating the analysis in a test environment, or just by creating a duplicate setup to see if that resolves this.
    • I interpret your answer so that you haven't tried backfilling the analysis, only previewing the results. Often we see that the normal run fails to trigger on some events, but the backfill works great. There could be a difference since normal runs trigger from the snapshot values, while backfilling works directly on archive values
    • You could try your luck with AVEVA's techsupport here, but I'm almost sure they'll conclude with the same recommendation. What versions are you running, btw?
  • Hi Asle,

    okay thank you. It is probably just a bug,

    Anyway those are the versions: Server:2.10.11.2717; Database:2.10.11.0000

    Thanks.