| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → SimEvents |
| Contents | Index |
| Learn more about SimEvents |
Probes
This block computes the number of entities that have departed since the start of the simulation or since the last reset, whichever occurred later. The block writes this number to a signal output port and/or an attribute of each departing entity. The count includes the departing entity.
Entity Input Ports
| Label | Description |
|---|---|
| IN | Port for arriving entities. |
Signal Input Ports
| Label | Description |
|---|---|
| ts | When this signal has an update, the block resets its internal counter and the #d output signal to zero. You see this port only if you set Reset counter upon to Sample time hit from port ts. |
| tr | When this signal satisfies the specified trigger criteria, the block resets its internal counter and the #d output signal to zero. You see this port only if you set Reset counter upon to Trigger from port tr. |
| vc | When this signal satisfies the specified value-change criteria, the block resets its internal counter and the #d output signal to zero. You see this port only if you set Reset counter upon to Change in signal from port vc. |
| fcn | When this signal carries a function call, the block resets its internal counter and the #d output signal to zero. You see this port only if you set Reset counter upon to Function call from port fcn. |
Entity Output Ports
| Label | Description |
|---|---|
| OUT | Port for departing entities. |
Signal Output Ports
| Label | Description | Time of Update When Statistic Is On |
|---|---|---|
| #d | Number of entities that have departed from this block since the start of the simulation or since the last reset. | After entity departure |
The initial output value, which is in effect from the start of the simulation until the first update by the block, is 0.

Controls the presence and behavior of the signal output port labeled #d. This parameter determines whether the block outputs the entity count through a signal output port under these circumstances:
Throughout the simulation
Only when you stop or pause the simulation
Not at all
If you select On, the block assigns the entity count to the attribute specified in the Attribute name parameter.
The name of the attribute the block uses to record the entity count. You see this field only if you set Write count to attribute to On.
Selecting this option enables the block to define a new attribute for the entity count. Otherwise, the block issues an error if the attribute you name in the Attribute name parameter does not exist. You see this field only if you set Write count to attribute to On.
Determines whether, and under which circumstances, the block resets its internal counter and the #d output signal to zero.
Determines whether rising, falling, or either type of trigger edge causes the counter to reset. You see this field only if you set Reset counter upon to Trigger from port tr.
Determines whether rising, falling, or either type of value change causes the counter to reset. You see this field only if you set Reset counter upon to Change in signal from port vc.
Select this option to prioritize the reset event explicitly, relative to other simultaneous events in the simulation. If you do not select this option, the event has priority SYS1 on the event calendar. For details, see Choosing How to Resolve Simultaneous Signal Updates. You see this field only if you set Reset counter upon to a value other than Off.
The priority of the reset event, relative to other simultaneous events in the simulation. For details, see Specifying Event Priorities to Resolve Simultaneous Signal Updates. You see this field only if you set these parameters:
Reset counter upon = A value other than Off
Select Resolve simultaneous signal updates according to event priority
Instantaneous Entity Counting Scope
![]() | Entity Combiner | Entity Departure Event to Function-Call Event | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |