eventDisplay

Block Category: Signal Consumer

Description: The eventDisplay block displays events that are stored in the Embed system log. You can control which events are displayed and whether the events are saved for future use.

When you insert an eventDisplay block in your diagram, events that are captured by the eventLog blocks are displayed in the eventDisplay window, as shown below.

Each event is identified by its:

      Event type: An informational message is identified by the eventDisplay informational symbol symbol; a warning message is identified by the eventDisplay warning symbol symbol; and an error message is identified by the eventDisplay error symbol symbol.

      Date and Time: Indicates when the event occurred.

      Source: The user-specified block label assigned to the eventLog block that logged the event.

      Event: The text that is produced when the event occurs.

You do not have to include an eventDisplay block before you simulate your diagram. You can add it after the simulation completes, and it automatically displays the event information.

Log File

Log File Name: Indicates the name of the log file in which to log events. Click … to choose a specific file or directory.

Save Event: Saves the events currently displayed in the eventDisplay window to the specified log file. When you click Save Event, the Save As dialog box appears in which to specify a log file.

Save Events at Simulation End: Saves events to a log file at the end of the simulation.

Window

Clear Events: Clears the events from the eventDisplay window.

Clear Log at Simulation Start: Clears the specified log file of events before the start of the next simulation. If you do not activate this parameter, events are appended to the specified log file.

Display Errors: Error messages are displayed in the eventDisplay window.

Display Messages: Informational events are displayed in the eventDisplay window.

Display Warnings: Warning messages are displayed in the eventDisplay window.

 

Example

eventLog ex

The events from two eventLog blocks are captured in the eventDisplay window. The sources (One and Two) are the user-defined block names assigned to the two eventLog blocks.

For the upper eventLog block, the sum of a const block with a value of 1 and squareWave block is fed into the upper connector of the eventLog block. While the sum of these blocks is equal to 1, the event type is informational. When the sum equals 2, the event type converts to a warning symbol.

For the lower eventLog, the sum of a const block with a value of 2 and squareWave block is fed into the upper connector of the eventLog block. While the sum of these blocks is equal to 2, the event type is a warning symbol. When the sum equals 3, the event type converts to an error symbol. Note also that the string fed into the lower connector of the eventLog block is the concatenation of the text "Message Two" and the value of the ramp block at each time step.