modelToggle

Validation model for the Toggle block

Information

Validation test for the block AixLib.Controls.OBC.CDL.Logical.Toggle. Following tests are implemented:

  • When the clear input is false, the initial output should equal to the initial toggle input.
  • When the clear input is true, the initial output should be false, regardless of the value of the toggle input.
  • At the same moment, when both the clear input and the toggle 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 toggle input rises from false to true, the output should rise from false to true.

Components

TypeNameDefaultDescription
AixLib.Controls.OBC.CDL.Logical.TogglefalCleTruIniToggle block with clear input being contantly false and true initial toggle input
AixLib.Controls.OBC.CDL.Logical.TogglefalCleFalIniToggle block with clear input being contantly false and false initial toggle input
AixLib.Controls.OBC.CDL.Logical.ToggletruCleTruIniToggle block with clear input being contantly true and true initial toggle input
AixLib.Controls.OBC.CDL.Logical.ToggletruCleFalIniToggle block with clear input being contantly true and false initial toggle input
AixLib.Controls.OBC.CDL.Logical.ToggleswiCleInpInitial false output, with clear input switch between false and true
AixLib.Controls.OBC.CDL.Logical.ToggleswiCleInp1Initial false output, with clear input switch between false and true
AixLib.Controls.OBC.CDL.Logical.Sources.PulsecleInpBlock that outputs cyclic on and off
AixLib.Controls.OBC.CDL.Logical.Notnot1Logical not
AixLib.Controls.OBC.CDL.Logical.Sources.PulsetogInpBlock that outputs cyclic on and off
AixLib.Controls.OBC.CDL.Logical.Sources.ConstanttruTrue clear input
AixLib.Controls.OBC.CDL.Logical.Notnot2Logical not
AixLib.Controls.OBC.CDL.Logical.Sources.ConstantfalFalse clear input

Revisions

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