How can I send my own event messages?

The following description can be used to create your own event messages, which are then displayed in the event list.

image-20260420-050822.png

The example shows how the FB_SetEventEntry function block is used to create an event entry in the event list.

image-20260420-050829.png

First, the function block is instantiated in the declaration part and the auxiliary variables are created.

// set event entry
fbSetEventEntry      : FB_SetEventEntry;
xStart                       : BOOL := FALSE;
wsEventText            : WSTRING := ““;

The function call can then be made as shown in the example.

// set event entry
wsEventText := “Temperature to high!“;
fbSetEventEntry(xSetEvent:= xStart, wsEventText:= wsEventText);

If the variable xStart is set to TRUE, the defined event text is entered once in the event list.