Modelica.Blocks.Interaction.Show

Library of blocks to show variables in a diagram animation

Information

Extends from Modelica.Icons.Package (Icon for standard packages).

Package Content

NameDescription
Modelica.Blocks.Interaction.Show.RealValue RealValue Show Real value from numberPort or from number input field in diagram layer dynamically
Modelica.Blocks.Interaction.Show.IntegerValue IntegerValue Show Integer value from numberPort or from number input field in diagram layer dynamically
Modelica.Blocks.Interaction.Show.BooleanValue BooleanValue Show Boolean value from numberPort or from number input field in diagram layer dynamically


Modelica.Blocks.Interaction.Show.RealValue Modelica.Blocks.Interaction.Show.RealValue

Show Real value from numberPort or from number input field in diagram layer dynamically

Modelica.Blocks.Interaction.Show.RealValue

Information


This block visualizes a Real number in a diagram animation. The number to be visualized can be defined in the following ways:

The two versions of the block are shown in the following image (in the right variant, the name of the variable value that is displayed is also shown below the icon):

The usage is demonstrated, e.g., in example Modelica.Blocks.Examples.RealNetwork1.

Parameters

TypeNameDefaultDescription
Booleanuse_numberPorttrue= true, if numberPort enabled
Realnumber0.0Number to visualize if use_numberPort=false (time varying)
IntegersignificantDigits2Number of significant digits to be shown

Connectors

TypeNameDescription
input RealInputnumberPortNumber to be shown in diagram layer if use_numberPort = true
output RealOutputshowNumber 

Modelica definition

block RealValue 
  "Show Real value from numberPort or from number input field in diagram layer dynamically"
  parameter Boolean use_numberPort = true "= true, if numberPort enabled";
  input Real number = 0.0 
    "Number to visualize if use_numberPort=false (time varying)";
  parameter Integer significantDigits(min=1) = 2 
    "Number of significant digits to be shown";

  Modelica.Blocks.Interfaces.RealInput numberPort if use_numberPort 
    "Number to be shown in diagram layer if use_numberPort = true";
   Modelica.Blocks.Interfaces.RealOutput showNumber;
equation 
  if use_numberPort then
     connect(numberPort, showNumber);
  else
     showNumber = number;
  end if;

end RealValue;

Modelica.Blocks.Interaction.Show.IntegerValue Modelica.Blocks.Interaction.Show.IntegerValue

Show Integer value from numberPort or from number input field in diagram layer dynamically

Modelica.Blocks.Interaction.Show.IntegerValue

Information


This block visualizes an Integer number in a diagram animation. The number to be visualized can be defined in the following ways:

The two versions of the block are shown in the following image (in the right variant, the name of the variable value that is displayed is also shown below the icon):

The usage is demonstrated, e.g., in example Modelica.Blocks.Examples.IntegerNetwork1.

Parameters

TypeNameDefaultDescription
Booleanuse_numberPorttrue= true, if numberPort enabled
Integernumber0Number to visualize if use_numberPort=false (time varying)

Connectors

TypeNameDescription
input IntegerInputnumberPortNumber to be shown in diagram layer if use_numberPort = true
output IntegerOutputshowNumber 

Modelica definition

block IntegerValue 
  "Show Integer value from numberPort or from number input field in diagram layer dynamically"
  parameter Boolean use_numberPort = true "= true, if numberPort enabled";
  input Integer number=0 
    "Number to visualize if use_numberPort=false (time varying)";
  Modelica.Blocks.Interfaces.IntegerInput numberPort if use_numberPort 
    "Number to be shown in diagram layer if use_numberPort = true";
   Modelica.Blocks.Interfaces.IntegerOutput showNumber;
equation 
  if use_numberPort then
     connect(numberPort, showNumber);
  else
     showNumber = number;
  end if;

end IntegerValue;

Modelica.Blocks.Interaction.Show.BooleanValue Modelica.Blocks.Interaction.Show.BooleanValue

Show Boolean value from numberPort or from number input field in diagram layer dynamically

Modelica.Blocks.Interaction.Show.BooleanValue

Information


This block visualizes a Boolean variable in a diagram animation. The Boolean variable to be visualized can be defined in the following ways:

If the Boolean variable is false the block is "grey", otherwise, it is "green". The two versions of the block are shown in the following image (in the right variant, the name of the variable value that is displayed is also shown below the icon):

The usage is demonstrated, e.g., in example Modelica.Blocks.Examples.BooleanNetwork1.

Parameters

TypeNameDefaultDescription
Booleanuse_activePorttrue= true, if activePort enabled
BooleanactivefalseBoolean variable to visualize if use_activePort=false (time varying)

Connectors

TypeNameDescription
input BooleanInputactivePortBoolean variable to be shown in diagram layer if use_activePort = true
output BooleanOutputshowActive 

Modelica definition

block BooleanValue 
  "Show Boolean value from numberPort or from number input field in diagram layer dynamically"
  parameter Boolean use_activePort = true "= true, if activePort enabled";
  input Boolean active=false 
    "Boolean variable to visualize if use_activePort=false (time varying)";
  Modelica.Blocks.Interfaces.BooleanInput activePort if use_activePort 
    "Boolean variable to be shown in diagram layer if use_activePort = true";

   Modelica.Blocks.Interfaces.BooleanOutput showActive;
equation 
  if use_activePort then
     connect(activePort, showActive);
  else
     showActive = active;
  end if;

end BooleanValue;

Automatically generated Fri Nov 12 16:27:36 2010.