Skip to content

Message handling

The message handling can be used in different ways in the project. Alarms can be displayed on the HMI and reactions can be triggered. It can also be used to communicate internally between controllers.

Message Definitions

Message are defined in the local interface of a controller. The definitions can be overwritten in the controller instance.

UP - MessageDefinition

UP - MessageInit

MessageType

The Message Hander has 4 predefined message types:

  • error
  • warning
  • info
  • maintenance

The message type has no influence on the effect of the message. The type can be used to color the message on the HMI.

User-defined message types

For special applications, up to five additional user types can be defined.

image2023-1-11_11-43-21

uiClass: General UI class (inspired by bootstrap CSS representation at service ui): https://getbootstrap.com/docs/5.0/content/tables/#variants

AckType

Each message can be configured by modelType MessageAcknowledgeType to set a quitter behavior. The following basic settings are possible:

  • msgNoAcknowledge: The message does not require any acknowledgment
  • msgGlobalAcknowledge: The message can be acknowledged by any object number
  • msgLocalAcknowledge: The message can only be acknowledged by the object number which has set the message
  • msgExpUserAcknowledge: The user must explicitly acknowledge the message with the object and alarm number (MessageId)

Via the switch enAEMsgAckWhileActiveAllowed, the message can be allowed to be acknowledged already during which it is active (set and not yet reset).

UseCase

MsgHandling

Message Options

The message options are defined in the configuration of the UP project.

UP - MessageOptions

Cluster

  • A cluster combines the information of different messages.
  • Each controller can query the active level or the set reactions of each cluster.
  • A message can be assigned to exactly one cluster

MsgHandlingCluster

Cluster Configuration

image2020-4-29_15-6-7)

Cluster Instances

It is possible to use instantiatable clusters.

  • If a controller is instanced in different places, a cluster can be assigned during instanciation.

Reaction

  • A maximum of 32 reactions can be defined in a cluster
  • Several reactions can be configured for each message
  • Each controller can react to every reaction
  • A reaction is active until the message is reset and acknowledged.

MsgHandlingReaction

Reaction Configuration

Reactions can be defined in a cluster or global. If they are defined in the globalDdefinition, they can be used in all clusters.

image2020-4-29_11-38-17

Level

  • Levels are used to prioritize messages
  • The level is active until the message is reset and acknowledged.

MsgHandlingLevel

Level Configuration

Levels can be defined in a cluster or global. If they are defined in the globalDdefinition, they can be used in all clusters.

image2020-4-29_11-40-21


Best Practise

Levels shoud be defined global or in clusters. Mixing is tricky and should be avoided.


Example

An example project is available here