Modelica_StateGraph2.Blocks.MathInteger

Blocks with input and output signals of type Integer

Package Content

NameDescription
Modelica_StateGraph2.Blocks.MathInteger.ShowValue ShowValue Show Integer value from numberPort or from number input field in diagram layer dynamically
Modelica_StateGraph2.Blocks.MathInteger.Sum Sum Sum of Integers: y = k[1]*u[1] + k[2]*u[2] + ... + k[n]*u[n]
Modelica_StateGraph2.Blocks.MathInteger.Product Product Product of Integer: y = u[1]*u[2]* ... *u[n]
Modelica_StateGraph2.Blocks.MathInteger.MultiSwitch MultiSwitch Set Integer expression that is associated with the first active input signal
Modelica_StateGraph2.Blocks.MathInteger.TriggeredAdd TriggeredAdd Add input to previous value of output, if rising edge of trigger port

Modelica_StateGraph2.Blocks.MathInteger.ShowValue Modelica_StateGraph2.Blocks.MathInteger.ShowValue

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

Parameters

NameDescription
use_numberPort= true, if numberPort enabled
numberNumber to visualize if use_numberPort=false (time varying)

Connectors

NameDescription
numberPortNumber to be shown in diagram layer if use_numberPort = true
number2 

Modelica_StateGraph2.Blocks.MathInteger.Sum Modelica_StateGraph2.Blocks.MathInteger.Sum

Sum of Integers: y = k[1]*u[1] + k[2]*u[2] + ... + k[n]*u[n]

Information

Extends from Modelica_StateGraph2.Blocks.Interfaces.PartialIntegerMISO (Partial block with an IntegerVectorInput and an IntegerOutput signal).

Parameters

NameDescription
k[nu]Input gains

Connectors

NameDescription
u[nu] 
y 

Modelica_StateGraph2.Blocks.MathInteger.Product Modelica_StateGraph2.Blocks.MathInteger.Product

Product of Integer: y = u[1]*u[2]* ... *u[n]

Information

Extends from Modelica_StateGraph2.Blocks.Interfaces.PartialIntegerMISO (Partial block with an IntegerVectorInput and an IntegerOutput signal).

Connectors

NameDescription
u[nu] 
y 

Modelica_StateGraph2.Blocks.MathInteger.MultiSwitch Modelica_StateGraph2.Blocks.MathInteger.MultiSwitch

Set Integer expression that is associated with the first active input signal

Information


The block has a vector of Boolean input signals u[nu] and a vector of (time varying) Integer expressions expr[:]. The output signal y is set to expr[i], if i is the first element in the input vector u that is true. If all input signals are false, y is set to parameter "y_default" or to pre(y) depending on the parameter use_pre_as_default:

  // Conceptual equation (not valid Modelica)
  i = 'first element of u[:] that is true';
  y = if i==0 then if use_pre_as_default then pre(y) else y_default else expr[i];

Parameters

NameDescription
expr[nu]y = if u[i] then expr[i] elseif use_pre_as_default then pre(y) else y_default
y_defaultDefault value of output y if use_pre_as_default=false, as well as pre(y) at initial time
use_pre_as_default= true, y holds its last value if all u[i]=false, otherwise y=y_default

Connectors

NameDescription
u[nu]Set y = expr[i], if u[i] = true
yOutput depending on expression

Modelica_StateGraph2.Blocks.MathInteger.TriggeredAdd Modelica_StateGraph2.Blocks.MathInteger.TriggeredAdd

Add input to previous value of output, if rising edge of trigger port

Information

Extends from Interfaces.PartialIntegerSISO (Partial block with a IntegerInput and an IntegerOutput signal).

Parameters

NameDescription
use_reset=true, if reset port enabled
use_set=true, if set port enabled and used as default value when reset
y_startInitial and reset value of y if set port is not used

Connectors

NameDescription
y 
u 
trigger 
reset 
set 

Automatically generated Tue Oct 01 16:04:22 2013.