AnyTrue model

Requirements.Examples.Elementary.LogicalBlocks.AnyTrue  ยท source

Icon of AnyTrue

Example for AnyTrue (output is true if at least one input is true)

Extends Modelica.Icons.Example

Using logical block AnyTrue as

results in

simulation result

The three inputs of anyTrue1 are a constant false, a Boolean step to true at 2 s and a Boolean pulse of period 1.5 s that starts at 1.5 s. The output is the logical or of the inputs: it is true while the pulse is true before 2 s and permanently true from 2 s on, because the step input stays true. The number of inputs is set by nu = 3.

Components and variables

NameTypeDescription
booleanStepModelica.Blocks.Sources.BooleanStepBoolean step to true at 2 s
booleanPulseModelica.Blocks.Sources.BooleanPulseBoolean pulse with period 1.5 s, starting at 1.5 s
const1Requirements.Sources.BooleanConstantConstant false input
anyTrue1Requirements.LogicalBlocks.AnyTrueTrue if at least one of the three inputs is true