Documentation Center

  • Trial Software
  • Product Updates

Instantaneous Event Counting Scope

Plot event count versus time

Library

SimEvents Sinks

Description

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 initial output of the signal.

Ports

Signal Input Ports

LabelDescription
tsWhen this signal has an update, the counter increments. This signal must be an event-based signal. You see this port only if you set Plot points upon to Sample time hit from port ts.
trWhen this signal satisfies the specified trigger criteria, the counter increments. This signal must be an event-based signal. You see this port only if you set Plot points upon to Trigger from port tr.
vcWhen this signal satisfies the specified value-change criteria, the counter increments. This signal must be an event-based signal. You see this port only if you set Plot points upon to Change in signal from port vc.
fcnWhen this signal carries a function call, the counter increments. This signal must be an event-based function call. You see this port only if you set Plot points upon to Function call from port fcn.

Dialog Box

To open the block dialog box, click the Parameters toolbar button in the plot window.

Plotting Tab

Plot points upon

The type of event that indicates when the block increments its counter.

Trigger type, Type of change in signal value

Trigger type determines whether rising, falling, or either type of trigger edge causes the block to increment its counter. You see this field only if you set Plot points upon to Trigger from port tr.

Type of change in signal value determines whether rising, falling, or either type of value change causes the block to increment its counter. You see this field only if you set Plot points upon to Change in signal from port vc.

Open scope at start of simulation

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.

Axes Tab

Initial X axis lower limit, Initial X axis upper limit

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.

If X value is beyond limit

Determines how the plot changes if one or more X values are not within the limits shown on the X axis. For details, see Vary Axis Limits Automatically.

Initial Y axis lower limit, Initial Y axis upper limit

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.

If Y value is beyond limit

Determines how the plot changes if one or more event counts are not within the limits shown on the Y axis. For details, see Vary Axis Limits Automatically.

Show grid

Toggles the grid on and off.

Figure Tab

Title

Text that appears as the title of the plot, above the axes.

Y label

Text that appears to the left of the vertical axis.

X label

Text that appears below the horizontal axis.

Position

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.

Show number of points

Displays the number of plotted points using an annotation in the plot window.

Data History Tab

Store data when scope is closed

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.

Limit data points to

The number of data points the block caches, using the most recent data. You see this field only if you set Store data when scope is closed to Limited.

Was this topic helpful?