AllTrue model

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

Icon of AllTrue

Example for AllTrue (output is true if all inputs are true)

Extends Modelica.Icons.Example

Using logical block AllTrue as

results in

simulation result

The three inputs of allTrue1 are a constant true, 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 and of the inputs: it is false before 2 s, because the step input is still false, and follows the pulse from 2 s on. 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 true input
allTrue1Requirements.LogicalBlocks.AllTrueTrue if all three inputs are true