Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Manufacturing Execution System 2023 R2

Understand how rejected messages are handled

  • Last UpdatedNov 04, 2024
  • 3 minute read

The object includes a set of RejectedMessages attributes for retrieving, viewing, and acknowledging rejected messages that occur during run time. The rejected messages are stored in the MES database. There is no configuration of the RejectedMessages attributes as these are set by the object.

RejectedMessage attributes configuration, such as I/O extensions, is not supported on SRO-specific tabs in Object Editor. However, RejectedMessages attributes can be interacted with through scripts, LMX-based read/write operations, Object Viewer, and also through System Platform's I/O extensions on the Attributes tab.

OnScan Behavior

At OnScan, a subscription to rejected message events is established. A filter is applied to specify a representative rejected message dataset. The filter comprises the following attributes.

  • RejectedMessages.Filter.Entity — The MES entity by which to filter the rejected messages that will be visible. This will be the object's parent entity.

    This attribute is auto-set at run time by the SRO. Its value should not be changed to ensure correct retrieval of rejected messages.

  • RejectedMessages.Filter.MaxHours — The rejected messages that occurred up to the number of previous hours entered for this attribute will be retrieved.

    The range of allowable values is from 1 to 100. The default value is 72. Every hour, the object will set the Time filter to a value in the past that is the MaxHours from the current time.

    This value is expected to be set by the user at configuration time.

  • RejectedMessages.Filter.MsgType — The message type by which to filter the rejected messages that will be visible. This attribute is auto-set by the SRO to retrieve all Without Response events that the SRO can generate. Its value should not be changed to ensure correct retrieval of rejected messages.

  • RejectedMessages.Filter.Time — Only rejected messages that are more recent than this time stamp value will be retrieved. At OnScan, the time stamp value is set to the current time.

    During execution, the difference between Filter.Time and the current time is compared against the Filter.MaxHours value. If exceeded, Filter.Time is reset an hour forward, ensuring that rejected messages older than Filter.MaxHours are never retrieved.

    When this value is set by the user at run time, it will remove the current subscription and establish a new one. It is recommended that this value not be set frequently to avoid the performance overhead of recreating subscriptions.

A count of the rejected messages that match the filter criteria and a string array of the messages themselves will be available through the RejectedMessages.Count and RejectedMessages.Messages attributes. The RejectedMessages.Messages attribute can hold up to 200 messages. For example, in a 12-hour period, 450 rejected messages might be logged. The RejectedMessages.Count attribute would have a value of 450 but the RejectedMessages.Messages attribute would have only the 200 most recent messages.

The message array is ordered with the most recent message at the top (that is, with the first index value).

Rejected Message Retrieval Failures

If the rejected message retrieval fails, the RejectedMessages.Status attribute value changes from Ready to Error. Also, an error code (RejectedMessages.ErrorCode) and error message (RejectedMessages.ErrorMessage) are returned.

The error codes are:

  • -100, which indicates a communication error or MES middleware exception.

  • -1, which indicates an unknown error.

The RejectedMessages.ResetCmd is used to clear the error condition. The reset command:

  • Clears the ErrorCode and ErrorMessage attributes.

  • Sets the Status attribute to Ready.

  • Re-subscribes if the subscription has become invalid due to the error.

Acknowledging Rejected Messages and Resetting the Subscription

The RejectedMessages.AckRejectedMessagesCmd command attribute is used to acknowledge the rejected messages and clear them.

Setting this command to True acknowledges that the currently visible rejected messages have been viewed. The active rejected message subscription is removed and a new one is established. Also, the time stamp filter is set to the current time, effectively clearing any previous rejected messages.

Failover Behavior

On failover to a redundant engine, the most recent RejectedMessages.Filters.Time value is retained and used when the new subscription is established from the redundant engine. The RejectedMessages.Filters.Entity and RejectedMessages.Filters.MsgType attributes will be set to their default values. This will cause the rejected message dataset that was current at the time of the failure to be retrieved.

OffScan and Shutdown Behavior

At OffScan or Shutdown, the rejected message subscription is removed.

Alarms and History

Rejected message alarm or history configuration is not supported for the object on the object-specific tabs in Object Editor. However, alarms and history can be configured for any of the attributes on the Attributes tab.

TitleResults for “How to create a CRG?”Also Available in