Modelica_StateGraph2.Blocks.MathBoolean

Blocks with input and output signals of type Boolean

Package Content

NameDescription
Modelica_StateGraph2.Blocks.MathBoolean.ShowValue ShowValue Show Integer value from numberPort or from number input field in diagram layer dynamically
Modelica_StateGraph2.Blocks.MathBoolean.And And Logical 'and': y = u[1] and u[2] and ... and u[nu]
Modelica_StateGraph2.Blocks.MathBoolean.Or Or Logical 'or': y = u[1] or u[2] or ... or u[nu]
Modelica_StateGraph2.Blocks.MathBoolean.Xor Xor Logical 'xor': y = oneTrue(u) (y is true, if exactly one element of u is true, otherwise it is false)
Modelica_StateGraph2.Blocks.MathBoolean.Nand Nand Logical 'nand': y = not ( u[1] and u[2] and ... and u[nu] )
Modelica_StateGraph2.Blocks.MathBoolean.Nor Nor Logical 'nor': y = not ( u[1] or u[2] or ... or u[nu] )
Modelica_StateGraph2.Blocks.MathBoolean.RisingEdge RisingEdge Output y is true, if the input u has a rising edge, otherwise it is false (y = edge(u))
Modelica_StateGraph2.Blocks.MathBoolean.FallingEdge FallingEdge Output y is true, if the input u has a falling edge, otherwise it is false (y = edge(not u))
Modelica_StateGraph2.Blocks.MathBoolean.ChangingEdge ChangingEdge Output y is true, if the input u has either a rising or a falling edge and otherwise it is false (y=change(u))
Modelica_StateGraph2.Blocks.MathBoolean.MultiSwitch MultiSwitch Set Boolean expression that is associated with the first active input signal
Modelica_StateGraph2.Blocks.MathBoolean.OnDelay OnDelay Delay a rising edge of the input, but do not delay a falling edge.

Modelica_StateGraph2.Blocks.MathBoolean.ShowValue Modelica_StateGraph2.Blocks.MathBoolean.ShowValue

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

Parameters

NameDescription
use_activePort= true, if activePort enabled
activeBoolean variable to visualize if use_activePort=false (time varying)

Connectors

NameDescription
activePortBoolean variable to be shown in diagram layer if use_activePort = true
active2 

Modelica_StateGraph2.Blocks.MathBoolean.And Modelica_StateGraph2.Blocks.MathBoolean.And

Logical 'and': y = u[1] and u[2] and ... and u[nu]

Information

Extends from Modelica_StateGraph2.Blocks.Interfaces.PartialBooleanMISO (Partial block with a BooleanVectorInput and a BooleanOutput signal).

Connectors

NameDescription
u[nu] 
y 

Modelica_StateGraph2.Blocks.MathBoolean.Or Modelica_StateGraph2.Blocks.MathBoolean.Or

Logical 'or': y = u[1] or u[2] or ... or u[nu]

Information

Extends from Modelica_StateGraph2.Blocks.Interfaces.PartialBooleanMISO (Partial block with a BooleanVectorInput and a BooleanOutput signal).

Connectors

NameDescription
u[nu] 
y 

Modelica_StateGraph2.Blocks.MathBoolean.Xor Modelica_StateGraph2.Blocks.MathBoolean.Xor

Logical 'xor': y = oneTrue(u) (y is true, if exactly one element of u is true, otherwise it is false)

Information

Extends from Modelica_StateGraph2.Blocks.Interfaces.PartialBooleanMISO (Partial block with a BooleanVectorInput and a BooleanOutput signal).

Connectors

NameDescription
u[nu] 
y 

Modelica_StateGraph2.Blocks.MathBoolean.Nand Modelica_StateGraph2.Blocks.MathBoolean.Nand

Logical 'nand': y = not ( u[1] and u[2] and ... and u[nu] )

Information

Extends from Modelica_StateGraph2.Blocks.Interfaces.PartialBooleanMISO (Partial block with a BooleanVectorInput and a BooleanOutput signal).

Connectors

NameDescription
u[nu] 
y 

Modelica_StateGraph2.Blocks.MathBoolean.Nor Modelica_StateGraph2.Blocks.MathBoolean.Nor

Logical 'nor': y = not ( u[1] or u[2] or ... or u[nu] )

Information

Extends from Modelica_StateGraph2.Blocks.Interfaces.PartialBooleanMISO (Partial block with a BooleanVectorInput and a BooleanOutput signal).

Connectors

NameDescription
u[nu] 
y 

Modelica_StateGraph2.Blocks.MathBoolean.RisingEdge Modelica_StateGraph2.Blocks.MathBoolean.RisingEdge

Output y is true, if the input u has a rising edge, otherwise it is false (y = edge(u))

Information


A rising edge of the Boolean input u results in y = true at this time instant. At all other time instants, y = false.

Extends from Interfaces.PartialBooleanSISO (Partial block with a BooleanInput and a BooleanOutput signal).

Parameters

NameDescription
pre_u_startValue of pre(u) at initial time

Connectors

NameDescription
y 
u 

Modelica_StateGraph2.Blocks.MathBoolean.FallingEdge Modelica_StateGraph2.Blocks.MathBoolean.FallingEdge

Output y is true, if the input u has a falling edge, otherwise it is false (y = edge(not u))

Information


A falling edge of the Boolean input u results in y = true at this time instant. At all other time instants, y = false.

Extends from Interfaces.PartialBooleanSISO (Partial block with a BooleanInput and a BooleanOutput signal).

Parameters

NameDescription
pre_u_startValue of pre(u) at initial time

Connectors

NameDescription
y 
u 

Modelica_StateGraph2.Blocks.MathBoolean.ChangingEdge Modelica_StateGraph2.Blocks.MathBoolean.ChangingEdge

Output y is true, if the input u has either a rising or a falling edge and otherwise it is false (y=change(u))

Information


A changing edge, i.e., either rising or falling, of the Boolean input u results in y = true at this time instant. At all other time instants, y = false.

Extends from Interfaces.PartialBooleanSISO (Partial block with a BooleanInput and a BooleanOutput signal).

Parameters

NameDescription
pre_u_startValue of pre(u) at initial time

Connectors

NameDescription
y 
u 

Modelica_StateGraph2.Blocks.MathBoolean.MultiSwitch Modelica_StateGraph2.Blocks.MathBoolean.MultiSwitch

Set Boolean 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) Boolean 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] else y_default (time varying)
use_pre_as_defaultset true to hold last value as default (y_default = pre(y))
y_defaultDefault value of output y if all u[i] = false

Connectors

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

Modelica_StateGraph2.Blocks.MathBoolean.OnDelay Modelica_StateGraph2.Blocks.MathBoolean.OnDelay

Delay a rising edge of the input, but do not delay a falling edge.

Information


A rising edge of the Boolean input u gives a delayed output. A falling edge of the input is immediately given to the output.

Simulation results of a typical example with a delay time of 0.1 s is shown in the next figure.


Extends from Interfaces.PartialBooleanSISO (Partial block with a BooleanInput and a BooleanOutput signal).

Parameters

NameDescription
delayTimeDelay time [s]

Connectors

NameDescription
y 
u 

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