| SimEvents® | ![]() |
SimEvents Sinks
This block creates a plot by counting events. The block restarts the count from 1 when the time changes. As a result, the count is cumulative for a given time instant but not cumulative across the entire simulation.
When the block has a ts input port and the input signal is an event-based signal, a stem with no marker represents the signal's initial condition.
Signal Input Ports
| Label | Description |
|---|---|
| ts | Signal whose updates increment the counter. This port appears only if you set Plot points upon to Sample time hit from port ts. |
| tr | Trigger signal whose edges increment the counter. This port appears only if you set Plot points upon to Trigger from port tr. |
| vc | Signal whose numerical changes in value increment the counter. This port appears only if you set Plot points upon to Change in signal from port vc. |
| fcn | Function-call signal that indicates when to increment the counter. This port appears only if you set Plot points upon to Function call from port fcn. |
To open the block dialog box, click the Parameters toolbar button in the plot window.

The type of event that indicates when the block increments its counter.
Determines whether rising, falling, or either type of trigger edge causes the block to increment its counter. This field appears only if you set Plot points upon to Trigger from port tr.
Determines whether rising, falling, or either type of value change causes the block to increment its counter. This field appears only if you set Plot points upon to Change in signal from port vc.
Selecting this option causes the plot window to open when you start the simulation. If you clear this box, you can open the plot window by double-clicking the block icon.

The interval shown on the X axis at the beginning of the simulation. The interval might change from this initial setting due to zooming, autoscaling, or the If X value is beyond limit setting.
Determines how the plot changes if one or more X values are not within the limits shown on the X axis. For details, see Varying Axis Limits Automatically.
The interval shown on the Y axis at the beginning of the simulation. The interval might change from this initial setting due to zooming, autoscaling, or the If Y value is beyond limit setting.
Determines how the plot changes if one or more event counts are not within the limits shown on the Y axis. For details, see Varying Axis Limits Automatically.
Toggles the grid on and off.

Text that appears as the title of the plot, above the axes.
Text that appears to the left of the vertical axis.
Text that appears below the horizontal axis.
A four-element vector of the form [left bottom width height] specifying the position of the scope window. (0,0) is the lower left corner of the display.
Displays the number of plotted points using an annotation in the plot window.

Select Unlimited to have the block cache all data for future viewing, Limited to cache a portion of the most recent data, and Disabled to avoid caching undisplayed data.
The number of data points the block caches, using the most recent data. This field appears only if you set Store data when scope is closed to Limited.
See Example: Plotting Event Counts to Check for Simultaneity.
Signal Scope, Instantaneous Entity Counting Scope
Plotting Data, Observing Events
![]() | Instantaneous Entity Counting Scope | LIFO Queue | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |