Main Content

Connect Signal Ports

Previous releases use Get Attribute blocks to output the values of entity attributes. SimEvents 5.0 is more closely tied to Simulink®. This close association lets you use traditional Simulink tools to get attribute values. Replace Get Attribute blocks using these guidelines.

If Connected to Gateway Blocks

SimEvents® models no longer require gateway blocks. Remove all gateway blocks, as shown in the figure:

Old model with gateway block removed separated from new model with no gateway block by grey arrow pointing right.

Return to Connect Signal Ports.

If Using Get Attribute Blocks to Observe Output

If you use Get Attribute blocks to observe output, see Observe Output. For example, you can use the Simulation Data Inspector to visualize entities from an Entity Generator block. This example shows how to visualize entities using the Simulation Data Inspector, logging, and a scope.

In the old model, the Get Attribute block is removed. In the new model, the entities using Entity Server block are visualized using Stream Signals option, data logging or the Scope block.

Return to Connect Signal Ports.

If Connected to Computation Blocks

If the Get Attribute block is connected to computational blocks, reproduce the behavior of these blocks with Simulink Function blocks.

  1. Place the computation blocks in a Simulink Function block.

  2. Call the Simulink Function block from an event action.

This example places the Gain and Bias blocks in the Simulink Function block.

In the new model, the Gain and Bias blocks of the old model are replaced by the Simulink Function block in the new model. Both models are separated by a grey arrow pointing downward.

This table shows how each statistics port gets updated.

Statistics PortUpdated on Event
Entry ExitBlockedPreempted

Number of entities departed, d

 

Black check mark

  

Number of entities in block, n

Black check mark

   

Number of entities arrived, a

Black check mark

   

Pending entity present in block, pe

 

Black check mark

Black check mark

Black check mark

Number of pending entities, np

 

Black check mark

Black check mark

Black check mark

Number of entities preempted, p

   

Black check mark

Average intergeneration time, w

    

Average wait, w

 

Black check mark

 

Black check mark

Average queue length, l

Black check mark

Black check mark

  

Utilization, util

Black check mark

Black check mark

 

Black check mark

Return to Connect Signal Ports.

If Connected to Reactive Ports

In previous releases, reactive ports are signal input ports that listen for updates or changes in the input signal. When the input signal changes, an appropriate reaction occurs in the block possessing the port. Convert all reactive port event signals to messages, as in this example.

In the new model, the reactive port is replaced by the Message Send block.

For more information, see Reactive Ports.

Return to Connect Signal Ports.

Related Topics