modelLatch

Validation model for the Latch block

Information

Validation test for the block Buildings.Controls.OBC.CDL.Logical.Latch. Following tests are implemented:

  • When the clear input is false, the initial output should equal to the initial latch input.
  • When the clear input is true, the initial output should be false, regardless of the value of the latch input.
  • At the same moment, when both the clear input and the latch input rise from false to true, the output should become false if it was true, or remain false if it was false.
  • At the same moment, when the clear input falls from true to false and the latch input rises from false to true, the output should rise from false to true.

Components

TypeNameDefaultDescription
Buildings.Controls.OBC.CDL.Logical.LatchfalCleTruIniLatch block with clear input being contantly false and true initial latch input
Buildings.Controls.OBC.CDL.Logical.LatchtruCleTruIniLatch block with clear input being contantly true and true initial latch input
Buildings.Controls.OBC.CDL.Logical.LatchfalCleFalIniLatch block with clear input being contantly false and false initial latch input
Buildings.Controls.OBC.CDL.Logical.LatchtruCleFalIniLatch block with clear input being contantly true and false initial latch input
Buildings.Controls.OBC.CDL.Logical.LatchswiCleInpInitial false output, with clear input switch between false and true
Buildings.Controls.OBC.CDL.Logical.LatchswiCleInp1Initial false output, with clear input switch between false and true
Buildings.Controls.OBC.CDL.Logical.Sources.PulsecleInpBlock that outputs cyclic on and off
Buildings.Controls.OBC.CDL.Logical.Notnot1Logcal not
Buildings.Controls.OBC.CDL.Logical.Sources.ConstantfalFalse clear input
Buildings.Controls.OBC.CDL.Logical.Sources.PulselatInpBlock that outputs cyclic on and off
Buildings.Controls.OBC.CDL.Logical.Sources.ConstanttruTrue clear input
Buildings.Controls.OBC.CDL.Logical.Notnot2Logical not

Revisions

  • April 4, 2019, by Jianjun Hu:
    Added test to validate initial output. This is for Buildings, issue 1402.
  • March 30, 2017, by Jianjun Hu:
    First implementation.