Documentation Center

  • Trial Software
  • Product Updates

Notifying, Monitoring, and Reactive Ports

Overview of Signal Input Ports of SimEvents Blocks

Signal input ports of SimEvents® blocks fall into these categories:

  • Notifying ports, which notify the preceding block when a certain event has occurred

  • Monitoring ports, which help you observe signal values

  • Reactive ports, which listen for updates or changes in the input signal and cause an appropriate reaction in the block possessing the port

The distinctions are relevant when you use the Event-Based Random Number or Event-Based Sequence block. For details, see these topics:

Notifying Ports

Notifying ports, listed in the table below, notify the preceding block when a certain event has occurred. When the preceding block is the Event-Based Random Number or Event-Based Sequence block, it responds to the notification by generating a new output value. Other blocks ignore the notification.

List of Notifying Ports

Signal Input PortBlockGenerate New Output Value Upon
Attribute name (e.g. Attribute1, Attribute2)Set AttributeEntity arrival
inSignal LatchWrite event
e1, e2Entity Departure Function-Call GeneratorEntity arrival
Signal-Based Function-Call GeneratorRelevant signal-based event, depending on configuration of block
tSignal-Based Function-Call GeneratorRelevant signal-based event, depending on configuration of block
tInfinite ServerEntity arrival
N-ServerEntity arrival
Single ServerEntity arrival
tTime-Based Entity GeneratorSimulation start and subsequent entity departures
tiSchedule TimeoutEntity arrival
xX-Y Signal ScopeSample time hit at in signal input port

Monitoring Ports

Monitoring ports, listed in the table below, help you observe signal values. Optionally, you can use a branch line to connect the Event-Based Random Number or Event-Based Sequence block to one or more monitoring ports. These connections do not cause the block to generate a new output, but merely enable you to observe the signal.

List of Monitoring Ports

Signal Input PortBlock
UnlabeledDiscrete Event Signal to Workspace
inSignal Scope
X-Y Signal Scope
ts, tr, vcInstantaneous Event Counting Scope
UnlabeledEvent to Timed Signal

Reactive Ports

Reactive ports, listed in the table below, listen for relevant updates in the input signal and cause an appropriate reaction in the block possessing the port. For example, the p port on a switch listens for changes in the input signal; the block reacts by selecting a new switch port.

List of Reactive Ports

Signal Input PortBlockRelevant Update
enEnabled GateValue change from nonpositive to positive, and vice versa
pInput SwitchValue change
Output Switch
Path Combiner
ts, tr, vcEntity Departure Counter
Sample time hit at ts port
Appropriate trigger at tr port
Appropriate value change at vc port
Event-Based Entity Generator
Release Gate
Signal-Based Function-Call Generator
Signal-Based Function-Call Event Generator
wts, wtr, wvc, rts, rtr, rvcSignal Latch
Sample time hit at wts or rts port
Appropriate trigger at wtr or rtr port
Appropriate value change at wvc or rvc port
Unlabeled input portEvent Filter

Depends on block parameter values. Choices are:

Sample time hit
Appropriate trigger
Appropriate value change
Unlabeled input portInitial ValueSample time hit

For triggers and value changes, "appropriate" refers to the direction you specify in a Type of change in signal value or Trigger type parameter in the block's dialog box.

Connect Signal Generators to Reactive Ports

To connect an event-based signal generator to a reactive port, you must use a workaround because you cannot connect the Event-Based Random Number block directly to a reactive input port of a SimEvents block or indirectly, via a single-input-single-output (SISO) block that supports event-based input signals.

The following model shows an invalid connection of the Event-Based Random Number block.

In this model, the Event-Based Random Number block is directly connected to the p input port of an Output Switch block. The p input port of the Output Switch block is a reactive port. This connection is invalid because the Event-Based Random Number block cannot infer from the p input port of the Output Switch block when to generate a new random number. The Output Switch block is designed to listen for changes in its p input signal and respond when a change occurs. The Output Switch cannot cause changes in the input signal value or inform the random number generator when to generate a new random number.

The following model shows a workaround to this invalid connection.

In this workaround, the Event-Based Random Number block is not directly connected to the p input port of the Output Switch block. Instead, a Signal Latch block stores each value that the Event-Based Random Number block generates.

When an entity departs the Output Switch block, the #d output signal of that block increments by a value of 1 and triggers a write-to-memory event in the Signal Latch block. In this model, the value of the Read from memory upon parameter of the Signal Latch block is set to Write to memory event. This setting means that each time the Event-Based Random Number block writes a new value to the Signal Latch block, the Signal Latch block outputs its current stored value to the p input port of the Output Switch block.

Was this topic helpful?