Products & Services Solutions Academia Support User Community Company

Learn more about SimEvents   

Read Timer - Report statistical data about named timer associated with arriving entities

Library

Timing

Description

This block reads the value of a timer that the Start Timer block previously associated with the arriving entity. Using the Report elapsed time and Report average elapsed time parameters, you can configure the block to report the following statistics via the et and w signal output ports, respectively:

The timer continues timing after the entity departs from this block, which is relevant if the same entity arrives at another Read Timer block later in the simulation.

For more information about using this block with the Start Timer block, see Using Timers.

Ports

Entity Input Ports

LabelDescription
INPort for arriving entities.

Entity Output Ports

LabelDescription
OUTPort for departing entities.

Signal Output Ports

LabelDescriptionTime of Update When Statistic Is OnOrder of Update
#dNumber of entities that have departed from this block since the start of the simulation.After entity departure3
#tTotal number of entities that have departed from this block and possessed a timer of the specified name.After entity departure2
etInstantaneous elapsed time for the arriving entity, if it possesses a timer of the specified name.After entity departure2
wAverage among the et values for all entities that have arrived at this block and possessed a timer of the specified name.After entity departure1

Output signals having the same number in the Order of Update column in the table above are updated in an arbitrary sequence relative to each other; you should not rely on a specific sequence for your simulation results.

The initial output value, which is in effect from the start of the simulation until the first update by the block, is 0 for all signals.

Dialog Box

Read Timer Tab

Timer tag

Name of the timer to read. This timer tag corresponds to the Timer tag parameter of a Start Timer block in the model.

If entity does not have tagged timer

Behavior of the block if an arriving entity does not possess a timer with the specified timer tag.

Statistics Tab

These parameters determine whether certain ports produce data throughout the simulation, produce data only when you stop or pause the simulation, or are omitted from the block. For descriptions of the affected ports, see the preceding table, "Signal Output Ports".

Number of entities departed

Controls the presence and behavior of the signal output port labeled #d.

Number of entities departed with specified tag

Controls the presence and behavior of the signal output port labeled #t. If you set If entity does not have tagged timer to Ignore, then the #t value might be less than the #d value.

Report elapsed time

Controls the presence of the signal output port labeled et.

Report average elapsed time

Controls the presence and behavior of the signal output port labeled w.

Examples

See Also

Start Timer

Using Timers

  


Related Products & Applications

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