Modelica.StateGraph.Temporary

Components that will be provided by other libraries in the future

Information


This library is just temporarily present. The components of this library will be present in the future in the Modelica standard library (with the new block connectors) and in the UserInteraction library that is currently under development.

Extends from Modelica.Icons.Library (Icon for library).

Package Content

NameDescription
Modelica.StateGraph.Temporary.SetRealParameter SetRealParameter Define Real parameter (GUI not yet satisfactory)
Modelica.StateGraph.Temporary.anyTrue anyTrue Returns true, if at least on element of the Boolean input vector is true
Modelica.StateGraph.Temporary.allTrue allTrue Returns true, if all elements of the Boolean input vector are true
Modelica.StateGraph.Temporary.RadioButton RadioButton Button that sets its output to true when pressed and is reset when an element of 'reset' becomes true
Modelica.StateGraph.Temporary.NumericValue NumericValue Show value of Real input signal dynamically
Modelica.StateGraph.Temporary.IndicatorLamp IndicatorLamp Dynamically show Boolean input signal (false/true = white/green color)

Types and constants

type SetRealParameter = Real "Define Real parameter (GUI not yet satisfactory)";


Modelica.StateGraph.Temporary.anyTrue Modelica.StateGraph.Temporary.anyTrue

Returns true, if at least on element of the Boolean input vector is true

Information



Extends from Modelica.Icons.Function (Icon for a function).

Inputs

TypeNameDefaultDescription
Booleanb[:]  

Outputs

TypeNameDescription
Booleanresult 

Modelica definition

function anyTrue 
  "Returns true, if at least on element of the Boolean input vector is true"

  extends Modelica.Icons.Function;
  input Boolean b[:];
  output Boolean result;
algorithm 
  result := false;
  for i in 1:size(b,1) loop
     result := result or b[i];
  end for;
end anyTrue;

Modelica.StateGraph.Temporary.allTrue Modelica.StateGraph.Temporary.allTrue

Returns true, if all elements of the Boolean input vector are true

Information



Extends from Modelica.Icons.Function (Icon for a function).

Inputs

TypeNameDefaultDescription
Booleanb[:]  

Outputs

TypeNameDescription
Booleanresult 

Modelica definition

function allTrue 
  "Returns true, if all elements of the Boolean input vector are true"
  extends Modelica.Icons.Function;
  input Boolean b[:];
  output Boolean result;
algorithm 
  result := true;
  for i in 1:size(b,1) loop
     result := result and b[i];
  end for;
end allTrue;

Modelica.StateGraph.Temporary.RadioButton Modelica.StateGraph.Temporary.RadioButton

Button that sets its output to true when pressed and is reset when an element of 'reset' becomes true

Modelica.StateGraph.Temporary.RadioButton

Information



Parameters

TypeNameDefaultDescription
TimebuttonTimeTable[:]{0}Time instants where button is pressend and released [s]
Time varying expressions
Booleanreset[:]{false}Reset button to false, if an element of reset becomes true

Connectors

TypeNameDescription
output BooleanOutputon 

Modelica definition

block RadioButton 
  "Button that sets its output to true when pressed and is reset when an element of 'reset' becomes true"

  parameter Modelica.SIunits.Time buttonTimeTable[:]={0} 
    "Time instants where button is pressend and released";
  input Boolean reset[:]={false} 
    "Reset button to false, if an element of reset becomes true";

  Modelica.Blocks.Interfaces.BooleanOutput on;
protected 
  Modelica.Blocks.Sources.BooleanTable table(table=buttonTimeTable);
algorithm 
  on := table.y;
  when pre(reset) then
    on := false;
  end when;
end RadioButton;

Modelica.StateGraph.Temporary.NumericValue Modelica.StateGraph.Temporary.NumericValue

Show value of Real input signal dynamically

Modelica.StateGraph.Temporary.NumericValue

Information



Parameters

TypeNameDefaultDescription
Integerprecision3Number of significant digits to be shown
BooleanhideConnectorfalse= true, if connector is not shown in the dynamic object diagram
RealInputValue Real value to be shown in icon

Connectors

TypeNameDescription
input RealInputValueReal value to be shown in icon

Modelica definition

model NumericValue "Show value of Real input signal dynamically"
  parameter Integer precision(min=0) = 3 
    "Number of significant digits to be shown";
  parameter Boolean hideConnector=false 
    "= true, if connector is not shown in the dynamic object diagram";

  Modelica.Blocks.Interfaces.RealInput Value "Real value to be shown in icon";

end NumericValue;

Modelica.StateGraph.Temporary.IndicatorLamp Modelica.StateGraph.Temporary.IndicatorLamp

Dynamically show Boolean input signal (false/true = white/green color)

Modelica.StateGraph.Temporary.IndicatorLamp

Information



Connectors

TypeNameDescription
input BooleanInputu 

Modelica definition

model IndicatorLamp 
  "Dynamically show Boolean input signal (false/true = white/green color)"

  Modelica.Blocks.Interfaces.BooleanInput u;


end IndicatorLamp;

HTML-documentation generated by Dymola Sun Jan 17 21:09:40 2010.