cancel
Showing results for 
Search instead for 
Did you mean: 

How to trigger a PCo Notification with OPC timestamp linked, but without triggering on the timestamp

Former Member
0 Kudos

Hello,

I've question on SAP PCo notifications.

We have the following situation. In the DCS system every time a new "Roll" is created on the machine, the DCS gives a new number to this "Roll". Now we want  to create a notification based on this number change with an OPC DA connection, but we also want to add the tag of the actual timestamp to it, and not be dependent on the CreatedDate of the notification.

We need this timestamp to use it together with the timestamp of the previous roll to read out production data from a Historian HDA, so you see for us it's quite important to have the correct timestamps.

The problem is that when I set the trigger to 'always' and I add only the Number as a subscription item, it is not possible to add the timestamp to the notification as well, because it was not set as a subscription item. When I add both number and timestamp as subscription items and have as trigger always, the Pco looks at both subscription items, so it sends me continuously notifications because the time is changing ofcourse.

Is there a way or workaround to have both tags coming from the OPC DA included in the notification, and the notification to be send only when the Roll number is changed?

I'm looking forward to some answers, as I haven't found a solution to this issue.

Btw, I also tried with the 'onTrue' trigger. Where I added the Roll tag as expression. It worked one time, but on another change it doesn't create a new notification because it has the True status already and I don't see how I can change the status to false again, because the number is always increasing.

Kind regards,

Accepted Solutions (1)

Accepted Solutions (1)

former_member196557
Active Contributor
0 Kudos

Hi Bram,

In PCo, you can define an Always trigger with no trigger logic, and it will fire on EVERY subscription tag update for the agent instance.  If you add only the tag (Roll Number) to the notification trigger then the notification will trigger only on Roll Number changes. You can add the timestamp tag to the Agent Instance subscription tags and then add that tag to the Output of the Notification.  As long as 1) the Roll Number and timestamp change within the Agent Update Rate and 2) Update rate is short enough that 2 Roll Number and/or timestamp tag changes cannot occur within the update period, you will receive 1 notification event for each Roll Number change, and that notification will pass the most recent timestamp value to along with the Roll Number to the destination.  So your notification would look like this:

Trigger: Always, Expression = '<yourRollNumberTag>'

Output: Name=RollNumber, Expresssion='<yourRollNumberTag'>

            Name=TimeStamp, Expression='<yourTimeStampTag>

Regards, Steve

Answers (1)

Answers (1)

agentry_src
Active Contributor
0 Kudos

Hi Bram,

Why don't you use the notification as a trigger for a transaction to pull in both the current Roll data and the previous Roll data (both with appropriate timestamps)?

Regards, Mike

Former Member
0 Kudos

Hi Michael,

you mean first get the notification from the OPC DA and then launch a transaction that uses a larger time range to look up rolls in the OPC HDA, order them on timestamp and select the two first ones as current and previous?

It could be a workaround worth investigating

Would it not be interesting to build in this functionality in future PCo releases? It seems logic to me that the actual datetime (and not the notification Created Date) of the current tag can be send with the notification, or that you can trigger on one event (tag) passing hereby at the same time some other relevant data (when using the always trigger)

Anyway thanks for the answer, I see if it can fit with the complete flow. If there are other suggestions, I'm all ear.

agentry_src
Active Contributor
0 Kudos

Hi Bram,

You got the concept correct.  Back before PCo came along, I did hourly samples of Batch/Lot ID's to determine when a new lot had appeared, then check the flow meters at the new changeover time, then the previous changeover time then use the delta to do confirmations, GRs, GIs, etc.  I did not need to have an instant response to benefit the line, just something reasonably current.

If I think of anything else, I will pass it along, but since you have a triggering event, you can get all the other information pretty easy and very nearly real time.

Regards, Mike