Buildings.Obsolete.Controls.OBC.CDL.Logical

Package with obsolete models of logical blocks

Information

Package with obsolete blocks for elementary mathematical functions for boolean variables.

Package Content

Name Description
Buildings.Obsolete.Controls.OBC.CDL.Logical.And3 And3 Logical 'and3': y = u1 and u2 and u3
Buildings.Obsolete.Controls.OBC.CDL.Logical.Timer Timer Timer measuring the time from the time instant where the Boolean input became true
Buildings.Obsolete.Controls.OBC.CDL.Logical.Validation Validation Collection of models that validate the logical blocks of the CDL

Buildings.Obsolete.Controls.OBC.CDL.Logical.And3 Buildings.Obsolete.Controls.OBC.CDL.Logical.And3

Logical 'and3': y = u1 and u2 and u3

Buildings.Obsolete.Controls.OBC.CDL.Logical.And3

Information

Block that outputs true if all inputs are true. Otherwise the output is false.

Extends from Modelica.Icons.ObsoleteModel (Icon for classes that are obsolete and will be removed in later versions).

Connectors

TypeNameDescription
input BooleanInputu1Connector of first Boolean input signal
input BooleanInputu2Connector of second Boolean input signal
input BooleanInputu3Connector of third Boolean input signal
output BooleanOutputyConnector of Boolean output signal

Modelica definition

block And3 "Logical 'and3': y = u1 and u2 and u3" extends Modelica.Icons.ObsoleteModel; Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1 "Connector of first Boolean input signal"; Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u2 "Connector of second Boolean input signal"; Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u3 "Connector of third Boolean input signal"; Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput y "Connector of Boolean output signal"; equation y=u1 and u2 and u3; end And3;

Buildings.Obsolete.Controls.OBC.CDL.Logical.Timer Buildings.Obsolete.Controls.OBC.CDL.Logical.Timer

Timer measuring the time from the time instant where the Boolean input became true

Buildings.Obsolete.Controls.OBC.CDL.Logical.Timer

Information

Timer with option to accumulate time until it is reset by an input signal.

Each time the Boolean input u becomes true, the timer runs, otherwise it is dormant.

Extends from Modelica.Icons.ObsoleteModel (Icon for classes that are obsolete and will be removed in later versions).

Parameters

TypeNameDefaultDescription
BooleanaccumulatefalseIf true, accumulate time until Boolean input 'reset' becomes true, otherwise reset timer whenever u becomes true

Connectors

TypeNameDescription
input BooleanInputuConnector for signal that switches timer on if true, and off if false
input BooleanInputresetConnector for signal that sets timer to zero if it switches to true. The input value will be ignored if the timer does not accumulate time
output RealOutputyTimer output [s]

Modelica definition

block Timer "Timer measuring the time from the time instant where the Boolean input became true" extends Modelica.Icons.ObsoleteModel; parameter Boolean accumulate = false "If true, accumulate time until Boolean input 'reset' becomes true, otherwise reset timer whenever u becomes true"; Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u "Connector for signal that switches timer on if true, and off if false"; Buildings.Controls.OBC.CDL.Interfaces.BooleanInput reset "Connector for signal that sets timer to zero if it switches to true. The input value will be ignored if the timer does not accumulate time"; Buildings.Controls.OBC.CDL.Interfaces.RealOutput y( final quantity="Time", final unit="s") "Timer output"; protected discrete Modelica.Units.SI.Time entryTime "Time instant when u became true"; discrete Modelica.Units.SI.Time yAcc "Accumulated time up to last change to true"; Buildings.Controls.OBC.CDL.Interfaces.BooleanInput reset_internal( final start=false, final fixed=true) "Internal connector"; initial equation pre(entryTime) = time; yAcc = 0; equation if not accumulate then reset_internal = true; else reset_internal = reset; end if; when u and (not edge(reset_internal)) then entryTime = time; elsewhen reset then entryTime = time; end when; when reset then yAcc = 0; elsewhen (not u) then yAcc = pre(y); end when; if not accumulate then y = if u then time - entryTime else 0.0; else y = if u then yAcc + (time - entryTime) else yAcc; end if; end Timer;