Plecs {
  Name          "SVG_SPI_3"
  Version       "5.0"
  CircuitModel  "ContStateSpace"
  StartTime     "0.0"
  TimeSpan      "6"
  Timeout       ""
  Solver        "auto"
  MaxStep       "1e-6"
  InitStep      "-1"
  FixedStep     "1e-6"
  Refine        "1"
  ZCStepSize    "1e-9"
  RelTol        "1e-6"
  AbsTol        "-1"
  TurnOnThreshold "0"
  NonIdealSwitchResistance "1"
  SyncFixedStepTasks "2"
  UseSingleCommonBaseRate "1"
  LossVariableLimitExceededMsg "3"
  NegativeSwitchLossMsg "3"
  DivisionByZeroMsg "3"
  DatatypeOverflowMsg "3"
  DatatypeInheritanceConflictMsg "2"
  ContSampleTimeConflictMsg "2"
  StiffnessDetectionMsg "2"
  MaxConsecutiveZCs "1000"
  AlgebraicLoopWithStateMachineMsg "3"
  AssertionAction "1"
  FixedPointDatatypeOverride "1"
  InitializationCommands "Vdc = 30000;\nTs_plant = 5e-6;"
  InitialState  "1"
  SystemState   ""
  JacobianComputation "2"
  TaskingMode   "1"
  TaskConfigurations ""
  CodeGenParameterInlining "2"
  CodeGenFloatingPointFormat "2"
  CodeGenAbsTimeUsageMsg "3"
  CodeGenBaseName ""
  CodeGenOutputDir ""
  CodeGenExtraOpts ""
  CodeGenTarget "TI2806x"
  CodeGenTargetSettings "AAAAfwAAAAAbQ29kZUdlblRhcmdldDo6U2V0dGluZ3NNYXAAAAAAA"
"gAAABwAUABMAEUAQwBTACAAUgBUACAAQgBvAHgAIAAyAAAALAAAABoARQBYAFQARQBSAE4AQQBMAF"
"8ATQBPAEQARQAAAAIAMQAAABoAVABBAFIARwBFAFQAXwBEAEUAVgBJAEMARf////8AAABKAFUAUwB"
"FAF8ARABBAFQAQQBfAFQAWQBQAEUAUwBfAEYATwBSAF8AVABVAE4AQQBCAEwARQBfAFAAQQBSAEEA"
"TQBFAFQARQBSAFMAAAACADEAAAA6AFUAUwBFAF8ARQBYAFQARQBSAE4AXwBNAE8ARABFAEwAXwBEA"
"EEAVABBAF8AUwBUAFIAVQBDAFQAUwAAAAIAMAAAACAAYQBuAGEAbABvAGcASQBuAHAAdQB0AFIAYQ"
"BuAGcAZQAAAAIAMQAAACIAYQBuAGEAbABvAGcATwB1AHQAcAB1AHQAUgBhAG4AZwBlAAAAAgAxAAA"
"AHABhAG4AYQBsAG8AZwBTAGEAbQBwAGwAaQBuAGcAAAACADEAAAAQAGMAYQBuADEAQgBhAHUAZAAA"
"AAwANQAwADAAMAAwADAAAAAUAGMAYQBuADEARQBuAGEAYgBsAGUAAAACADAAAAAiAGMAYQBuADEAU"
"gBlAGMAbwB2AGUAcgB5AEQAZQBsAGEAeQAAAAIAMAAAAB4AYwBhAG4AMQBUAGUAcgBtAGkAbgBhAH"
"QAaQBvAG4AAAACADIAAAAQAGMAYQBuADEAVAB4AFIAeAAAAAIAMQAAABAAYwBhAG4AMgBCAGEAdQB"
"kAAAADAA1ADAAMAAwADAAMAAAABQAYwBhAG4AMgBFAG4AYQBiAGwAZQAAAAIAMAAAACIAYwBhAG4A"
"MgBSAGUAYwBvAHYAZQByAHkARABlAGwAYQB5AAAAAgAwAAAAHgBjAGEAbgAyAFQAZQByAG0AaQBuA"
"GEAdABpAG8AbgAAAAIAMgAAABAAYwBhAG4AMgBUAHgAUgB4AAAAAgAxAAAAJABkAGkAZwBpAHQAYQ"
"BsAE8AdQB0AHAAdQB0AEwAZQB2AGUAbAAAAAIAMQAAABIAZQBuAGEAYgBsAGUAWABDAFAAAAACADA"
"AAAAwAGgAYQBzAEgAYQByAGQAdwBhAHIAZQBQAHIAZQBwAHIAbwBjAGUAcwBzAGkAbgBnAAAAAgAx"
"AAAAKgBoAGEAcwBIAGEAcgBkAHcAYQByAGUAUwBpAG0AdQBsAGEAdABpAG8AbgAAAAIAMQAAACIAa"
"ABhAHMATgBhAG4AbwBzAHQAZQBwAFMAbwBsAHYAZQByAAAAAgAxAAAAEgBtAGEAcwB0AGUAcgBTAE"
"YAUAAAAAIAMQAAABgAbQBhAHgAXwBvAHYAZQByAHIAdQBuAHMAAAACADUAAAAgAG4AYQBuAG8AUwB"
"0AGUAcABCAGkAdABXAGkAZAB0AGgAAAAEADIANgAAABIAbgBhAG4AbwBTAHQAZQBwAFAAAAAEADEA"
"MQAAABgAbgBhAG4AbwBTAHQAZQBwAFMAaQB6AGUAAAAIADQAZQAtADkAAAAeAG4AYQBuAG8AUwB0A"
"GUAcABWAGUAcgBzAGkAbwBuAAAAAAAAAC4AbgBhAG4AbwBzAHQAZQBwAEQAUwB1AGIATwB1AHQAcA"
"B1AHQAUgBhAG4AZwBlAAAAAgAxAAAAGABuAHUAbQBEAGkAZwBpAHQAYQBsAEkAbgAAAAQAMwAyAAA"
"AGABwAHcAbQBDAGwAawBQAGUAcgBpAG8AZAAAAA4AMQAvADEANQAwAGUANgAAABoAcwBhAG0AcABs"
"AGkAbgBnAEQAZQBsAGEAeQAAAAIAMAAAABwAcwBpAG0AdQBsAGEAdABpAG8AbgBNAG8AZABlAAAAA"
"gAyAAAAGABzAHQAYQByAHQAdQBwAFMARgBQAF8AQQAAAAIAMAAAABgAcwB0AGEAcgB0AHUAcABTAE"
"YAUABfAEIAAAACADAAAAAYAHMAdABhAHIAdAB1AHAAUwBGAFAAXwBDAAAAAgAwAAAAGABzAHQAYQB"
"yAHQAdQBwAFMARgBQAF8ARAAAAAIAMAAAABgAcwB0AGEAcgB0AHUAcABTAEYAUABfAEUAAAACADAA"
"AAAYAHMAdABhAHIAdAB1AHAAUwBGAFAAXwBGAAAAAgAwAAAAGABzAHQAYQByAHQAdQBwAFMARgBQA"
"F8ARwAAAAIAMAAAABgAcwB0AGEAcgB0AHUAcABTAEYAUABfAEgAAAACADAAAAAeAHMAeQBuAGMAaA"
"ByAG8AbgBpAHoAZQBUAGkAbQBlAAAAAgAwAAAAEAB4AGMAcABTAGwAYQB2AGUAAAAAAAAAIAB4AGM"
"AcABTAGwAYQB2AGUASQBkAGUAbgB0AGkAdAB5AAAAAgAxAAAADgBUAEkAMgA4ADAANgB4AAAAHAAA"
"ABoARQBYAFQARQBSAE4AQQBMAF8ATQBPAEQARQAAAAIAMAAAACIATABpAG4AawBlAHIAQwBvAG0Ab"
"QBhAG4AZABGAGkAbABlAAAAAAAAACAAUwBhAG0AcABsAGUAVABpAG0AZQBSAGUAbABUAG8AbAAAAA"
"QAMQAwAAAAGABTAGUAcgBpAGEAbABOAHUAbQBiAGUAcgAAAAAAAAAqAFMAZQByAGkAYQBsAE4AdQB"
"tAGIAZQByAFMAcABlAGMAaQBmAGkAZQBkAAAAAgAwAAAAGgBUAEEAUgBHAEUAVABfAEQARQBWAEkA"
"QwBF/////wAAABIAVAB6ADEARQBuAGEAYgBsAGUAAAACADAAAAAOAFQAegAxAEcAcABpAG8AAAACA"
"DAAAAASAFQAegAyAEUAbgBhAGIAbABlAAAAAgAwAAAADgBUAHoAMgBHAHAAaQBvAAAAAgAwAAAAEg"
"BUAHoAMwBFAG4AYQBiAGwAZQAAAAIAMAAAAA4AVAB6ADMARwBwAGkAbwAAAAIAMAAAAEoAVQBTAEU"
"AXwBEAEEAVABBAF8AVABZAFAARQBTAF8ARgBPAFIAXwBUAFUATgBBAEIATABFAF8AUABBAFIAQQBN"
"AEUAVABFAFIAUwAAAAIAMQAAADQAVQBTAEUAXwBTAFQAQQBSAFQAXwBUAEkATQBFAF8ASQBOAF8AS"
"QBOAEkAVABfAEYAQwBOAAAAAgAwAAAAEABWAHIAZQBmAEEAZABjAEEAAAAGADMALgAzAAAAGgBWAH"
"IAZQBmAEMAbwBtAGIAbwBCAG8AeABBAAAAAgAxAAAACgBiAG8AYQByAGQAAAACADEAAAAWAGIAdQB"
"pAGwAZABDAG8AbgBmAGkAZwAAAAIAMQAAAAgAYwBoAGkAcAAAAAIAMQAAABIAZQB4AHQAQwBsAGsA"
"TQBIAHoAAAAEADIAMAAAACIAZQB4AHQATQBvAGQAZQBCAHUAZgBmAGUAcgBTAGkAegBlAAAACAAxA"
"DAAMAAwAAAAHABlAHgAdABNAG8AZABlAFMAYwBpAFAAaQBuAHMAAAAOAFsAMgA4ACwAMgA5AF0AAA"
"AOAGcAZQBuAE8AbgBsAHkAAAACADIAAAAUAGkAbgBzAHQAYQBsAGwARABpAHIAAAAAAAAAEgBzAHk"
"AcwBDAGwAawBNAEgAegAAAAQAOQAwAAAAFgB0AGEAcwBrAEYAcgBlAHEAVABvAGwAAAACADEAAAAY"
"AHUAbgBpAGYAbABhAHMAaABGAGkAbABlAAAAAAAAABIAdQBzAGUASQBuAHQATwBzAGMAAAACADE="
  ExtendedMatrixPrecision "1"
  MatrixSignificanceCheck "2"
  RemoveUnusedStateSpaceOutputs "2"
  EnableStateSpaceSplitting "2"
  DisplayStateSpaceSplitting "1"
  DiscretizationMethod "2"
  ExternalModeSettings "AAAAfwAAAAAYQ29kZUdlblRhcmdldDo6U2V0dGluZ3MAAAAABgAAAB"
"QARABlAGMAaQBtAGEAdABpAG8AbgAAAAIAMQAAABQATgB1AG0AUwBhAG0AcABsAGUAcwAAAAgAOAA"
"xADkAMgAAABYAUgBlAGYAcgBlAHMAaABSAGEAdABlAAAABAAyADAAAAAWAFMAZQBuAHMAaQB0AGkA"
"dgBpAHQAeQAAAAIAMAAAABgAVAByAGkAZwBnAGUAcgBEAGUAbABhAHkAAAACADAAAAAYAFQAcgBpA"
"GcAZwBlAHIAVgBhAGwAdQBlAAAAAgAw"
  AlgebraicLoopMethod "1"
  AlgebraicLoopTolerance "1e-6"
  ScriptsDialogGeometry "[534 277 500 244]"
  ScriptsDialogSplitterPos "96"
  MixedSignalSolverBypassOperatingPoint "1"
  MixedSignalSolverInitialConditions "2"
  MixedSignalSolverMaxNewtonIterations "25"
  MixedSignalSolverNumThreads "-1"
  OperatingPointMaxNewtonIterations "50"
  OperatingPointRelativeNewtonTolerance "1e-3"
  OperatingPointAbsoluteNewtonTolerance "1e-12"
  OperatingPointNodalVoltageNewtonTolerance "1e-6"
  SpiceTemperature "27"
  SpiceGMin     "0"
  SpiceInductorRPar "0"
  SpiceInductorRSer "0"
  SpiceCapacitorGPar "0"
  SpiceCapacitorRSer "0"
  NetlistParserDetails "2"
  InvalidNetlistFunctionEvaluationMsg "1"
  IncompatibleInitialConditionMsg "2"
  Schematic {
    Location      [0, 24; 1602, 961]
    ZoomFactor    1.36419
    SliderPosition [0, 0]
    ShowBrowser   off
    BrowserWidth  158
    Component {
      Type          Subsystem
      Name          "Controller"
      Show          on
      Position      [960, 385]
      Direction     up
      Flipped       off
      LabelPosition none
      Frame         [-85, -50; 85, 50]
      TreatAsAtomicUnit on
      SampleTime    "-1"
      TaskingMode "1"
      CodeGenEnable on
      CodeGenSampleTime "100e-6"
      CodeGenDiscretizationMethod "2"
      CodeGenTarget "TI2806x"
      CodeGenTargetSettings "AAAAfwAAAAAbQ29kZUdlblRhcmdldDo6U2V0dGluZ3NNYXAAA"
"AAAAQAAAA4AVABJADIAOAAwADYAeAAAABwAAAAaAEUAWABUAEUAUgBOAEEATABfAE0ATwBEAEUAAA"
"ACADAAAAAiAEwAaQBuAGsAZQByAEMAbwBtAG0AYQBuAGQARgBpAGwAZQAAAAAAAAAgAFMAYQBtAHA"
"AbABlAFQAaQBtAGUAUgBlAGwAVABvAGwAAAAEADEAMAAAABgAUwBlAHIAaQBhAGwATgB1AG0AYgBl"
"AHIAAAAAAAAAKgBTAGUAcgBpAGEAbABOAHUAbQBiAGUAcgBTAHAAZQBjAGkAZgBpAGUAZAAAAAIAM"
"AAAABoAVABBAFIARwBFAFQAXwBEAEUAVgBJAEMARf////8AAAASAFQAegAxAEUAbgBhAGIAbABlAA"
"AAAgAwAAAADgBUAHoAMQBHAHAAaQBvAAAAAgAwAAAAEgBUAHoAMgBFAG4AYQBiAGwAZQAAAAIAMAA"
"AAA4AVAB6ADIARwBwAGkAbwAAAAIAMAAAABIAVAB6ADMARQBuAGEAYgBsAGUAAAACADAAAAAOAFQA"
"egAzAEcAcABpAG8AAAACADAAAABKAFUAUwBFAF8ARABBAFQAQQBfAFQAWQBQAEUAUwBfAEYATwBSA"
"F8AVABVAE4AQQBCAEwARQBfAFAAQQBSAEEATQBFAFQARQBSAFMAAAACADEAAAA0AFUAUwBFAF8AUw"
"BUAEEAUgBUAF8AVABJAE0ARQBfAEkATgBfAEkATgBJAFQAXwBGAEMATgAAAAIAMAAAABAAVgByAGU"
"AZgBBAGQAYwBBAAAABgAzAC4AMwAAABoAVgByAGUAZgBDAG8AbQBiAG8AQgBvAHgAQQAAAAIAMQAA"
"AAoAYgBvAGEAcgBkAAAAAgAyAAAAFgBiAHUAaQBsAGQAQwBvAG4AZgBpAGcAAAACADIAAAAIAGMAa"
"ABpAHAAAAACADEAAAASAGUAeAB0AEMAbABrAE0ASAB6AAAABAAyADAAAAAiAGUAeAB0AE0AbwBkAG"
"UAQgB1AGYAZgBlAHIAUwBpAHoAZQAAAAgAMQAwADAAMAAAABwAZQB4AHQATQBvAGQAZQBTAGMAaQB"
"QAGkAbgBzAAAADgBbADIAOAAsADIAOQBdAAAADgBnAGUAbgBPAG4AbAB5AAAAAgAyAAAAFABpAG4A"
"cwB0AGEAbABsAEQAaQByAAAAAAAAABIAcwB5AHMAQwBsAGsATQBIAHoAAAAEADkAMAAAABYAdABhA"
"HMAawBGAHIAZQBxAFQAbwBsAAAAAgAyAAAAGAB1AG4AaQBmAGwAYQBzAGgARgBpAGwAZQAAAAAAAA"
"ASAHUAcwBlAEkAbgB0AE8AcwBjAAAAAgAx"
      CodeGenFloatingPointFormat "1"
      ExternalModeSettings "AAAAfwAAAAAYQ29kZUdlblRhcmdldDo6U2V0dGluZ3MAAAAABg"
"AAABQARABlAGMAaQBtAGEAdABpAG8AbgAAAAIAMQAAABQATgB1AG0AUwBhAG0AcABsAGUAcwAAAAg"
"AOAAxADkAMgAAABYAUgBlAGYAcgBlAHMAaABSAGEAdABlAAAABAAyADAAAAAWAFMAZQBuAHMAaQB0"
"AGkAdgBpAHQAeQAAAAIAMAAAABgAVAByAGkAZwBnAGUAcgBEAGUAbABhAHkAAAACADAAAAAYAFQAc"
"gBpAGcAZwBlAHIAVgBhAGwAdQBlAAAAAgAw"
      MaskDisplayLang "2"
      MaskIconFrame on
      MaskIconOpaque off
      MaskIconRotates on
      Terminal {
        Type          Input
        Position      [-85, -30]
        Direction     left
        Index         "4"
      }
      Terminal {
        Type          Output
        Position      [89, -25]
        Direction     right
        Index         "2"
      }
      Terminal {
        Type          Input
        Position      [-85, -45]
        Direction     left
        Index         "3"
      }
      Terminal {
        Type          Output
        Position      [89, -45]
        Direction     right
        Index         "1"
      }
      Terminal {
        Type          Input
        Position      [-85, -20]
        Direction     left
        Index         "2"
      }
      Terminal {
        Type          Input
        Position      [-85, -10]
        Direction     left
        Index         "1"
      }
      Schematic {
        Location      [0, 24; 1920, 991]
        ZoomFactor    0.509533
        SliderPosition [0, 0]
        ShowBrowser   off
        BrowserWidth  100
        Component {
          Type          Reference
          SrcComponent  "Components/Control/Transformations/3ph->RRF"
          Name          "3ph->RRF"
          Show          on
          Position      [520, 220]
          Direction     up
          Flipped       off
          LabelPosition south
          Frame         [-15, -15; 15, 15]
          Terminal {
            Type          Input
            Position      [-15, -5]
            Direction     left
          }
          Terminal {
            Type          Output
            Position      [19, 0]
            Direction     right
          }
          Terminal {
            Type          Input
            Position      [-15, 5]
            Direction     left
          }
        }
        Component {
          Type          Reference
          SrcComponent  "Components/Control/Continuous/Three-Phase PLL"
          Name          "Three-Phase PLL"
          Show          on
          Position      [545, 155]
          Direction     up
          Flipped       off
          LabelPosition south
          Frame         [-40, -20; 40, 20]
          Parameter {
            Variable      "type"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "f0"
            Value         "2*pi*50"
            Show          off
          }
          Parameter {
            Variable      "Vpk"
            Value         "35000*sqrt(2)"
            Show          off
          }
          Parameter {
            Variable      "theta0"
            Value         "0"
            Show          off
          }
          Parameter {
            Variable      "units"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "contr_design"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "kp"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "ki"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "k"
            Value         "1"
            Show          off
          }
          Terminal {
            Type          Input
            Position      [-40, 0]
            Direction     left
          }
          Terminal {
            Type          Output
            Position      [44, -10]
            Direction     right
          }
          Terminal {
            Type          Output
            Position      [44, 0]
            Direction     right
          }
          Terminal {
            Type          Output
            Position      [44, 10]
            Direction     right
          }
        }
        Component {
          Type          Scope
          Name          base64 "6ZSB55u4546v"
          Show          on
          Position      [720, 155]
          Direction     up
          Flipped       off
          LabelPosition south
          Frame         [-15, -20; 15, 20]
          Location      [7, 30; 1543, 862]
          State         "AAAA/wAAAAD9AAAAAgAAAAEAAAAAAAAAAPwCAAAAA/sAAAAQAFoAb"
"wBvAG0AQQByAGUAYQAAAAAA/////wAAAH8A////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwAAAA"
"AA/////wAAAGEA////+wAAAAwAVAByAGEAYwBlAHMAAAAAAP////8AAABhAP///wAAAAMAAAAAAAA"
"AAPwBAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQAAAAAAP////8AAABEAP///wAABgAAAAMh"
"AAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP////8AA"
"AAAAAAAAA=="
          SavedViews    "AAAAAgAAAAA="
          HeaderState   "{\"DefaultSecSize\":0,\"FirstSecSize\":67,\"Labels\":"
"[],\"VisualIdxs\":[]}"
          PlotPalettes  "AAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
"AAAA=="
          Axes          "3"
          TimeRange     "0"
          ScrollingMode "1"
          SingleTimeAxis "1"
          Open          "0"
          Ts            "-1"
          SampleLimit   "25000"
          XAxisLabel    "Time / s"
          ShowLegend    "1"
          Axis {
            Name          ""
            AutoScale     1
            MinValue      0
            MaxValue      1
            Signals       {}
            SignalTypes   [ ]
            Untangle      0
            KeepBaseline  off
            BaselineValue 0
          }
          Axis {
            Name          ""
            AutoScale     1
            MinValue      0
            MaxValue      1
            Signals       {}
            SignalTypes   [ ]
            Untangle      0
            KeepBaseline  off
            BaselineValue 0
          }
          Axis {
            Name          ""
            AutoScale     1
            MinValue      0
            MaxValue      1
            Signals       {}
            SignalTypes   [ ]
            Untangle      0
            KeepBaseline  off
            BaselineValue 0
          }
          Fourier {
            SingleXAxis       on
            AxisLabel         "Frequency / Hz"
            Scaling           0
            PhaseDisplay      0
            ShowFourierLegend off
            Axis {
              Name          ""
              AutoScale     1
              MinValue      0
              MaxValue      1
              Signals       {}
              Untangle      0
              KeepBaseline  off
              BaselineValue 0
            }
            Axis {
              Name          ""
              AutoScale     1
              MinValue      0
              MaxValue      1
              Signals       {}
              Untangle      0
              KeepBaseline  off
              BaselineValue 0
            }
            Axis {
              Name          ""
              AutoScale     1
              MinValue      0
              MaxValue      1
              Signals       {}
              Untangle      0
              KeepBaseline  off
              BaselineValue 0
            }
          }
        }
        Component {
          Type          Goto
          Name          "Goto2"
          Show          off
          Position      [645, 120]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "theta"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          From
          Name          "From1"
          Show          off
          Position      [480, 225]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "theta"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          SignalDemux
          Name          "Demux"
          Show          off
          Position      [575, 220]
          Direction     right
          Flipped       on
          LabelPosition south
          Frame         [-7, -10; 2, 10]
          Parameter {
            Variable      "Width"
            Value         "2"
            Show          off
          }
        }
        Component {
          Type          Goto
          Name          "Goto"
          Show          off
          Position      [605, 215]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "Ud"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Goto
          Name          "Goto1"
          Show          off
          Position      [605, 225]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "Uq"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          SignalDemux
          Name          "Demux1"
          Show          off
          Position      [510, 285]
          Direction     right
          Flipped       on
          LabelPosition south
          Frame         [-7, -15; 2, 15]
          Parameter {
            Variable      "Width"
            Value         "3"
            Show          off
          }
        }
        Component {
          Type          Sum
          Name          "Subtract"
          Show          off
          Position      [565, 280]
          Direction     up
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "IconShape"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "Inputs"
            Value         "+-"
            Show          off
          }
          Parameter {
            Variable      "DataType"
            Value         "11"
            Show          off
          }
          Parameter {
            Variable      "DataTypeOverflowMode"
            Value         "1"
            Show          off
          }
        }
        Component {
          Type          Sum
          Name          "Subtract1"
          Show          off
          Position      [565, 310]
          Direction     up
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "IconShape"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "Inputs"
            Value         "+-"
            Show          off
          }
          Parameter {
            Variable      "DataType"
            Value         "11"
            Show          off
          }
          Parameter {
            Variable      "DataTypeOverflowMode"
            Value         "1"
            Show          off
          }
        }
        Component {
          Type          Sum
          Name          "Subtract2"
          Show          off
          Position      [565, 340]
          Direction     up
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "IconShape"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "Inputs"
            Value         "+-"
            Show          off
          }
          Parameter {
            Variable      "DataType"
            Value         "11"
            Show          off
          }
          Parameter {
            Variable      "DataTypeOverflowMode"
            Value         "1"
            Show          off
          }
        }
        Component {
          Type          Gain
          Name          "Gain"
          Show          on
          Position      [645, 290]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "K"
            Value         "1/3"
            Show          off
          }
          Parameter {
            Variable      "Multiplication"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "OutputDataType"
            Value         "11"
            Show          off
          }
          Parameter {
            Variable      "DataTypeOverflowMode"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "GainDataType"
            Value         "11"
            Show          off
          }
        }
        Component {
          Type          SignalMux
          Name          "Mux"
          Show          off
          Position      [605, 290]
          Direction     right
          Flipped       off
          LabelPosition south
          Frame         [-2, -15; 7, 15]
          Parameter {
            Variable      "Width"
            Value         "3"
            Show          off
          }
        }
        Component {
          Type          Reference
          SrcComponent  "Components/Control/Transformations/3ph->RRF"
          Name          "3ph->RRF1"
          Show          on
          Position      [710, 295]
          Direction     up
          Flipped       off
          LabelPosition south
          Frame         [-15, -15; 15, 15]
          Terminal {
            Type          Input
            Position      [-15, -5]
            Direction     left
          }
          Terminal {
            Type          Output
            Position      [19, 0]
            Direction     right
          }
          Terminal {
            Type          Input
            Position      [-15, 5]
            Direction     left
          }
        }
        Component {
          Type          From
          Name          "From4"
          Show          off
          Position      [645, 340]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "theta"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          SignalDemux
          Name          "Demux2"
          Show          off
          Position      [755, 295]
          Direction     right
          Flipped       on
          LabelPosition south
          Frame         [-7, -10; 2, 10]
          Parameter {
            Variable      "Width"
            Value         "2"
            Show          off
          }
        }
        Component {
          Type          Goto
          Name          "Goto4"
          Show          off
          Position      [790, 300]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "ILq"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Reference
          SrcComponent  "Components/Control/Transformations/3ph->RRF"
          Name          "3ph->RRF2"
          Show          on
          Position      [550, 380]
          Direction     up
          Flipped       off
          LabelPosition south
          Frame         [-15, -15; 15, 15]
          Terminal {
            Type          Input
            Position      [-15, -5]
            Direction     left
          }
          Terminal {
            Type          Output
            Position      [19, 0]
            Direction     right
          }
          Terminal {
            Type          Input
            Position      [-15, 5]
            Direction     left
          }
        }
        Component {
          Type          From
          Name          "From6"
          Show          off
          Position      [480, 385]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "theta"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Goto
          Name          "Goto5"
          Show          off
          Position      [660, 375]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "Icd"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          SignalDemux
          Name          "Demux4"
          Show          off
          Position      [595, 380]
          Direction     right
          Flipped       on
          LabelPosition south
          Frame         [-7, -10; 2, 10]
          Parameter {
            Variable      "Width"
            Value         "2"
            Show          off
          }
        }
        Component {
          Type          Goto
          Name          "Goto6"
          Show          off
          Position      [660, 385]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "Icq"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Scope
          Name          "Scope"
          Show          on
          Position      [720, 215]
          Direction     up
          Flipped       off
          LabelPosition south
          Frame         [-15, -15; 15, 15]
          Location      [0, 24; 1536, 806]
          State         "AAAA/wAAAAD9AAAAAgAAAAEAAAAAAAAAAPwCAAAAA/sAAAAQAFoAb"
"wBvAG0AQQByAGUAYQAAAAAA/////wAAAFcA////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwAAAA"
"AA/////wAAAGEA////+wAAAAwAVAByAGEAYwBlAHMAAAAAAP////8AAABhAP///wAAAAMAAAYAAAA"
"Am/wBAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQBAAAAAAAABgAAAABEAP///wAABgAAAAJO"
"AAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP////8AA"
"AAAAAAAAA=="
          SavedViews    "AAAAAgAAAAA="
          HeaderState   "{\"DefaultSecSize\":0,\"FirstSecSize\":67,\"Labels\":"
"[],\"VisualIdxs\":[]}"
          PlotPalettes  "AAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="
          Axes          "2"
          TimeRange     "0"
          ScrollingMode "1"
          SingleTimeAxis "1"
          Open          "0"
          Ts            "-1"
          SampleLimit   "25000"
          XAxisLabel    "Time / s"
          ShowLegend    "1"
          Axis {
            Name          ""
            AutoScale     1
            MinValue      0
            MaxValue      1
            Signals       {}
            SignalTypes   [ ]
            Untangle      0
            KeepBaseline  off
            BaselineValue 0
          }
          Axis {
            Name          ""
            AutoScale     1
            MinValue      0
            MaxValue      1
            Signals       {}
            SignalTypes   [ ]
            Untangle      0
            KeepBaseline  off
            BaselineValue 0
          }
          Fourier {
            SingleXAxis       on
            AxisLabel         "Frequency / Hz"
            Scaling           0
            PhaseDisplay      0
            ShowFourierLegend off
            Axis {
              Name          ""
              AutoScale     1
              MinValue      0
              MaxValue      1
              Signals       {}
              Untangle      0
              KeepBaseline  off
              BaselineValue 0
            }
            Axis {
              Name          ""
              AutoScale     1
              MinValue      0
              MaxValue      1
              Signals       {}
              Untangle      0
              KeepBaseline  off
              BaselineValue 0
            }
          }
        }
        Component {
          Type          Trigonometry
          Name          "Trigonometric\nFunction"
          Show          on
          Position      [670, 210]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Operator"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "Unit"
            Value         "1"
            Show          off
          }
        }
        Component {
          Type          Scope
          Name          "Scope1"
          Show          on
          Position      [535, 430]
          Direction     up
          Flipped       off
          LabelPosition south
          Frame         [-15, -15; 15, 15]
          Location      [7, 30; 1543, 871]
          State         "AAAA/wAAAAD9AAAAAgAAAAEAAAAAAAAAAPwCAAAAA/sAAAAQAFoAb"
"wBvAG0AQQByAGUAYQAAAAAA/////wAAAC8A////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwAAAA"
"AA/////wAAAGEA////+wAAAAwAVAByAGEAYwBlAHMAAAAAAP////8AAABhAP///wAAAAMAAAAAAAA"
"AAPwBAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQAAAAAAP////8AAABEAP///wAABgAAAAMq"
"AAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP////8AA"
"AAAAAAAAA=="
          SavedViews    "AAAAAgAAAAA="
          HeaderState   "{\"DefaultSecSize\":0,\"FirstSecSize\":187,\"Labels\""
":[],\"VisualIdxs\":[]}"
          PlotPalettes  "AAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
          Axes          "1"
          TimeRange     "0.0"
          ScrollingMode "1"
          SingleTimeAxis "1"
          Open          "0"
          Ts            "-1"
          SampleLimit   "25000"
          XAxisLabel    "Time / s"
          ShowLegend    "1"
          Axis {
            Name          ""
            AutoScale     1
            MinValue      0
            MaxValue      1
            Signals       {}
            SignalTypes   [ ]
            Untangle      0
            KeepBaseline  off
            BaselineValue 0
          }
          Fourier {
            SingleXAxis       on
            AxisLabel         "Frequency / Hz"
            Scaling           0
            PhaseDisplay      0
            ShowFourierLegend off
            Axis {
              Name          ""
              AutoScale     1
              MinValue      0
              MaxValue      1
              Signals       {}
              Untangle      0
              KeepBaseline  off
              BaselineValue 0
            }
          }
        }
        Component {
          Type          TransferFunction
          Name          "Transfer Fcn"
          Show          on
          Position      [820, 255]
          Direction     right
          Flipped       off
          LabelPosition south
          Frame         [-30, -15; 30, 15]
          Parameter {
            Variable      "Numerator"
            Value         "[0 0 10000*pi*pi]"
            Show          off
          }
          Parameter {
            Variable      "Denominator"
            Value         "[1 141.4*pi 10000*pi*pi]"
            Show          off
          }
          Parameter {
            Variable      "X0"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Sum
          Name          "Sum1"
          Show          off
          Position      [915, 260]
          Direction     up
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "IconShape"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "Inputs"
            Value         "+-"
            Show          off
          }
          Parameter {
            Variable      "DataType"
            Value         "11"
            Show          off
          }
          Parameter {
            Variable      "DataTypeOverflowMode"
            Value         "1"
            Show          off
          }
        }
        Component {
          Type          Goto
          Name          "Goto7"
          Show          off
          Position      [990, 260]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "Idharmonic"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Constant
          Name          "Constant"
          Show          on
          Position      [645, 825]
          Direction     right
          Flipped       off
          LabelPosition south
          Frame         [-10, -10; 10, 10]
          Parameter {
            Variable      "Value"
            Value         "35000*sqrt(2)*1.25"
            Show          off
          }
          Parameter {
            Variable      "DataType"
            Value         "10"
            Show          off
          }
        }
        Component {
          Type          Sum
          Name          "Subtract3"
          Show          off
          Position      [850, 830]
          Direction     up
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "IconShape"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "Inputs"
            Value         "+-"
            Show          off
          }
          Parameter {
            Variable      "DataType"
            Value         "11"
            Show          off
          }
          Parameter {
            Variable      "DataTypeOverflowMode"
            Value         "1"
            Show          off
          }
        }
        Component {
          Type          Gain
          Name          "Gain3"
          Show          on
          Position      [760, 895]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "K"
            Value         "1/3"
            Show          off
          }
          Parameter {
            Variable      "Multiplication"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "OutputDataType"
            Value         "11"
            Show          off
          }
          Parameter {
            Variable      "DataTypeOverflowMode"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "GainDataType"
            Value         "11"
            Show          off
          }
        }
        Component {
          Type          Sum
          Name          "Sum3"
          Show          off
          Position      [700, 895]
          Direction     up
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "IconShape"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "Inputs"
            Value         "+++"
            Show          off
          }
          Parameter {
            Variable      "DataType"
            Value         "11"
            Show          off
          }
          Parameter {
            Variable      "DataTypeOverflowMode"
            Value         "1"
            Show          off
          }
        }
        Component {
          Type          From
          Name          "From8"
          Show          off
          Position      [430, 840]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "Udcab"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          From
          Name          "From10"
          Show          off
          Position      [465, 930]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "Udcca"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Reference
          SrcComponent  "Components/Control/Continuous/Continuous PID\\nContro"
"ller"
          Name          "Continuous PID\nController2"
          Show          on
          Position      [990, 830]
          Direction     up
          Flipped       off
          LabelPosition south
          Frame         [-40, -25; 40, 25]
          Parameter {
            Variable      "cont_type"
            Value         "3"
            Show          off
          }
          Parameter {
            Variable      "par_source"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "kp"
            Value         "0.3"
            Show          off
          }
          Parameter {
            Variable      "ki"
            Value         "3.5"
            Show          off
          }
          Parameter {
            Variable      "kd"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "kf"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "ex_reset"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "x0_source"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "x0"
            Value         "0"
            Show          off
          }
          Parameter {
            Variable      "ex_sat"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "sat_lim"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "up_limit"
            Value         "300"
            Show          off
          }
          Parameter {
            Variable      "low_limit"
            Value         "-300"
            Show          off
          }
          Parameter {
            Variable      "aw_method"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "kbc"
            Value         "1"
            Show          off
          }
          Terminal {
            Type          Input
            Position      [-40, 0]
            Direction     left
          }
          Terminal {
            Type          Output
            Position      [44, 0]
            Direction     right
          }
          Terminal {
            Type          Input
            Position      [-5, -25]
            Direction     up
          }
          Terminal {
            Type          Input
            Position      [5, -25]
            Direction     up
          }
          Terminal {
            Type          Input
            Position      [15, -25]
            Direction     up
          }
          Terminal {
            Type          Input
            Position      [-40, -15]
            Direction     left
          }
          Terminal {
            Type          Input
            Position      [-40, 10]
            Direction     left
          }
          Terminal {
            Type          Input
            Position      [25, -25]
            Direction     up
          }
          Terminal {
            Type          Input
            Position      [35, -25]
            Direction     up
          }
          Terminal {
            Type          Input
            Position      [-40, -20]
            Direction     left
          }
          Terminal {
            Type          Input
            Position      [-40, -10]
            Direction     left
          }
          Terminal {
            Type          Input
            Position      [-40, 20]
            Direction     left
          }
        }
        Component {
          Type          Goto
          Name          "Goto14"
          Show          off
          Position      [1080, 830]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "Idref"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Goto
          Name          "Goto15"
          Show          off
          Position      [840, 895]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "Udcav"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Scope
          Name          "Scope2"
          Show          on
          Position      [870, 790]
          Direction     up
          Flipped       off
          LabelPosition south
          Frame         [-15, -15; 15, 15]
          Location      [0, 24; 1539, 847]
          State         "AAAA/wAAAAD9AAAAAgAAAAEAAAAAAAAAAPwCAAAAA/sAAAAQAFoAb"
"wBvAG0AQQByAGUAYQAAAAAA/////wAAAC8A////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwAAAA"
"AA/////wAAAGEA////+wAAAAwAVAByAGEAYwBlAHMAAAAAAP////8AAABhAP///wAAAAMAAAeAAAA"
"AVfwBAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQCAAAAAAAAAgYAAAYAAAAAVQAABgMAAAMY"
"AAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP////8AA"
"AAAAAAAAA=="
          SavedViews    "AAAAAgAAAAA="
          HeaderState   "{\"DefaultSecSize\":0,\"FirstSecSize\":113,\"Labels\""
":[\"Delta\"],\"VisualIdxs\":[3]}"
          PlotPalettes  "AAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
          Axes          "1"
          TimeRange     "0"
          ScrollingMode "1"
          SingleTimeAxis "1"
          Open          "0"
          Ts            "-1"
          SampleLimit   "25000"
          XAxisLabel    "Time / s"
          ShowLegend    "2"
          Axis {
            Name          base64 "5oC75L2T55S15Y6L5o6n5Yi2"
            AutoScale     1
            MinValue      0
            MaxValue      1
            Signals       {}
            SignalTypes   [ ]
            Untangle      0
            KeepBaseline  off
            BaselineValue 0
          }
          Fourier {
            SingleXAxis       on
            AxisLabel         "Frequency / Hz"
            Scaling           0
            PhaseDisplay      0
            ShowFourierLegend off
            Axis {
              Name          ""
              AutoScale     1
              MinValue      0
              MaxValue      1
              Signals       {}
              Untangle      0
              KeepBaseline  off
              BaselineValue 0
            }
          }
        }
        Component {
          Type          SignalMux
          Name          "Mux7"
          Show          off
          Position      [820, 790]
          Direction     right
          Flipped       off
          LabelPosition south
          Frame         [-2, -10; 7, 10]
          Parameter {
            Variable      "Width"
            Value         "2"
            Show          off
          }
        }
        Component {
          Type          TransferFunction
          Name          "Transfer Fcn1"
          Show          on
          Position      [545, 840]
          Direction     right
          Flipped       off
          LabelPosition south
          Frame         [-30, -15; 30, 15]
          Parameter {
            Variable      "Numerator"
            Value         "[1 0 10000*pi*pi]"
            Show          off
          }
          Parameter {
            Variable      "Denominator"
            Value         "[1 141.4*pi 10000*pi*pi]"
            Show          off
          }
          Parameter {
            Variable      "X0"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          TransferFunction
          Name          "Transfer Fcn2"
          Show          on
          Position      [510, 885]
          Direction     right
          Flipped       off
          LabelPosition south
          Frame         [-30, -15; 30, 15]
          Parameter {
            Variable      "Numerator"
            Value         "[1 0 10000*pi*pi]"
            Show          off
          }
          Parameter {
            Variable      "Denominator"
            Value         "[1 141.4*pi 10000*pi*pi]"
            Show          off
          }
          Parameter {
            Variable      "X0"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          TransferFunction
          Name          "Transfer Fcn3"
          Show          on
          Position      [550, 930]
          Direction     right
          Flipped       off
          LabelPosition south
          Frame         [-30, -15; 30, 15]
          Parameter {
            Variable      "Numerator"
            Value         "[1 0 10000*pi*pi]"
            Show          off
          }
          Parameter {
            Variable      "Denominator"
            Value         "[1 141.4*pi 10000*pi*pi]"
            Show          off
          }
          Parameter {
            Variable      "X0"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          From
          Name          "From11"
          Show          off
          Position      [1335, 515]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "Udcav"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          From
          Name          "From12"
          Show          off
          Position      [1275, 540]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "Udcab"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          From
          Name          "From13"
          Show          off
          Position      [1275, 615]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "Udcbc"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          From
          Name          "From14"
          Show          off
          Position      [1275, 685]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "Udcca"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Sum
          Name          "Subtract4"
          Show          off
          Position      [1410, 535]
          Direction     up
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "IconShape"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "Inputs"
            Value         "+-"
            Show          off
          }
          Parameter {
            Variable      "DataType"
            Value         "11"
            Show          off
          }
          Parameter {
            Variable      "DataTypeOverflowMode"
            Value         "1"
            Show          off
          }
        }
        Component {
          Type          Sum
          Name          "Subtract5"
          Show          off
          Position      [1410, 610]
          Direction     up
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "IconShape"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "Inputs"
            Value         "+-"
            Show          off
          }
          Parameter {
            Variable      "DataType"
            Value         "11"
            Show          off
          }
          Parameter {
            Variable      "DataTypeOverflowMode"
            Value         "1"
            Show          off
          }
        }
        Component {
          Type          Sum
          Name          "Subtract6"
          Show          off
          Position      [1410, 680]
          Direction     up
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "IconShape"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "Inputs"
            Value         "+-"
            Show          off
          }
          Parameter {
            Variable      "DataType"
            Value         "11"
            Show          off
          }
          Parameter {
            Variable      "DataTypeOverflowMode"
            Value         "1"
            Show          off
          }
        }
        Component {
          Type          Reference
          SrcComponent  "Components/Control/Continuous/Continuous PID\\nContro"
"ller"
          Name          "Continuous PID\nController3"
          Show          on
          Position      [1505, 535]
          Direction     up
          Flipped       off
          LabelPosition south
          Frame         [-40, -25; 40, 25]
          Parameter {
            Variable      "cont_type"
            Value         "3"
            Show          off
          }
          Parameter {
            Variable      "par_source"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "kp"
            Value         "0.15"
            Show          off
          }
          Parameter {
            Variable      "ki"
            Value         "3"
            Show          off
          }
          Parameter {
            Variable      "kd"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "kf"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "ex_reset"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "x0_source"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "x0"
            Value         "0"
            Show          off
          }
          Parameter {
            Variable      "ex_sat"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "sat_lim"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "up_limit"
            Value         "inf"
            Show          off
          }
          Parameter {
            Variable      "low_limit"
            Value         "-inf"
            Show          off
          }
          Parameter {
            Variable      "aw_method"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "kbc"
            Value         "1"
            Show          off
          }
          Terminal {
            Type          Input
            Position      [-40, 0]
            Direction     left
          }
          Terminal {
            Type          Output
            Position      [44, 0]
            Direction     right
          }
          Terminal {
            Type          Input
            Position      [-5, -25]
            Direction     up
          }
          Terminal {
            Type          Input
            Position      [5, -25]
            Direction     up
          }
          Terminal {
            Type          Input
            Position      [15, -25]
            Direction     up
          }
          Terminal {
            Type          Input
            Position      [-40, -15]
            Direction     left
          }
          Terminal {
            Type          Input
            Position      [-40, 10]
            Direction     left
          }
          Terminal {
            Type          Input
            Position      [25, -25]
            Direction     up
          }
          Terminal {
            Type          Input
            Position      [35, -25]
            Direction     up
          }
          Terminal {
            Type          Input
            Position      [-40, -20]
            Direction     left
          }
          Terminal {
            Type          Input
            Position      [-40, -10]
            Direction     left
          }
          Terminal {
            Type          Input
            Position      [-40, 20]
            Direction     left
          }
        }
        Component {
          Type          Reference
          SrcComponent  "Components/Control/Continuous/Continuous PID\\nContro"
"ller"
          Name          "Continuous PID\nController4"
          Show          on
          Position      [1505, 610]
          Direction     up
          Flipped       off
          LabelPosition south
          Frame         [-40, -25; 40, 25]
          Parameter {
            Variable      "cont_type"
            Value         "3"
            Show          off
          }
          Parameter {
            Variable      "par_source"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "kp"
            Value         "0.15"
            Show          off
          }
          Parameter {
            Variable      "ki"
            Value         "3"
            Show          off
          }
          Parameter {
            Variable      "kd"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "kf"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "ex_reset"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "x0_source"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "x0"
            Value         "0"
            Show          off
          }
          Parameter {
            Variable      "ex_sat"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "sat_lim"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "up_limit"
            Value         "inf"
            Show          off
          }
          Parameter {
            Variable      "low_limit"
            Value         "-inf"
            Show          off
          }
          Parameter {
            Variable      "aw_method"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "kbc"
            Value         "1"
            Show          off
          }
          Terminal {
            Type          Input
            Position      [-40, 0]
            Direction     left
          }
          Terminal {
            Type          Output
            Position      [44, 0]
            Direction     right
          }
          Terminal {
            Type          Input
            Position      [-5, -25]
            Direction     up
          }
          Terminal {
            Type          Input
            Position      [5, -25]
            Direction     up
          }
          Terminal {
            Type          Input
            Position      [15, -25]
            Direction     up
          }
          Terminal {
            Type          Input
            Position      [-40, -15]
            Direction     left
          }
          Terminal {
            Type          Input
            Position      [-40, 10]
            Direction     left
          }
          Terminal {
            Type          Input
            Position      [25, -25]
            Direction     up
          }
          Terminal {
            Type          Input
            Position      [35, -25]
            Direction     up
          }
          Terminal {
            Type          Input
            Position      [-40, -20]
            Direction     left
          }
          Terminal {
            Type          Input
            Position      [-40, -10]
            Direction     left
          }
          Terminal {
            Type          Input
            Position      [-40, 20]
            Direction     left
          }
        }
        Component {
          Type          Reference
          SrcComponent  "Components/Control/Continuous/Continuous PID\\nContro"
"ller"
          Name          "Continuous PID\nController5"
          Show          on
          Position      [1505, 680]
          Direction     up
          Flipped       off
          LabelPosition south
          Frame         [-40, -25; 40, 25]
          Parameter {
            Variable      "cont_type"
            Value         "3"
            Show          off
          }
          Parameter {
            Variable      "par_source"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "kp"
            Value         "0.15"
            Show          off
          }
          Parameter {
            Variable      "ki"
            Value         "3"
            Show          off
          }
          Parameter {
            Variable      "kd"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "kf"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "ex_reset"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "x0_source"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "x0"
            Value         "0"
            Show          off
          }
          Parameter {
            Variable      "ex_sat"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "sat_lim"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "up_limit"
            Value         "inf"
            Show          off
          }
          Parameter {
            Variable      "low_limit"
            Value         "-inf"
            Show          off
          }
          Parameter {
            Variable      "aw_method"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "kbc"
            Value         "1"
            Show          off
          }
          Terminal {
            Type          Input
            Position      [-40, 0]
            Direction     left
          }
          Terminal {
            Type          Output
            Position      [44, 0]
            Direction     right
          }
          Terminal {
            Type          Input
            Position      [-5, -25]
            Direction     up
          }
          Terminal {
            Type          Input
            Position      [5, -25]
            Direction     up
          }
          Terminal {
            Type          Input
            Position      [15, -25]
            Direction     up
          }
          Terminal {
            Type          Input
            Position      [-40, -15]
            Direction     left
          }
          Terminal {
            Type          Input
            Position      [-40, 10]
            Direction     left
          }
          Terminal {
            Type          Input
            Position      [25, -25]
            Direction     up
          }
          Terminal {
            Type          Input
            Position      [35, -25]
            Direction     up
          }
          Terminal {
            Type          Input
            Position      [-40, -20]
            Direction     left
          }
          Terminal {
            Type          Input
            Position      [-40, -10]
            Direction     left
          }
          Terminal {
            Type          Input
            Position      [-40, 20]
            Direction     left
          }
        }
        Component {
          Type          Sum
          Name          "Sum4"
          Show          off
          Position      [1580, 535]
          Direction     up
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "IconShape"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "Inputs"
            Value         "|-+"
            Show          off
          }
          Parameter {
            Variable      "DataType"
            Value         "11"
            Show          off
          }
          Parameter {
            Variable      "DataTypeOverflowMode"
            Value         "1"
            Show          off
          }
        }
        Component {
          Type          Sum
          Name          "Sum5"
          Show          off
          Position      [1580, 610]
          Direction     up
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "IconShape"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "Inputs"
            Value         "|-+"
            Show          off
          }
          Parameter {
            Variable      "DataType"
            Value         "11"
            Show          off
          }
          Parameter {
            Variable      "DataTypeOverflowMode"
            Value         "1"
            Show          off
          }
        }
        Component {
          Type          Sum
          Name          "Sum6"
          Show          off
          Position      [1580, 680]
          Direction     up
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "IconShape"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "Inputs"
            Value         "|-+"
            Show          off
          }
          Parameter {
            Variable      "DataType"
            Value         "11"
            Show          off
          }
          Parameter {
            Variable      "DataTypeOverflowMode"
            Value         "1"
            Show          off
          }
        }
        Component {
          Type          From
          Name          "From15"
          Show          off
          Position      [1545, 760]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "Icd"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Gain
          Name          "Gain4"
          Show          on
          Position      [1635, 535]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "K"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "Multiplication"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "OutputDataType"
            Value         "11"
            Show          off
          }
          Parameter {
            Variable      "DataTypeOverflowMode"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "GainDataType"
            Value         "11"
            Show          off
          }
        }
        Component {
          Type          Product
          Name          "Product1"
          Show          off
          Position      [1745, 535]
          Direction     up
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "IconShape"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "Inputs"
            Value         "|**"
            Show          off
          }
          Parameter {
            Variable      "DataType"
            Value         "11"
            Show          off
          }
          Parameter {
            Variable      "DataTypeOverflowMode"
            Value         "1"
            Show          off
          }
        }
        Component {
          Type          Trigonometry
          Name          "Trigonometric\nFunction1"
          Show          on
          Position      [1680, 580]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Operator"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "Unit"
            Value         "1"
            Show          off
          }
        }
        Component {
          Type          From
          Name          "From16"
          Show          off
          Position      [1545, 790]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "theta"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Constant
          Name          "Constant1"
          Show          on
          Position      [1545, 825]
          Direction     right
          Flipped       off
          LabelPosition south
          Frame         [-10, -10; 10, 10]
          Parameter {
            Variable      "Value"
            Value         "2*pi/3"
            Show          off
          }
          Parameter {
            Variable      "DataType"
            Value         "10"
            Show          off
          }
        }
        Component {
          Type          Sum
          Name          "Sum7"
          Show          off
          Position      [1625, 650]
          Direction     up
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "IconShape"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "Inputs"
            Value         "|+-"
            Show          off
          }
          Parameter {
            Variable      "DataType"
            Value         "11"
            Show          off
          }
          Parameter {
            Variable      "DataTypeOverflowMode"
            Value         "1"
            Show          off
          }
        }
        Component {
          Type          Sum
          Name          "Sum8"
          Show          off
          Position      [1625, 720]
          Direction     up
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "IconShape"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "Inputs"
            Value         "|++"
            Show          off
          }
          Parameter {
            Variable      "DataType"
            Value         "11"
            Show          off
          }
          Parameter {
            Variable      "DataTypeOverflowMode"
            Value         "1"
            Show          off
          }
        }
        Component {
          Type          Trigonometry
          Name          "Trigonometric\nFunction2"
          Show          on
          Position      [1680, 650]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Operator"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "Unit"
            Value         "1"
            Show          off
          }
        }
        Component {
          Type          Trigonometry
          Name          "Trigonometric\nFunction6"
          Show          on
          Position      [1680, 720]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Operator"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "Unit"
            Value         "1"
            Show          off
          }
        }
        Component {
          Type          Product
          Name          "Product2"
          Show          off
          Position      [1745, 610]
          Direction     up
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "IconShape"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "Inputs"
            Value         "|**"
            Show          off
          }
          Parameter {
            Variable      "DataType"
            Value         "11"
            Show          off
          }
          Parameter {
            Variable      "DataTypeOverflowMode"
            Value         "1"
            Show          off
          }
        }
        Component {
          Type          Product
          Name          "Product3"
          Show          off
          Position      [1745, 680]
          Direction     up
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "IconShape"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "Inputs"
            Value         "|**"
            Show          off
          }
          Parameter {
            Variable      "DataType"
            Value         "11"
            Show          off
          }
          Parameter {
            Variable      "DataTypeOverflowMode"
            Value         "1"
            Show          off
          }
        }
        Component {
          Type          SignalMux
          Name          "Mux1"
          Show          off
          Position      [1830, 545]
          Direction     right
          Flipped       off
          LabelPosition south
          Frame         [-2, -15; 7, 15]
          Parameter {
            Variable      "Width"
            Value         "3"
            Show          off
          }
        }
        Component {
          Type          Goto
          Name          "Goto16"
          Show          off
          Position      [1870, 545]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "M2"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Gain
          Name          "Gain5"
          Show          on
          Position      [1635, 610]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "K"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "Multiplication"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "OutputDataType"
            Value         "11"
            Show          off
          }
          Parameter {
            Variable      "DataTypeOverflowMode"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "GainDataType"
            Value         "11"
            Show          off
          }
        }
        Component {
          Type          Gain
          Name          "Gain6"
          Show          on
          Position      [1635, 680]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "K"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "Multiplication"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "OutputDataType"
            Value         "11"
            Show          off
          }
          Parameter {
            Variable      "DataTypeOverflowMode"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "GainDataType"
            Value         "11"
            Show          off
          }
        }
        Component {
          Type          Scope
          Name          "Scope5"
          Show          on
          Position      [1885, 580]
          Direction     up
          Flipped       off
          LabelPosition south
          Frame         [-15, -15; 15, 15]
          Location      [0, 24; 1536, 847]
          State         "AAAA/wAAAAD9AAAAAgAAAAEAAAAAAAAAAPwCAAAAA/sAAAAQAFoAb"
"wBvAG0AQQByAGUAYQAAAAAA/////wAAAC8A////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwAAAA"
"AA/////wAAAGEA////+wAAAAwAVAByAGEAYwBlAHMAAAAAAP////8AAABhAP///wAAAAMAAAAAAAA"
"AAPwBAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQAAAAAAP////8AAABEAP///wAABgAAAAMY"
"AAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP////8AA"
"AAAAAAAAA=="
          SavedViews    "AAAAAgAAAAA="
          HeaderState   "{\"DefaultSecSize\":0,\"FirstSecSize\":67,\"Labels\":"
"[],\"VisualIdxs\":[]}"
          PlotPalettes  "AAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
          Axes          "1"
          TimeRange     "0.0"
          ScrollingMode "1"
          SingleTimeAxis "1"
          Open          "0"
          Ts            "-1"
          SampleLimit   "25000"
          XAxisLabel    "Time / s"
          ShowLegend    "1"
          Axis {
            Name          ""
            AutoScale     1
            MinValue      0
            MaxValue      1
            Signals       {}
            SignalTypes   [ ]
            Untangle      0
            KeepBaseline  off
            BaselineValue 0
          }
          Fourier {
            SingleXAxis       on
            AxisLabel         "Frequency / Hz"
            Scaling           0
            PhaseDisplay      0
            ShowFourierLegend off
            Axis {
              Name          ""
              AutoScale     1
              MinValue      0
              MaxValue      1
              Signals       {}
              Untangle      0
              KeepBaseline  off
              BaselineValue 0
            }
          }
        }
        Component {
          Type          TransferFunction
          Name          "Transfer Fcn4"
          Show          on
          Position      [1325, 540]
          Direction     right
          Flipped       off
          LabelPosition south
          Frame         [-30, -15; 30, 15]
          Parameter {
            Variable      "Numerator"
            Value         "[1 0 10000*pi*pi]"
            Show          off
          }
          Parameter {
            Variable      "Denominator"
            Value         "[1 141.4*pi 10000*pi*pi]"
            Show          off
          }
          Parameter {
            Variable      "X0"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          TransferFunction
          Name          "Transfer Fcn5"
          Show          on
          Position      [1325, 615]
          Direction     right
          Flipped       off
          LabelPosition south
          Frame         [-30, -15; 30, 15]
          Parameter {
            Variable      "Numerator"
            Value         "[1 0 10000*pi*pi]"
            Show          off
          }
          Parameter {
            Variable      "Denominator"
            Value         "[1 141.4*pi 10000*pi*pi]"
            Show          off
          }
          Parameter {
            Variable      "X0"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          TransferFunction
          Name          "Transfer Fcn6"
          Show          on
          Position      [1325, 685]
          Direction     right
          Flipped       off
          LabelPosition south
          Frame         [-30, -15; 30, 15]
          Parameter {
            Variable      "Numerator"
            Value         "[1 0 10000*pi*pi]"
            Show          off
          }
          Parameter {
            Variable      "Denominator"
            Value         "[1 141.4*pi 10000*pi*pi]"
            Show          off
          }
          Parameter {
            Variable      "X0"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          From
          Name          "From"
          Show          off
          Position      [510, 535]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "Idref"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          From
          Name          "From2"
          Show          off
          Position      [510, 695]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "ILq"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Gain
          Name          "Gain1"
          Show          on
          Position      [545, 695]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "K"
            Value         "-1"
            Show          off
          }
          Parameter {
            Variable      "Multiplication"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "OutputDataType"
            Value         "11"
            Show          off
          }
          Parameter {
            Variable      "DataTypeOverflowMode"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "GainDataType"
            Value         "11"
            Show          off
          }
        }
        Component {
          Type          Sum
          Name          "Subtract7"
          Show          off
          Position      [645, 540]
          Direction     up
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "IconShape"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "Inputs"
            Value         "+-"
            Show          off
          }
          Parameter {
            Variable      "DataType"
            Value         "11"
            Show          off
          }
          Parameter {
            Variable      "DataTypeOverflowMode"
            Value         "1"
            Show          off
          }
        }
        Component {
          Type          Sum
          Name          "Sum"
          Show          off
          Position      [545, 535]
          Direction     up
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "IconShape"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "Inputs"
            Value         "|++"
            Show          off
          }
          Parameter {
            Variable      "DataType"
            Value         "11"
            Show          off
          }
          Parameter {
            Variable      "DataTypeOverflowMode"
            Value         "1"
            Show          off
          }
        }
        Component {
          Type          From
          Name          "From3"
          Show          off
          Position      [510, 565]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "Idharmonic"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Sum
          Name          "Subtract8"
          Show          off
          Position      [645, 690]
          Direction     up
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "IconShape"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "Inputs"
            Value         "-+"
            Show          off
          }
          Parameter {
            Variable      "DataType"
            Value         "11"
            Show          off
          }
          Parameter {
            Variable      "DataTypeOverflowMode"
            Value         "1"
            Show          off
          }
        }
        Component {
          Type          From
          Name          "From5"
          Show          off
          Position      [510, 605]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "Icd"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          From
          Name          "From7"
          Show          off
          Position      [510, 625]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "Icq"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Gain
          Name          "Gain2"
          Show          on
          Position      [645, 605]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "K"
            Value         "100*pi*0.02"
            Show          off
          }
          Parameter {
            Variable      "Multiplication"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "OutputDataType"
            Value         "11"
            Show          off
          }
          Parameter {
            Variable      "DataTypeOverflowMode"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "GainDataType"
            Value         "11"
            Show          off
          }
        }
        Component {
          Type          Gain
          Name          "Gain13"
          Show          on
          Position      [645, 625]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "K"
            Value         "100*pi*0.02"
            Show          off
          }
          Parameter {
            Variable      "Multiplication"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "OutputDataType"
            Value         "11"
            Show          off
          }
          Parameter {
            Variable      "DataTypeOverflowMode"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "GainDataType"
            Value         "11"
            Show          off
          }
        }
        Component {
          Type          Sum
          Name          "Sum2"
          Show          off
          Position      [910, 540]
          Direction     up
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "IconShape"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "Inputs"
            Value         "+-+"
            Show          off
          }
          Parameter {
            Variable      "DataType"
            Value         "11"
            Show          off
          }
          Parameter {
            Variable      "DataTypeOverflowMode"
            Value         "1"
            Show          off
          }
        }
        Component {
          Type          Sum
          Name          "Sum17"
          Show          off
          Position      [910, 690]
          Direction     up
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "IconShape"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "Inputs"
            Value         "--+"
            Show          off
          }
          Parameter {
            Variable      "DataType"
            Value         "11"
            Show          off
          }
          Parameter {
            Variable      "DataTypeOverflowMode"
            Value         "1"
            Show          off
          }
        }
        Component {
          Type          From
          Name          "From18"
          Show          off
          Position      [890, 510]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "Ud"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          From
          Name          "From19"
          Show          off
          Position      [890, 720]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "Uq"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Reference
          SrcComponent  "Components/Control/Transformations/RRF->3ph"
          Name          "RRF->3ph"
          Show          on
          Position      [1060, 550]
          Direction     up
          Flipped       off
          LabelPosition south
          Frame         [-15, -15; 15, 15]
          Terminal {
            Type          Input
            Position      [-15, -5]
            Direction     left
          }
          Terminal {
            Type          Output
            Position      [19, 0]
            Direction     right
          }
          Terminal {
            Type          Input
            Position      [-15, 5]
            Direction     left
          }
        }
        Component {
          Type          SignalMux
          Name          "Mux5"
          Show          off
          Position      [1015, 545]
          Direction     right
          Flipped       off
          LabelPosition south
          Frame         [-2, -10; 7, 10]
          Parameter {
            Variable      "Width"
            Value         "2"
            Show          off
          }
        }
        Component {
          Type          From
          Name          "From20"
          Show          off
          Position      [1020, 570]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "theta"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Goto
          Name          "Goto17"
          Show          off
          Position      [1115, 550]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "M1"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Scope
          Name          "Scope3"
          Show          on
          Position      [660, 505]
          Direction     up
          Flipped       off
          LabelPosition south
          Frame         [-15, -15; 15, 15]
          Location      [0, 24; 1536, 847]
          State         "AAAA/wAAAAD9AAAAAgAAAAEAAAAAAAAAAPwCAAAAA/sAAAAQAFoAb"
"wBvAG0AQQByAGUAYQAAAAAA/////wAAAC8A////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwAAAA"
"AA/////wAAAGEA////+wAAAAwAVAByAGEAYwBlAHMAAAAAAP////8AAABhAP///wAAAAMAAAYAAAA"
"AVfwBAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQCAAAEFQAAAPMAAAEIAAAAXAAABgAAAAMY"
"AAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP////8AA"
"AAAAAAAAA=="
          SavedViews    "AAAAAgAAAAA="
          HeaderState   "{\"DefaultSecSize\":0,\"FirstSecSize\":174,\"Labels\""
":[],\"VisualIdxs\":[]}"
          PlotPalettes  "AAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
          Axes          "1"
          TimeRange     "0"
          ScrollingMode "1"
          SingleTimeAxis "1"
          Open          "0"
          Ts            "-1"
          SampleLimit   "25000"
          XAxisLabel    "Time / s"
          ShowLegend    "1"
          Axis {
            Name          base64 "ROi9tOeUtea1geaOp+WItg=="
            AutoScale     1
            MinValue      0
            MaxValue      1
            Signals       {base64 "ROi9tOeUtea1geWPguiAgw==", base64 "ROi9tOeU"
"tea1geWunumZhQ=="}
            SignalTypes   [ ]
            Untangle      0
            KeepBaseline  off
            BaselineValue 0
          }
          Fourier {
            SingleXAxis       on
            AxisLabel         "Frequency / Hz"
            Scaling           0
            PhaseDisplay      0
            ShowFourierLegend off
            Axis {
              Name          ""
              AutoScale     1
              MinValue      0
              MaxValue      1
              Signals       {base64 "ROi9tOeUtea1geWPguiAgw==", base64 "ROi9tO"
"eUtea1geWunumZhQ=="}
              Untangle      0
              KeepBaseline  off
              BaselineValue 0
            }
          }
        }
        Component {
          Type          Scope
          Name          "Scope6"
          Show          on
          Position      [655, 720]
          Direction     up
          Flipped       off
          LabelPosition south
          Frame         [-15, -15; 15, 15]
          Location      [0, 24; 1536, 847]
          State         "AAAA/wAAAAD9AAAAAgAAAAEAAAAAAAAAAPwCAAAAA/sAAAAQAFoAb"
"wBvAG0AQQByAGUAYQAAAAAA/////wAAAC8A////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwAAAA"
"AA/////wAAAGEA////+wAAAAwAVAByAGEAYwBlAHMAAAAAAP////8AAABhAP///wAAAAMAAAYAAAA"
"AbfwBAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQBAAAAAAAABgAAAABEAP///wAABgAAAAKl"
"AAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP////8AA"
"AAAAAAAAA=="
          SavedViews    "AAAAAgAAAAA="
          HeaderState   "{\"DefaultSecSize\":0,\"FirstSecSize\":135,\"Labels\""
":[],\"VisualIdxs\":[]}"
          PlotPalettes  "AAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
          Axes          "1"
          TimeRange     "0"
          ScrollingMode "1"
          SingleTimeAxis "1"
          Open          "0"
          Ts            "-1"
          SampleLimit   "25000"
          XAxisLabel    "Time / s"
          ShowLegend    "2"
          Axis {
            Name          base64 "Uei9tOeUtea1geaOp+WItg=="
            AutoScale     1
            MinValue      0
            MaxValue      1
            Signals       {}
            SignalTypes   [ ]
            Untangle      0
            KeepBaseline  off
            BaselineValue 0
          }
          Fourier {
            SingleXAxis       on
            AxisLabel         "Frequency / Hz"
            Scaling           0
            PhaseDisplay      0
            ShowFourierLegend off
            Axis {
              Name          ""
              AutoScale     1
              MinValue      0
              MaxValue      1
              Signals       {}
              Untangle      0
              KeepBaseline  off
              BaselineValue 0
            }
          }
        }
        Component {
          Type          SignalMux
          Name          "Mux6"
          Show          off
          Position      [615, 505]
          Direction     right
          Flipped       off
          LabelPosition south
          Frame         [-2, -10; 7, 10]
          Parameter {
            Variable      "Width"
            Value         "2"
            Show          off
          }
        }
        Component {
          Type          SignalMux
          Name          "Mux9"
          Show          off
          Position      [610, 720]
          Direction     right
          Flipped       off
          LabelPosition south
          Frame         [-2, -10; 7, 10]
          Parameter {
            Variable      "Width"
            Value         "2"
            Show          off
          }
        }
        Component {
          Type          Scope
          Name          "Scope7"
          Show          on
          Position      [1130, 605]
          Direction     up
          Flipped       off
          LabelPosition south
          Frame         [-15, -15; 15, 15]
          Location      [0, 24; 1536, 847]
          State         "AAAA/wAAAAD9AAAAAgAAAAEAAAAAAAAAAPwCAAAAA/sAAAAQAFoAb"
"wBvAG0AQQByAGUAYQAAAAAA/////wAAAC8A////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwAAAA"
"AA/////wAAAGEA////+wAAAAwAVAByAGEAYwBlAHMAAAAAAP////8AAABhAP///wAAAAMAAAAAAAA"
"AAPwBAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQAAAAAAP////8AAABEAP///wAABgAAAAMY"
"AAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP////8AA"
"AAAAAAAAA=="
          SavedViews    "AAAAAgAAAAA="
          HeaderState   "{\"DefaultSecSize\":0,\"FirstSecSize\":129,\"Labels\""
":[],\"VisualIdxs\":[]}"
          PlotPalettes  "AAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
          Axes          "1"
          TimeRange     "0.0"
          ScrollingMode "1"
          SingleTimeAxis "1"
          Open          "0"
          Ts            "-1"
          SampleLimit   "25000"
          XAxisLabel    "Time / s"
          ShowLegend    "1"
          Axis {
            Name          ""
            AutoScale     1
            MinValue      0
            MaxValue      1
            Signals       {}
            SignalTypes   [ ]
            Untangle      0
            KeepBaseline  off
            BaselineValue 0
          }
          Fourier {
            SingleXAxis       on
            AxisLabel         "Frequency / Hz"
            Scaling           0
            PhaseDisplay      0
            ShowFourierLegend off
            Axis {
              Name          ""
              AutoScale     1
              MinValue      0
              MaxValue      1
              Signals       {}
              Untangle      0
              KeepBaseline  off
              BaselineValue 0
            }
          }
        }
        Component {
          Type          Scope
          Name          "Scope8"
          Show          on
          Position      [940, 585]
          Direction     up
          Flipped       off
          LabelPosition south
          Frame         [-15, -15; 15, 15]
          Location      [0, 24; 1539, 847]
          State         "AAAA/wAAAAD9AAAAAgAAAAEAAAAAAAAAAPwCAAAAA/sAAAAQAFoAb"
"wBvAG0AQQByAGUAYQAAAAAA/////wAAAFcA////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwAAAA"
"AA/////wAAAGEA////+wAAAAwAVAByAGEAYwBlAHMAAAAAAP////8AAABhAP///wAAAAMAAAAAAAA"
"AAPwBAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQAAAAAAP////8AAABEAP///wAABgMAAAMY"
"AAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP////8AA"
"AAAAAAAAA=="
          SavedViews    "AAAAAgAAAAA="
          HeaderState   "{\"DefaultSecSize\":0,\"FirstSecSize\":103,\"Labels\""
":[],\"VisualIdxs\":[]}"
          PlotPalettes  "AAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="
          Axes          "2"
          TimeRange     "0"
          ScrollingMode "1"
          SingleTimeAxis "1"
          Open          "0"
          Ts            "-1"
          SampleLimit   "25000"
          XAxisLabel    "Time / s"
          ShowLegend    "1"
          Axis {
            Name          ""
            AutoScale     1
            MinValue      0
            MaxValue      1
            Signals       {}
            SignalTypes   [ ]
            Untangle      0
            KeepBaseline  off
            BaselineValue 0
          }
          Axis {
            Name          ""
            AutoScale     1
            MinValue      0
            MaxValue      1
            Signals       {}
            SignalTypes   [ ]
            Untangle      0
            KeepBaseline  off
            BaselineValue 0
          }
          Fourier {
            SingleXAxis       on
            AxisLabel         "Frequency / Hz"
            Scaling           0
            PhaseDisplay      0
            ShowFourierLegend off
            Axis {
              Name          ""
              AutoScale     1
              MinValue      0
              MaxValue      1
              Signals       {}
              Untangle      0
              KeepBaseline  off
              BaselineValue 0
            }
            Axis {
              Name          ""
              AutoScale     1
              MinValue      0
              MaxValue      1
              Signals       {}
              Untangle      0
              KeepBaseline  off
              BaselineValue 0
            }
          }
        }
        Component {
          Type          Scope
          Name          "Scope9"
          Show          on
          Position      [870, 570]
          Direction     up
          Flipped       off
          LabelPosition south
          Frame         [-15, -15; 15, 15]
          Location      [0, 24; 1536, 847]
          State         "AAAA/wAAAAD9AAAAAgAAAAEAAAAAAAAAAPwCAAAAA/sAAAAQAFoAb"
"wBvAG0AQQByAGUAYQAAAAAA/////wAAAFcA////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwAAAA"
"AA/////wAAAGEA////+wAAAAwAVAByAGEAYwBlAHMAAAAAAP////8AAABhAP///wAAAAMAAAAAAAA"
"AAPwBAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQAAAAAAP////8AAABEAP///wAABgAAAAMY"
"AAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP////8AA"
"AAAAAAAAA=="
          SavedViews    "AAAAAgAAAAA="
          HeaderState   "{\"DefaultSecSize\":0,\"FirstSecSize\":67,\"Labels\":"
"[],\"VisualIdxs\":[]}"
          PlotPalettes  "AAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="
          Axes          "2"
          TimeRange     "0"
          ScrollingMode "1"
          SingleTimeAxis "1"
          Open          "0"
          Ts            "-1"
          SampleLimit   "25000"
          XAxisLabel    "Time / s"
          ShowLegend    "1"
          Axis {
            Name          ""
            AutoScale     1
            MinValue      0
            MaxValue      1
            Signals       {}
            SignalTypes   [ ]
            Untangle      0
            KeepBaseline  off
            BaselineValue 0
          }
          Axis {
            Name          ""
            AutoScale     1
            MinValue      0
            MaxValue      1
            Signals       {}
            SignalTypes   [ ]
            Untangle      0
            KeepBaseline  off
            BaselineValue 0
          }
          Fourier {
            SingleXAxis       on
            AxisLabel         "Frequency / Hz"
            Scaling           0
            PhaseDisplay      0
            ShowFourierLegend off
            Axis {
              Name          ""
              AutoScale     1
              MinValue      0
              MaxValue      1
              Signals       {}
              Untangle      0
              KeepBaseline  off
              BaselineValue 0
            }
            Axis {
              Name          ""
              AutoScale     1
              MinValue      0
              MaxValue      1
              Signals       {}
              Untangle      0
              KeepBaseline  off
              BaselineValue 0
            }
          }
        }
        Component {
          Type          Scope
          Name          "Scope11"
          Show          on
          Position      [1105, 870]
          Direction     up
          Flipped       off
          LabelPosition south
          Frame         [-15, -15; 15, 15]
          Location      [0, 23; 1536, 795]
          State         "AAAA/wAAAAD9AAAAAgAAAAEAAAAAAAAAAPwCAAAAA/sAAAAQAFoAb"
"wBvAG0AQQByAGUAYQAAAAAA/////wAAAC8A////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwAAAA"
"AA/////wAAAGEA////+wAAAAwAVAByAGEAYwBlAHMAAAAAAP////8AAABhAP///wAAAAMAAAAAAAA"
"AAPwBAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQAAAAAAP////8AAABEAP///wAABgAAAALl"
"AAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP////8AA"
"AAAAAAAAA=="
          SavedViews    "AAAAAgAAAAA="
          HeaderState   "{\"DefaultSecSize\":0,\"FirstSecSize\":211,\"Labels\""
":[],\"VisualIdxs\":[]}"
          PlotPalettes  "AAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
          Axes          "1"
          TimeRange     "0.0"
          ScrollingMode "1"
          SingleTimeAxis "1"
          Open          "0"
          Ts            "-1"
          SampleLimit   "25000"
          XAxisLabel    "Time / s"
          ShowLegend    "1"
          Axis {
            Name          ""
            AutoScale     1
            MinValue      0
            MaxValue      1
            Signals       {}
            SignalTypes   [ ]
            Untangle      0
            KeepBaseline  off
            BaselineValue 0
          }
          Fourier {
            SingleXAxis       on
            AxisLabel         "Frequency / Hz"
            Scaling           0
            PhaseDisplay      0
            ShowFourierLegend off
            Axis {
              Name          ""
              AutoScale     1
              MinValue      0
              MaxValue      1
              Signals       {}
              Untangle      0
              KeepBaseline  off
              BaselineValue 0
            }
          }
        }
        Component {
          Type          Goto
          Name          "Goto8"
          Show          off
          Position      [675, 990]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "Udcab"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Goto
          Name          "Goto9"
          Show          off
          Position      [675, 1010]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "Udcbc"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Goto
          Name          "Goto10"
          Show          off
          Position      [675, 1030]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "Udcca"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          SignalDemux
          Name          "Demux3"
          Show          off
          Position      [625, 1010]
          Direction     right
          Flipped       on
          LabelPosition south
          Frame         [-7, -15; 2, 15]
          Parameter {
            Variable      "Width"
            Value         "3"
            Show          off
          }
        }
        Component {
          Type          Scope
          Name          "Scope4"
          Show          on
          Position      [625, 1085]
          Direction     up
          Flipped       off
          LabelPosition south
          Frame         [-15, -15; 15, 15]
          Location      [7, 30; 1546, 880]
          State         "AAAA/wAAAAD9AAAAAgAAAAEAAAAAAAAAAPwCAAAAA/sAAAAQAFoAb"
"wBvAG0AQQByAGUAYQAAAAAA/////wAAAC8A////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwAAAA"
"AA/////wAAAGEA////+wAAAAwAVAByAGEAYwBlAHMAAAAAAP////8AAABhAP///wAAAAMAAAAAAAA"
"AAPwBAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQAAAAAAP////8AAABEAP///wAABgMAAAMz"
"AAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP////8AA"
"AAAAAAAAA=="
          SavedViews    "AAAAAgAAAAA="
          HeaderState   "{\"DefaultSecSize\":0,\"FirstSecSize\":152,\"Labels\""
":[],\"VisualIdxs\":[]}"
          PlotPalettes  "AAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
          Axes          "1"
          TimeRange     "0.0"
          ScrollingMode "1"
          SingleTimeAxis "1"
          Open          "0"
          Ts            "-1"
          SampleLimit   "25000"
          XAxisLabel    "Time / s"
          ShowLegend    "1"
          Axis {
            Name          ""
            AutoScale     1
            MinValue      0
            MaxValue      1
            Signals       {}
            SignalTypes   [ ]
            Untangle      0
            KeepBaseline  off
            BaselineValue 0
          }
          Fourier {
            SingleXAxis       on
            AxisLabel         "Frequency / Hz"
            Scaling           0
            PhaseDisplay      0
            ShowFourierLegend off
            Axis {
              Name          ""
              AutoScale     1
              MinValue      0
              MaxValue      1
              Signals       {}
              Untangle      0
              KeepBaseline  off
              BaselineValue 0
            }
          }
        }
        Component {
          Type          From
          Name          "From17"
          Show          off
          Position      [805, 1070]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "M1"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          From
          Name          "From21"
          Show          off
          Position      [805, 1100]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "M2"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          SignalDemux
          Name          "Demux5"
          Show          off
          Position      [855, 1070]
          Direction     right
          Flipped       on
          LabelPosition south
          Frame         [-7, -15; 2, 15]
          Parameter {
            Variable      "Width"
            Value         "3"
            Show          off
          }
        }
        Component {
          Type          SignalDemux
          Name          "Demux6"
          Show          off
          Position      [855, 1100]
          Direction     right
          Flipped       on
          LabelPosition south
          Frame         [-7, -15; 2, 15]
          Parameter {
            Variable      "Width"
            Value         "3"
            Show          off
          }
        }
        Component {
          Type          Sum
          Name          "Sum9"
          Show          off
          Position      [915, 1060]
          Direction     up
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "IconShape"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "Inputs"
            Value         "|++"
            Show          off
          }
          Parameter {
            Variable      "DataType"
            Value         "11"
            Show          off
          }
          Parameter {
            Variable      "DataTypeOverflowMode"
            Value         "1"
            Show          off
          }
        }
        Component {
          Type          Sum
          Name          "Sum10"
          Show          off
          Position      [955, 1070]
          Direction     up
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "IconShape"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "Inputs"
            Value         "|++"
            Show          off
          }
          Parameter {
            Variable      "DataType"
            Value         "11"
            Show          off
          }
          Parameter {
            Variable      "DataTypeOverflowMode"
            Value         "1"
            Show          off
          }
        }
        Component {
          Type          Sum
          Name          "Sum11"
          Show          off
          Position      [995, 1080]
          Direction     up
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "IconShape"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "Inputs"
            Value         "|++"
            Show          off
          }
          Parameter {
            Variable      "DataType"
            Value         "11"
            Show          off
          }
          Parameter {
            Variable      "DataTypeOverflowMode"
            Value         "1"
            Show          off
          }
        }
        Component {
          Type          Constant
          Name          "Constant2"
          Show          on
          Position      [940, 1170]
          Direction     right
          Flipped       off
          LabelPosition south
          Frame         [-10, -10; 10, 10]
          Parameter {
            Variable      "Value"
            Value         "35000*sqrt(2)*1.25"
            Show          off
          }
          Parameter {
            Variable      "DataType"
            Value         "10"
            Show          off
          }
        }
        Component {
          Type          Sum
          Name          "Sum18"
          Show          off
          Position      [1085, 1145]
          Direction     up
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "IconShape"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "Inputs"
            Value         "|++"
            Show          off
          }
          Parameter {
            Variable      "DataType"
            Value         "11"
            Show          off
          }
          Parameter {
            Variable      "DataTypeOverflowMode"
            Value         "1"
            Show          off
          }
        }
        Component {
          Type          Product
          Name          "Divide"
          Show          off
          Position      [1130, 1150]
          Direction     up
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "IconShape"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "Inputs"
            Value         "*/"
            Show          off
          }
          Parameter {
            Variable      "DataType"
            Value         "11"
            Show          off
          }
          Parameter {
            Variable      "DataTypeOverflowMode"
            Value         "1"
            Show          off
          }
        }
        Component {
          Type          Sum
          Name          "Sum20"
          Show          off
          Position      [1085, 1325]
          Direction     up
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "IconShape"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "Inputs"
            Value         "|++"
            Show          off
          }
          Parameter {
            Variable      "DataType"
            Value         "11"
            Show          off
          }
          Parameter {
            Variable      "DataTypeOverflowMode"
            Value         "1"
            Show          off
          }
        }
        Component {
          Type          Product
          Name          "Divide5"
          Show          off
          Position      [1130, 1330]
          Direction     up
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "IconShape"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "Inputs"
            Value         "*/"
            Show          off
          }
          Parameter {
            Variable      "DataType"
            Value         "11"
            Show          off
          }
          Parameter {
            Variable      "DataTypeOverflowMode"
            Value         "1"
            Show          off
          }
        }
        Component {
          Type          Sum
          Name          "Sum22"
          Show          off
          Position      [1085, 1510]
          Direction     up
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "IconShape"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "Inputs"
            Value         "|++"
            Show          off
          }
          Parameter {
            Variable      "DataType"
            Value         "11"
            Show          off
          }
          Parameter {
            Variable      "DataTypeOverflowMode"
            Value         "1"
            Show          off
          }
        }
        Component {
          Type          Product
          Name          "Divide10"
          Show          off
          Position      [1130, 1515]
          Direction     up
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "IconShape"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "Inputs"
            Value         "*/"
            Show          off
          }
          Parameter {
            Variable      "DataType"
            Value         "11"
            Show          off
          }
          Parameter {
            Variable      "DataTypeOverflowMode"
            Value         "1"
            Show          off
          }
        }
        Component {
          Type          Gain
          Name          "Gain14"
          Show          on
          Position      [1200, 1150]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "K"
            Value         "0.5"
            Show          off
          }
          Parameter {
            Variable      "Multiplication"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "OutputDataType"
            Value         "11"
            Show          off
          }
          Parameter {
            Variable      "DataTypeOverflowMode"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "GainDataType"
            Value         "11"
            Show          off
          }
        }
        Component {
          Type          Gain
          Name          "Gain15"
          Show          on
          Position      [1200, 1330]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "K"
            Value         "0.5"
            Show          off
          }
          Parameter {
            Variable      "Multiplication"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "OutputDataType"
            Value         "11"
            Show          off
          }
          Parameter {
            Variable      "DataTypeOverflowMode"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "GainDataType"
            Value         "11"
            Show          off
          }
        }
        Component {
          Type          Gain
          Name          "Gain16"
          Show          on
          Position      [1190, 1515]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "K"
            Value         "0.5"
            Show          off
          }
          Parameter {
            Variable      "Multiplication"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "OutputDataType"
            Value         "11"
            Show          off
          }
          Parameter {
            Variable      "DataTypeOverflowMode"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "GainDataType"
            Value         "11"
            Show          off
          }
        }
        Component {
          Type          Sum
          Name          "Sum24"
          Show          off
          Position      [1270, 1150]
          Direction     up
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "IconShape"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "Inputs"
            Value         "|++"
            Show          off
          }
          Parameter {
            Variable      "DataType"
            Value         "11"
            Show          off
          }
          Parameter {
            Variable      "DataTypeOverflowMode"
            Value         "1"
            Show          off
          }
        }
        Component {
          Type          Constant
          Name          "Constant8"
          Show          on
          Position      [1190, 1605]
          Direction     right
          Flipped       off
          LabelPosition south
          Frame         [-25, -10; 25, 10]
          Parameter {
            Variable      "Value"
            Value         "0.5"
            Show          off
          }
          Parameter {
            Variable      "DataType"
            Value         "10"
            Show          off
          }
        }
        Component {
          Type          Sum
          Name          "Sum25"
          Show          off
          Position      [1270, 1330]
          Direction     up
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "IconShape"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "Inputs"
            Value         "|++"
            Show          off
          }
          Parameter {
            Variable      "DataType"
            Value         "11"
            Show          off
          }
          Parameter {
            Variable      "DataTypeOverflowMode"
            Value         "1"
            Show          off
          }
        }
        Component {
          Type          Sum
          Name          "Sum26"
          Show          off
          Position      [1270, 1515]
          Direction     up
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "IconShape"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "Inputs"
            Value         "|++"
            Show          off
          }
          Parameter {
            Variable      "DataType"
            Value         "11"
            Show          off
          }
          Parameter {
            Variable      "DataTypeOverflowMode"
            Value         "1"
            Show          off
          }
        }
        Component {
          Type          TargetCode
          Name          "ADC"
          Show          on
          Position      [65, 1220]
          Direction     up
          Flipped       off
          LabelPosition south
          Frame         [-25, -25; 25, 25]
          TargetPortIndices "1"
          SampleTime    "0"
          EnforceBaseTask "1"
          CodeFcnLang   "2"
          CodeFcn       "local block = Target.Coder.CreateTargetBlock(\"TI C20"
"00\", \"adc\")\n"
"\n"
"return block:getDirectFeedthroughCode()"
          NonDftCodeFcn "local block = Target.Coder.GetTargetBlock(Block.UserD"
"ata.bid)\n"
"\n"
"return block:getNonDirectFeedthroughCode()\n"
          MaskType      "ADC"
          MaskDescription "Output the measured voltage of the ADC peripheral."
"\n"
"\n"
"The output signal is calculated as input*Scale+Offset, where input is the inp"
"ut voltage in Volts."
          MaskHelp      "qthelp://com.plexim.c2000.1.0/doc/adc_c2000.html"
          MaskDisplay   "local function drawTrigger(x,y)\n"
"\tIcon:line({x, x}, {y-3, y+3})\n"
"\tIcon:line({x, x+2.5}, {y-3, y-3})\n"
"\tIcon:line({x, x-2.5}, {y+3, y+3})\t\n"
"\tIcon:line({x-2, x}, {y+1, y-1})\n"
"\tIcon:line({x+2, x}, {y+1, y-1})\n"
"end\n"
"\n"
"Icon:text('ADC')\n"
"\n"
"if tonumber(Dialog:get('trig')) == 2 then\n"
"  local flipped = Block:get(\"Flipped\")\n"
"  local direction = Block:get(\"Direction\")\n"
"  if direction == 0.0 then\n"
"    if flipped then\n"
"\t   drawTrigger(-18, 0)\n"
"    else\n"
"\t   drawTrigger(18, 0)\n"
"    end\n"
"  end\n"
"  if direction == 0.25 then\n"
"    if flipped then\n"
"\t   drawTrigger(0, -18)\n"
"    else\n"
"\t   drawTrigger(0, 18)\n"
"    end  \n"
"  end\n"
"  if direction == 0.5 then\n"
"    if flipped then\n"
"\t   drawTrigger(18, 0)\n"
"    else\n"
"\t   drawTrigger(-18, 0)\n"
"    end \n"
"  end\n"
"  if direction == 0.75 then\n"
"    if flipped then\n"
"\t   drawTrigger(0, 18) \n"
"    else\n"
"\t   drawTrigger(0, -18)\n"
"    end \n"
"  end \n"
"end\n"
"\n"
"local function drawDecoration(color, text)\n"
"  Icon:color(color[1], color[2], color[3])\n"
"  local flipped = Block:get(\"Flipped\")\n"
"  local direction = Block:get(\"Direction\")\n"
"  local frame = Block:get(\"Frame\")\n"
"  local xLeft = frame[1]\n"
"  local xTot = frame[3]\n"
"  local yUp = frame[2]\n"
"  local yTot = frame[4]\n"
"  local s1 = [[<b><i>]] .. string.sub(text,1,1) .. [[<i><b>]]\n"
"  local s2 = [[<b><i>]] .. string.sub(text,2,2) .. [[<i><b>]]\n"
"  local x, y, xT1, xT2, yT1, yT2, g, position\n"
"  if direction == 0.0 then\n"
"    x = -xLeft+yUp\n"
"    y = xLeft-yUp\n"
"    g = -1\n"
"    if flipped then\n"
"      xT1 = xLeft+4.5\n"
"      yT1 = yUp+8\n"
"      xT2 = xLeft+4.5\n"
"      yT2 = yUp+13\n"
"      position = 'upLeft'\n"
"    else\n"
"      xT1 = xLeft+4.5\n"
"      yT1 = -yUp-8\n"
"      xT2 = xLeft+4.5\n"
"      yT2 = -yUp-13\n"
"      position = 'upRight'\n"
"    end\n"
"  end\n"
"  if direction == 0.25 then\n"
"    x = 0\n"
"    y = 0\n"
"    g = 1\n"
"    if flipped then\n"
"      xT1 = -xLeft-8\n"
"      yT1 = yUp+4.5\n"
"      xT2 = -xLeft-13\n"
"      yT2 = yUp+4.5\n"
"      position = 'upRight'\n"
"    else\n"
"      xT1 = -xLeft-8\n"
"      yT1 = -yUp-4.5\n"
"      xT2 = -xLeft-13\n"
"      yT2 = -yUp-4.5\n"
"      position = 'lowRight'\n"
"    end\n"
"  end\n"
"  if direction == 0.5 then\n"
"    x = -xLeft+yUp\n"
"    y = xLeft-yUp\n"
"    g = -1\n"
"    if flipped then\n"
"      xT1 = -xLeft-4.5\n"
"      yT1 = -yUp-8\n"
"      xT2 = -xLeft-4.5\n"
"      yT2 = -yUp-13\n"
"      position = 'lowRight'\n"
"    else\n"
"      xT1 = -xLeft-4.5\n"
"      yT1 = yUp+8\n"
"      xT2 = -xLeft-4.5\n"
"      yT2 = yUp+13\n"
"      position = 'lowLeft'\n"
"    end\n"
"  end\n"
"  if direction == 0.75 then\n"
"    x = 0\n"
"    y = 0\n"
"    g = 1\n"
"    if flipped then\n"
"      xT1 = xLeft+8\n"
"      yT1 = yUp+yTot-4.5\n"
"      xT2 = xLeft+13\n"
"      yT2 = yUp+yTot-4.5\n"
"      position = 'lowLeft'\n"
"    else\n"
"      xT1 = xLeft+8\n"
"      yT1 = yUp+4.5\n"
"      xT2 = xLeft+13\n"
"      yT2 = yUp+4.5\n"
"      position = 'upLeft'\n"
"    end\n"
"  end \n"
"  if position == 'upLeft' then\n"
"    Icon:patch({xLeft+x,xLeft+16.9+x,xLeft+16.9+x,xLeft+5.55+x},{yUp+8+y,yUp+"
"8+y,yUp+1+y,yUp+1+y})\n"
"    Icon:color(0,0,0)\n"
"    Icon:arc(xLeft+10+x,yUp+10+y,10,10,180,-90)\n"
"    Icon:text(xT1, yT1, s1, 'FontSize', 9, 'TextFormat', 'RichText', 'Color',"
" {255,255,255})\n"
"    Icon:text(xT2, yT2, s2, 'FontSize', 9, 'TextFormat', 'RichText', 'Color',"
" {255,255,255})\n"
"  elseif position == 'upRight' then\n"
"    Icon:patch({xLeft+xTot-16.9-x,xLeft+xTot-x,xLeft+xTot-5.55-x,xLeft+xTot-1"
"6.9-x},{yUp+8+y,yUp+8+y,yUp+1+y,yUp+1+y})\n"
"    Icon:color(0,0,0)\n"
"    Icon:arc(xLeft+xTot-10-x,yUp+10+y,10,10,0,90)\n"
"    Icon:text(g*(-xT2), g*yT2, s1, 'FontSize', 9, 'TextFormat', 'RichText', '"
"Color', {255,255,255})\n"
"    Icon:text(g*(-xT1), g*yT1, s2, 'FontSize', 9, 'TextFormat', 'RichText', '"
"Color', {255,255,255})\n"
"  elseif position == 'lowRight' then\n"
"    Icon:patch({xLeft+xTot-16.9-x,xLeft+xTot-x,xLeft+xTot-5.55-x,xLeft+xTot-1"
"6.9-x},{yUp+yTot-8-y,yUp+yTot-8-y,yUp+yTot-1-y,yUp+yTot-1-y})\n"
"    Icon:color(0,0,0)\n"
"    Icon:arc(xLeft+xTot-10-x,yUp+yTot-10-y,10,10,0,-90)\n"
"    Icon:text(-xT2, -yT2, s1, 'FontSize', 9, 'TextFormat', 'RichText', 'Color"
"', {255,255,255})\n"
"    Icon:text(-xT1, -yT1, s2, 'FontSize', 9, 'TextFormat', 'RichText', 'Color"
"', {255,255,255})\n"
"  elseif position == 'lowLeft' then\n"
"    Icon:patch({xLeft+x,xLeft+16.9+x,xLeft+16.9+x,xLeft+5.55+x},{yUp+yTot-8-y"
",yUp+yTot-8-y,yUp+yTot-1-y,yUp+yTot-1-y})\n"
"    Icon:color(0,0,0)\n"
"    Icon:arc(xLeft+10+x,yUp+yTot-10-y,10,10,180,90)\n"
"    Icon:text(g*xT1, -yT1*g, s1, 'FontSize', 9, 'TextFormat', 'RichText', 'Co"
"lor', {255,255,255})\n"
"    Icon:text(g*xT2, -yT2*g, s2, 'FontSize', 9, 'TextFormat', 'RichText', 'Co"
"lor', {255,255,255})\n"
"  end\n"
"end\n"
"\n"
"drawDecoration({204,0,0}, 'TI')"
          MaskDisplayLang "2"
          MaskIconFrame on
          MaskIconOpaque off
          MaskIconRotates off
          MaskInit      "if trig~=1 && trig~=2,\n"
"   error('Parameter \"Trigger source\" must be an integer value of 1 or 2.')"
"\n"
"end\n"
"\n"
"if adc ~= 1 && adc ~= 2 && adc ~= 3 && adc ~= 4,\n"
"   error('Parameter \"ADC unit\" must be an integer value between 1 and 4.');"
"\n"
"end\n"
"\n"
"if ~isreal(input) || ~isvector(input) ...\n"
"   || any(floor(input) ~= input) || any(input < 0),\n"
"  error('\"Analog input channel(s)\" must be a scalar or vector of positive o"
"r zero integers.')\n"
"end\n"
"\n"
"if ~isreal(scale) || ~isvector(scale),\n"
"  error('\"Scale\" must be a real scalar or vector.')\n"
"end\n"
"\n"
"if ~isreal(offset) || ~isvector(offset),\n"
"  error('\"Offset\" must be a real scalar or vector.')\n"
"end\n"
"\n"
"if numel(scale) == 1,\n"
"  scale = repmat(scale, size(input));\n"
"elseif numel(scale) ~= numel(input),\n"
"  error('\"Scale\" must be scalar or a vector of the same length as the numbe"
"r of ADC inputs.');\n"
"end\n"
"\n"
"if numel(offset) == 1,\n"
"  offset = repmat(offset, size(input));\n"
"elseif numel(offset) ~= numel(input),\n"
"  error('\"Offset\" must be scalar or a vector of the same length as the numb"
"er of ADC inputs.');\n"
"end\n"
"\n"
"if numel(tacq) == 1,\n"
"  tacq = repmat(tacq, size(input));\n"
"elseif numel(tacq) ~= numel(input),\n"
"  error('\"Aquisition time value(s)\" must be scalar or a vector of the same "
"length as the number of ADC inputs.');\n"
"end\n"
"\n"
"tsoffline_min = 75e-9*numel(input); % set delay to smallest single channel co"
"nversion of any chip\n"
"if tacqsel == 1\n"
"\tts = 0; % will be set later to minimal per ADC datasheet\n"
"\ttsoffline = tsoffline_min;\n"
"else\n"
"\tts = tacq;\n"
"\ttsoffline = max(sum(ts), tsoffline_min); % sum up delays (conversion is seq"
"uential) \n"
"end\n"
"\n"
"if ~isnan(bits) && ( numel(bits)~=1 ...\n"
"   || any(floor(bits) ~= bits) || any(bits <= 0)),\n"
"  error('\"Resolution\" must be a scalar positive integer representing the bi"
"t resolution of the ADC.')\n"
"end\n"
"\n"
"if numel(vref) ~= 1 && numel(vref) ~= numel(input),\n"
"  error('\"Voltage reference\" must be scalar or a vector of the same length "
"as the number of ADC inputs.');\n"
"end\n"
"\n"
"if (isnan(bits) && ~isnan(vref)) || (~isnan(bits) && isnan(vref)),\n"
"  error('\"Resolution\" and \"Voltage reference\" must both be real values or"
" left empty.')\n"
"end\n"
"\n"
"if (isnan(bits))\n"
"\tdoquant = 1;\n"
"else\n"
"\tdoquant = 2;\n"
"\tqint = vref/(2^bits);\n"
"end\n"
"\n"
"if (isnan(BASE_SAMPLE_TIME) && trig==1),\n"
"   error('A discretization step size is required when the ADC \"Trigger sourc"
"e\" parameter is set to \"Determine automatically\". The discretization step "
"size is defined in the ADC''s parent subsystem''s Execuction Settings or in t"
"he Coder Options window.')\n"
"end"
          MaskDialogCallback "Block:showTerminal('SOC', Dialog:get('trig')~='1"
"')\n"
"Dialog:set('tacq', 'Visible', Dialog:get('tacqsel')~='1')"
          Parameter {
            Variable      "trig"
            Prompt        "Trigger source"
            Type          FixedText
            PossibleValues {"Determine automatically", "Show trigger port"}
            Value         "2"
            Show          off
            Tunable       off
            TabName       ""
          }
          Parameter {
            Variable      "adc"
            Prompt        "ADC unit"
            Type          FixedText
            PossibleValues {"ADC A", "ADC B", "ADC C", "ADC D"}
            Value         "1"
            Show          off
            Tunable       off
            TabName       ""
          }
          Parameter {
            Variable      "input"
            Prompt        "Analog input channel(s) [0 .. 15]"
            Type          FreeText
            Value         "[7 9 2 10 0 8 1 15 12 5 13 3]"
            Show          off
            Tunable       off
            TabName       ""
          }
          Parameter {
            Variable      "scale"
            Prompt        "Scale(s)"
            Type          FreeText
            Value         "[(15e4)/3.3 (15e4)/3.3 (15e4)/3.3 7000/3.3  7000/3."
"3  7000/3.3  20000/3.3  20000/3.3  20000/3.3  70000/3.3  70000/3.3  70000/3.3"
"]"
            Show          off
            Tunable       off
            TabName       ""
          }
          Parameter {
            Variable      "offset"
            Prompt        "Offset(s)"
            Type          FreeText
            Value         "[-(15e4)/2 -(15e4)/2 -(15e4)/2 -7000/2 -7000/2 -700"
"0/2 -20000/2 -20000/2 -20000/2 0 0 0]"
            Show          off
            Tunable       off
            TabName       ""
          }
          Parameter {
            Variable      "tacqsel"
            Prompt        "Acquisition time"
            Type          FixedText
            PossibleValues {"Set to minimal value", "Specify value(s)"}
            Value         "1"
            Show          off
            Tunable       off
            TabName       ""
          }
          Parameter {
            Variable      "tacq"
            Prompt        "Acquisition time value(s) [s]"
            Type          FreeText
            Value         "0"
            Show          off
            Tunable       off
            TabName       ""
          }
          Parameter {
            Variable      "bits"
            Prompt        "Resolution [bits] "
            Type          FreeText
            Value         ""
            Show          off
            Tunable       off
            TabName       "Offline only"
          }
          Parameter {
            Variable      "vref"
            Prompt        "Voltage reference [V]"
            Type          FreeText
            Value         ""
            Show          off
            Tunable       off
            TabName       "Offline only"
          }
          Terminal {
            Type          Output
            Position      [29, 0]
            Direction     right
          }
          Terminal {
            Type          EventOutput
            Position      [29, 15]
            Direction     right
          }
          Terminal {
            Type          EventInput
            Position      [0, -25]
            Direction     up
          }
          Schematic {
            Location      [5, 53; 1175, 394]
            ZoomFactor    1
            SliderPosition [0, 0]
            ShowBrowser   off
            BrowserWidth  100
            Component {
              Type          TargetInput
              Name          "1"
              Show          on
              Position      [85, 125]
              Direction     right
              Flipped       off
              LabelPosition south
              Parameter {
                Variable      "Width"
                Value         "numel(input)"
                Show          off
              }
            }
            Component {
              Type          Output
              Name          "Out1"
              Show          off
              Position      [600, 125]
              Direction     right
              Flipped       off
              LabelPosition south
              Parameter {
                Variable      "Index"
                Value         "1"
                Show          on
              }
              Parameter {
                Variable      "DataType"
                Value         "10"
                Show          off
              }
              Parameter {
                Variable      "DataTypeOverflowMode"
                Value         "1"
                Show          off
              }
              Parameter {
                Variable      "Width"
                Value         "-1"
                Show          off
              }
            }
            Component {
              Type          EventOutput
              Name          "Task"
              Show          on
              Position      [600, 70]
              Direction     right
              Flipped       off
              LabelPosition south
              Parameter {
                Variable      "Index"
                Value         "2"
                Show          on
              }
              Parameter {
                Variable      "Width"
                Value         "-1"
                Show          off
              }
            }
            Component {
              Type          EventInput
              Name          "SOC"
              Show          off
              Position      [85, 70]
              Direction     right
              Flipped       off
              LabelPosition south
              Parameter {
                Variable      "Index"
                Value         "3"
                Show          on
              }
              Parameter {
                Variable      "Width"
                Value         "-1"
                Show          off
              }
            }
            Component {
              Type          Reference
              SrcComponent  "Components/Control/Delays/Pulse Delay"
              Name          "Pulse Delay1"
              Show          off
              Position      [525, 70]
              Direction     up
              Flipped       off
              LabelPosition south
              Frame         [-15, -15; 15, 15]
              Parameter {
                Variable      "T_d"
                Value         "tsoffline"
                Show          off
              }
              Parameter {
                Variable      "y_init"
                Value         "0"
                Show          off
              }
              Parameter {
                Variable      "buffer_size"
                Value         "1024"
                Show          off
              }
              Terminal {
                Type          Output
                Position      [19, 0]
                Direction     right
              }
              Terminal {
                Type          Input
                Position      [-15, 0]
                Direction     left
              }
            }
            Component {
              Type          Subsystem
              Name          "Sample\nand Hold"
              Show          on
              Position      [300, 125]
              Direction     up
              Flipped       off
              LabelPosition south
              Frame         [-20, -20; 20, 20]
              TreatAsAtomicUnit on
              SampleTime    "-1"
              CodeGenDiscretizationMethod "2"
              CodeGenTarget "Generic"
              MaskIconFrame on
              MaskIconOpaque off
              MaskIconRotates on
              Terminal {
                Type          Output
                Position      [24, 0]
                Direction     right
                Index         "1"
              }
              Terminal {
                Type          Input
                Position      [-20, 0]
                Direction     left
                Index         "1"
              }
              Terminal {
                Type          Input
                Position      [0, -20]
                Direction     up
                Index         "2"
              }
              Schematic {
                Location      [0, 0; 197, 137]
                ZoomFactor    1
                SliderPosition [0, 0]
                ShowBrowser   off
                BrowserWidth  100
                Component {
                  Type          Output
                  Name          "1"
                  Show          on
                  Position      [180, 70]
                  Direction     right
                  Flipped       off
                  LabelPosition south
                  Parameter {
                    Variable      "Index"
                    Value         "1"
                    Show          on
                  }
                  Parameter {
                    Variable      "InitialOutput"
                    Value         "[]"
                    Show          off
                  }
                  Parameter {
                    Variable      "Width"
                    Value         "-1"
                    Show          off
                  }
                }
                Component {
                  Type          Input
                  Name          "2"
                  Show          on
                  Position      [80, 70]
                  Direction     right
                  Flipped       off
                  LabelPosition south
                  Parameter {
                    Variable      "Index"
                    Value         "2"
                    Show          on
                  }
                  Parameter {
                    Variable      "DataType"
                    Value         "10"
                    Show          off
                  }
                  Parameter {
                    Variable      "DataTypeOverflowMode"
                    Value         "1"
                    Show          off
                  }
                  Parameter {
                    Variable      "Width"
                    Value         "-1"
                    Show          off
                  }
                }
                Component {
                  Type          Trigger
                  Name          "Trigger"
                  Show          on
                  Position      [120, 30]
                  Direction     right
                  Flipped       off
                  LabelPosition south
                  Parameter {
                    Variable      "Index"
                    Value         "3"
                    Show          on
                  }
                  Parameter {
                    Variable      "Width"
                    Value         "-1"
                    Show          off
                  }
                  Parameter {
                    Variable      "TriggerType"
                    Value         "1"
                    Show          off
                  }
                  Parameter {
                    Variable      "ShowOutput"
                    Value         "1"
                    Show          off
                  }
                }
                Connection {
                  Type          Signal
                  SrcComponent  "2"
                  SrcTerminal   1
                  DstComponent  "1"
                  DstTerminal   1
                }
              }
            }
            Component {
              Type          Reference
              SrcComponent  "Components/Control/Delays/Pulse Delay"
              Name          "Pulse Delay2"
              Show          off
              Position      [525, 125]
              Direction     up
              Flipped       off
              LabelPosition south
              Frame         [-15, -15; 15, 15]
              Parameter {
                Variable      "T_d"
                Value         "tsoffline"
                Show          off
              }
              Parameter {
                Variable      "y_init"
                Value         "0"
                Show          off
              }
              Parameter {
                Variable      "buffer_size"
                Value         "1024"
                Show          off
              }
              Terminal {
                Type          Output
                Position      [19, 0]
                Direction     right
              }
              Terminal {
                Type          Input
                Position      [-15, 0]
                Direction     left
              }
            }
            Component {
              Type          Gain
              Name          "Scale"
              Show          on
              Position      [420, 125]
              Direction     right
              Flipped       off
              LabelPosition south
              Parameter {
                Variable      "K"
                Value         "scale"
                Show          off
              }
              Parameter {
                Variable      "Multiplication"
                Value         "1"
                Show          off
              }
              Parameter {
                Variable      "OutputDataType"
                Value         "11"
                Show          off
              }
              Parameter {
                Variable      "DataTypeOverflowMode"
                Value         "1"
                Show          off
              }
              Parameter {
                Variable      "GainDataType"
                Value         "11"
                Show          off
              }
            }
            Component {
              Type          Offset
              Name          "Offset"
              Show          on
              Position      [475, 125]
              Direction     right
              Flipped       off
              LabelPosition south
              Frame         [-20, -10; 20, 10]
              Parameter {
                Variable      "Offset"
                Value         "offset"
                Show          off
              }
              Parameter {
                Variable      "DataType"
                Value         "11"
                Show          off
              }
              Parameter {
                Variable      "DataTypeOverflowMode"
                Value         "1"
                Show          off
              }
            }
            Component {
              Type          ConfigurableSubsystem
              Name          "Quantization"
              Show          on
              Position      [360, 125]
              Direction     up
              Flipped       off
              LabelPosition south
              Frame         [-20, -20; 20, 20]
              SampleTime    "-1"
              CodeGenDiscretizationMethod "2"
              CodeGenTarget "Generic"
              MaskDisplayLang "2"
              MaskIconFrame on
              MaskIconOpaque off
              MaskIconRotates on
              Terminal {
                Type          Input
                Position      [-20, 0]
                Direction     left
              }
              Terminal {
                Type          Output
                Position      [24, 0]
                Direction     right
              }
              TerminalNames { "In1", "Out1" }
              Location      [468, 133; 774, 367]
              ZoomFactor    1
              SliderPosition [0, 0]
              ShowBrowser   off
              BrowserWidth  100
              Configurations {
                Name          "disabled"
                Schematic {
                  Component {
                    Type          Input
                    Name          "In1"
                    Show          off
                    Position      [140, 80]
                    Direction     right
                    Flipped       off
                    LabelPosition south
                    Parameter {
                      Variable      "Index"
                      Value         "1"
                      Show          on
                    }
                    Parameter {
                      Variable      "Width"
                      Value         "-1"
                      Show          off
                    }
                  }
                  Component {
                    Type          Output
                    Name          "Out1"
                    Show          off
                    Position      [300, 80]
                    Direction     right
                    Flipped       off
                    LabelPosition south
                    Parameter {
                      Variable      "Index"
                      Value         "2"
                      Show          on
                    }
                    Parameter {
                      Variable      "Width"
                      Value         "-1"
                      Show          off
                    }
                  }
                  Connection {
                    Type          Signal
                    SrcComponent  "In1"
                    SrcTerminal   1
                    DstComponent  "Out1"
                    DstTerminal   1
                  }
                }
                Name          "enabled"
                Schematic {
                  Component {
                    Type          Input
                    Name          "In1"
                    Show          off
                    Position      [75, 100]
                    Direction     right
                    Flipped       off
                    LabelPosition south
                    Parameter {
                      Variable      "Index"
                      Value         "1"
                      Show          on
                    }
                    Parameter {
                      Variable      "Width"
                      Value         "-1"
                      Show          off
                    }
                  }
                  Component {
                    Type          Output
                    Name          "Out1"
                    Show          off
                    Position      [235, 100]
                    Direction     right
                    Flipped       off
                    LabelPosition south
                    Parameter {
                      Variable      "Index"
                      Value         "2"
                      Show          on
                    }
                    Parameter {
                      Variable      "Width"
                      Value         "-1"
                      Show          off
                    }
                  }
                  Component {
                    Type          Reference
                    SrcComponent  "Components/Control/Discontinuous/Quantizer"
                    Name          "Quantizer"
                    Show          on
                    Position      [155, 100]
                    Direction     up
                    Flipped       off
                    LabelPosition south
                    Frame         [-15, -15; 15, 15]
                    Parameter {
                      Variable      "q"
                      Value         "qint"
                      Show          off
                    }
                    Parameter {
                      Variable      "stepDetection"
                      Value         "1"
                      Show          off
                    }
                    Terminal {
                      Type          Input
                      Position      [-15, 0]
                      Direction     left
                    }
                    Terminal {
                      Type          Output
                      Position      [19, 0]
                      Direction     right
                    }
                  }
                  Connection {
                    Type          Signal
                    SrcComponent  "In1"
                    SrcTerminal   1
                    DstComponent  "Quantizer"
                    DstTerminal   1
                  }
                  Connection {
                    Type          Signal
                    SrcComponent  "Quantizer"
                    SrcTerminal   2
                    DstComponent  "Out1"
                    DstTerminal   1
                  }
                }
              }
              Parameter {
                Variable      "Configuration"
                Value         "doquant"
                Show          off
              }
            }
            Component {
              Type          ConfigurableSubsystem
              Name          "Sample\nSelect"
              Show          on
              Position      [200, 70]
              Direction     up
              Flipped       off
              LabelPosition south
              Frame         [-20, -15; 20, 15]
              SampleTime    "-1"
              CodeGenDiscretizationMethod "2"
              CodeGenTarget "Generic"
              MaskDisplayLang "2"
              MaskIconFrame on
              MaskIconOpaque off
              MaskIconRotates on
              Terminal {
                Type          Input
                Position      [-20, 0]
                Direction     left
              }
              Terminal {
                Type          Output
                Position      [24, 0]
                Direction     right
              }
              TerminalNames { "In", "Out" }
              Location      [968, 204; 1409, 402]
              ZoomFactor    1
              SliderPosition [0, 0]
              ShowBrowser   off
              BrowserWidth  100
              Configurations {
                Name          "Determine automatically"
                Schematic {
                  Component {
                    Type          Input
                    Name          "In"
                    Show          off
                    Position      [50, 80]
                    Direction     right
                    Flipped       off
                    LabelPosition south
                    Parameter {
                      Variable      "Index"
                      Value         "1"
                      Show          on
                    }
                    Parameter {
                      Variable      "Width"
                      Value         "-1"
                      Show          off
                    }
                  }
                  Component {
                    Type          Output
                    Name          "Out"
                    Show          off
                    Position      [300, 80]
                    Direction     right
                    Flipped       off
                    LabelPosition south
                    Parameter {
                      Variable      "Index"
                      Value         "2"
                      Show          on
                    }
                    Parameter {
                      Variable      "Width"
                      Value         "-1"
                      Show          off
                    }
                  }
                  Component {
                    Type          PulseGenerator
                    Name          "Pulse\nGenerator"
                    Show          off
                    Position      [150, 80]
                    Direction     right
                    Flipped       off
                    LabelPosition south
                    Parameter {
                      Variable      "Hi"
                      Value         "1"
                      Show          off
                    }
                    Parameter {
                      Variable      "Lo"
                      Value         "0"
                      Show          off
                    }
                    Parameter {
                      Variable      "f"
                      Value         "1/BASE_SAMPLE_TIME"
                      Show          on
                    }
                    Parameter {
                      Variable      "DutyCycle"
                      Value         "0.5"
                      Show          off
                    }
                    Parameter {
                      Variable      "Delay"
                      Value         "0"
                      Show          off
                    }
                    Parameter {
                      Variable      "DataType"
                      Value         "10"
                      Show          off
                    }
                  }
                  Component {
                    Type          EdgeDetection
                    Name          "Edge Detection"
                    Show          off
                    Position      [230, 80]
                    Direction     right
                    Flipped       off
                    LabelPosition south
                    Parameter {
                      Variable      "Direction"
                      Value         "1"
                      Show          off
                    }
                  }
                  Connection {
                    Type          Signal
                    SrcComponent  "Pulse\nGenerator"
                    SrcTerminal   1
                    DstComponent  "Edge Detection"
                    DstTerminal   1
                  }
                  Connection {
                    Type          Signal
                    SrcComponent  "Edge Detection"
                    SrcTerminal   2
                    DstComponent  "Out"
                    DstTerminal   1
                  }
                }
                Name          "Show trigger port"
                Schematic {
                  Component {
                    Type          Input
                    Name          "In"
                    Show          off
                    Position      [50, 80]
                    Direction     right
                    Flipped       off
                    LabelPosition south
                    Parameter {
                      Variable      "Index"
                      Value         "1"
                      Show          on
                    }
                    Parameter {
                      Variable      "Width"
                      Value         "-1"
                      Show          off
                    }
                  }
                  Component {
                    Type          Output
                    Name          "Out"
                    Show          off
                    Position      [300, 80]
                    Direction     right
                    Flipped       off
                    LabelPosition south
                    Parameter {
                      Variable      "Index"
                      Value         "2"
                      Show          on
                    }
                    Parameter {
                      Variable      "Width"
                      Value         "-1"
                      Show          off
                    }
                  }
                  Connection {
                    Type          Signal
                    SrcComponent  "In"
                    SrcTerminal   1
                    DstComponent  "Out"
                    DstTerminal   1
                  }
                }
              }
              Parameter {
                Variable      "Configuration"
                Value         "trig"
                Show          off
              }
            }
            Connection {
              Type          Signal
              SrcComponent  "Pulse Delay1"
              SrcTerminal   1
              DstComponent  "Task"
              DstTerminal   1
            }
            Connection {
              Type          Signal
              SrcComponent  "Pulse Delay2"
              SrcTerminal   1
              DstComponent  "Out1"
              DstTerminal   1
            }
            Connection {
              Type          Signal
              SrcComponent  "1"
              SrcTerminal   1
              DstComponent  "Sample\nand Hold"
              DstTerminal   2
            }
            Connection {
              Type          Signal
              SrcComponent  "Scale"
              SrcTerminal   2
              DstComponent  "Offset"
              DstTerminal   1
            }
            Connection {
              Type          Signal
              SrcComponent  "Offset"
              SrcTerminal   2
              DstComponent  "Pulse Delay2"
              DstTerminal   2
            }
            Connection {
              Type          Signal
              SrcComponent  "Sample\nand Hold"
              SrcTerminal   1
              DstComponent  "Quantization"
              DstTerminal   1
            }
            Connection {
              Type          Signal
              SrcComponent  "Quantization"
              SrcTerminal   2
              DstComponent  "Scale"
              DstTerminal   1
            }
            Connection {
              Type          Signal
              SrcComponent  "Sample\nSelect"
              SrcTerminal   2
              Points        [300, 70]
              Branch {
                DstComponent  "Pulse Delay1"
                DstTerminal   2
              }
              Branch {
                DstComponent  "Sample\nand Hold"
                DstTerminal   3
              }
            }
            Connection {
              Type          Signal
              SrcComponent  "SOC"
              SrcTerminal   1
              DstComponent  "Sample\nSelect"
              DstTerminal   1
            }
          }
        }
        Component {
          Type          SignalMux
          Name          "Mux11"
          Show          off
          Position      [170, 1175]
          Direction     right
          Flipped       off
          LabelPosition south
          Frame         [-2, -15; 7, 15]
          Parameter {
            Variable      "Width"
            Value         "3"
            Show          off
          }
        }
        Component {
          Type          SignalDemux
          Name          "Demux7"
          Show          off
          Position      [130, 1220]
          Direction     right
          Flipped       on
          LabelPosition south
          Frame         [-7, -60; 2, 60]
          Parameter {
            Variable      "Width"
            Value         "12"
            Show          off
          }
        }
        Component {
          Type          SignalMux
          Name          "Mux12"
          Show          off
          Position      [170, 1205]
          Direction     right
          Flipped       off
          LabelPosition south
          Frame         [-2, -15; 7, 15]
          Parameter {
            Variable      "Width"
            Value         "3"
            Show          off
          }
        }
        Component {
          Type          SignalMux
          Name          "Mux13"
          Show          off
          Position      [170, 1235]
          Direction     right
          Flipped       off
          LabelPosition south
          Frame         [-2, -15; 7, 15]
          Parameter {
            Variable      "Width"
            Value         "3"
            Show          off
          }
        }
        Component {
          Type          SignalMux
          Name          "Mux14"
          Show          off
          Position      [170, 1265]
          Direction     right
          Flipped       off
          LabelPosition south
          Frame         [-2, -15; 7, 15]
          Parameter {
            Variable      "Width"
            Value         "3"
            Show          off
          }
        }
        Component {
          Type          Delay
          Name          "Delay1"
          Show          off
          Position      [90, 1385]
          Direction     left
          Flipped       off
          LabelPosition north
          Parameter {
            Variable      "N"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "X0"
            Value         "0"
            Show          off
          }
          Parameter {
            Variable      "Ts"
            Value         "0.6"
            Show          off
          }
        }
        Component {
          Type          LogicalOperator
          Name          "Logical\nOperator1"
          Show          off
          Position      [90, 1410]
          Direction     up
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Operator"
            Value         "6"
            Show          off
          }
          Parameter {
            Variable      "Inputs"
            Value         "1"
            Show          off
          }
        }
        Component {
          Type          TargetCode
          Name          "LED Blinking"
          Show          on
          Position      [170, 1385]
          Direction     up
          Flipped       off
          LabelPosition south
          Frame         [-25, -20; 25, 20]
          TargetPortIndices "2"
          SampleTime    "0"
          EnforceBaseTask "1"
          CodeFcnLang   "2"
          CodeFcn       "local block = Target.Coder.CreateTargetBlock(\"TI C20"
"00\", \"dout\")\n"
"\n"
"return block:getDirectFeedthroughCode()"
          MaskType      "Digital Out"
          MaskDescription "Set a digital ouput."
          MaskHelp      "qthelp://com.plexim.c2000.1.0/doc/do_c2000.html"
          MaskDisplay   "Icon:text('Digital\\nOut')\n"
"\n"
"local function drawDecoration(color, text)\n"
"  Icon:color(color[1], color[2], color[3])\n"
"  local flipped = Block:get(\"Flipped\")\n"
"  local direction = Block:get(\"Direction\")\n"
"  local frame = Block:get(\"Frame\")\n"
"  local xLeft = frame[1]\n"
"  local xTot = frame[3]\n"
"  local yUp = frame[2]\n"
"  local yTot = frame[4]\n"
"  local s1 = [[<b><i>]] .. string.sub(text,1,1) .. [[<i><b>]]\n"
"  local s2 = [[<b><i>]] .. string.sub(text,2,2) .. [[<i><b>]]\n"
"  local x, y, xT1, xT2, yT1, yT2, g, position\n"
"  if direction == 0.0 then\n"
"    x = -xLeft+yUp\n"
"    y = xLeft-yUp\n"
"    g = -1\n"
"    if flipped then\n"
"      xT1 = xLeft+4.5\n"
"      yT1 = yUp+8\n"
"      xT2 = xLeft+4.5\n"
"      yT2 = yUp+13\n"
"      position = 'upLeft'\n"
"    else\n"
"      xT1 = xLeft+4.5\n"
"      yT1 = -yUp-8\n"
"      xT2 = xLeft+4.5\n"
"      yT2 = -yUp-13\n"
"      position = 'upRight'\n"
"    end\n"
"  end\n"
"  if direction == 0.25 then\n"
"    x = 0\n"
"    y = 0\n"
"    g = 1\n"
"    if flipped then\n"
"      xT1 = -xLeft-8\n"
"      yT1 = yUp+4.5\n"
"      xT2 = -xLeft-13\n"
"      yT2 = yUp+4.5\n"
"      position = 'upRight'\n"
"    else\n"
"      xT1 = -xLeft-8\n"
"      yT1 = -yUp-4.5\n"
"      xT2 = -xLeft-13\n"
"      yT2 = -yUp-4.5\n"
"      position = 'lowRight'\n"
"    end\n"
"  end\n"
"  if direction == 0.5 then\n"
"    x = -xLeft+yUp\n"
"    y = xLeft-yUp\n"
"    g = -1\n"
"    if flipped then\n"
"      xT1 = -xLeft-4.5\n"
"      yT1 = -yUp-8\n"
"      xT2 = -xLeft-4.5\n"
"      yT2 = -yUp-13\n"
"      position = 'lowRight'\n"
"    else\n"
"      xT1 = -xLeft-4.5\n"
"      yT1 = yUp+8\n"
"      xT2 = -xLeft-4.5\n"
"      yT2 = yUp+13\n"
"      position = 'lowLeft'\n"
"    end\n"
"  end\n"
"  if direction == 0.75 then\n"
"    x = 0\n"
"    y = 0\n"
"    g = 1\n"
"    if flipped then\n"
"      xT1 = xLeft+8\n"
"      yT1 = yUp+yTot-4.5\n"
"      xT2 = xLeft+13\n"
"      yT2 = yUp+yTot-4.5\n"
"      position = 'lowLeft'\n"
"    else\n"
"      xT1 = xLeft+8\n"
"      yT1 = yUp+4.5\n"
"      xT2 = xLeft+13\n"
"      yT2 = yUp+4.5\n"
"      position = 'upLeft'\n"
"    end\n"
"  end \n"
"  if position == 'upLeft' then\n"
"    Icon:patch({xLeft+x,xLeft+16.9+x,xLeft+16.9+x,xLeft+5.55+x},{yUp+8+y,yUp+"
"8+y,yUp+1+y,yUp+1+y})\n"
"    Icon:color(0,0,0)\n"
"    Icon:arc(xLeft+10+x,yUp+10+y,10,10,180,-90)\n"
"    Icon:text(xT1, yT1, s1, 'FontSize', 9, 'TextFormat', 'RichText', 'Color',"
" {255,255,255})\n"
"    Icon:text(xT2, yT2, s2, 'FontSize', 9, 'TextFormat', 'RichText', 'Color',"
" {255,255,255})\n"
"  elseif position == 'upRight' then\n"
"    Icon:patch({xLeft+xTot-16.9-x,xLeft+xTot-x,xLeft+xTot-5.55-x,xLeft+xTot-1"
"6.9-x},{yUp+8+y,yUp+8+y,yUp+1+y,yUp+1+y})\n"
"    Icon:color(0,0,0)\n"
"    Icon:arc(xLeft+xTot-10-x,yUp+10+y,10,10,0,90)\n"
"    Icon:text(g*(-xT2), g*yT2, s1, 'FontSize', 9, 'TextFormat', 'RichText', '"
"Color', {255,255,255})\n"
"    Icon:text(g*(-xT1), g*yT1, s2, 'FontSize', 9, 'TextFormat', 'RichText', '"
"Color', {255,255,255})\n"
"  elseif position == 'lowRight' then\n"
"    Icon:patch({xLeft+xTot-16.9-x,xLeft+xTot-x,xLeft+xTot-5.55-x,xLeft+xTot-1"
"6.9-x},{yUp+yTot-8-y,yUp+yTot-8-y,yUp+yTot-1-y,yUp+yTot-1-y})\n"
"    Icon:color(0,0,0)\n"
"    Icon:arc(xLeft+xTot-10-x,yUp+yTot-10-y,10,10,0,-90)\n"
"    Icon:text(-xT2, -yT2, s1, 'FontSize', 9, 'TextFormat', 'RichText', 'Color"
"', {255,255,255})\n"
"    Icon:text(-xT1, -yT1, s2, 'FontSize', 9, 'TextFormat', 'RichText', 'Color"
"', {255,255,255})\n"
"  elseif position == 'lowLeft' then\n"
"    Icon:patch({xLeft+x,xLeft+16.9+x,xLeft+16.9+x,xLeft+5.55+x},{yUp+yTot-8-y"
",yUp+yTot-8-y,yUp+yTot-1-y,yUp+yTot-1-y})\n"
"    Icon:color(0,0,0)\n"
"    Icon:arc(xLeft+10+x,yUp+yTot-10-y,10,10,180,90)\n"
"    Icon:text(g*xT1, -yT1*g, s1, 'FontSize', 9, 'TextFormat', 'RichText', 'Co"
"lor', {255,255,255})\n"
"    Icon:text(g*xT2, -yT2*g, s2, 'FontSize', 9, 'TextFormat', 'RichText', 'Co"
"lor', {255,255,255})\n"
"  end\n"
"end\n"
"\n"
"drawDecoration({204,0,0}, 'TI')"
          MaskDisplayLang "2"
          MaskIconFrame on
          MaskIconOpaque off
          MaskIconRotates off
          Parameter {
            Variable      "gpio"
            Prompt        "Digital output GPIO number(s)"
            Type          FreeText
            Value         "34"
            Show          off
            Tunable       off
            TabName       ""
          }
          Parameter {
            Variable      "OutputType"
            Prompt        "Output characteristic"
            Type          FixedText
            PossibleValues {"Push-pull", "Open drain"}
            Value         "1"
            Show          off
            Tunable       off
            TabName       ""
          }
          Terminal {
            Type          Input
            Position      [-25, 0]
            Direction     left
          }
          Schematic {
            Location      [770, 85; 1920, 271]
            ZoomFactor    1
            SliderPosition [0, 0]
            ShowBrowser   off
            BrowserWidth  100
            Component {
              Type          TargetOutput
              Name          "1"
              Show          on
              Position      [260, 75]
              Direction     right
              Flipped       off
              LabelPosition south
              Parameter {
                Variable      "Width"
                Value         "numel(gpio)"
                Show          off
              }
            }
            Component {
              Type          Input
              Name          "In1"
              Show          off
              Position      [120, 75]
              Direction     right
              Flipped       off
              LabelPosition south
              Parameter {
                Variable      "Index"
                Value         "1"
                Show          on
              }
              Parameter {
                Variable      "InitialOutput"
                Value         "[]"
                Show          off
              }
              Parameter {
                Variable      "HasDirectFeedthrough"
                Value         "2"
                Show          off
              }
              Parameter {
                Variable      "DataType"
                Value         "11"
                Show          off
              }
              Parameter {
                Variable      "DataTypeOverflowMode"
                Value         "1"
                Show          off
              }
              Parameter {
                Variable      "Width"
                Value         "numel(gpio)"
                Show          off
              }
            }
            Connection {
              Type          Signal
              SrcComponent  "In1"
              SrcTerminal   1
              DstComponent  "1"
              DstTerminal   1
            }
          }
        }
        Component {
          Type          TargetCode
          Name          "Load"
          Show          on
          Position      [105, 1480]
          Direction     up
          Flipped       off
          LabelPosition south
          Frame         [-25, -20; 25, 20]
          TargetPortIndices ""
          SampleTime    "0"
          EnforceBaseTask "1"
          CodeFcnLang   "2"
          CodeFcn       "if Target.Name == \"Generic\" then\n"
"   local OutputSignal1 = StringList:new()\n"
"   OutputSignal1:append(\"0.0\")\n"
"   local OutputSignal2 = StringList:new()\n"
"   OutputSignal2:append(\"0.0\")\n"
"   OutputSignal2:append(\"0.0\")\n"
"   OutputSignal2:append(\"0.0\")\n"
"   OutputSignal2:append(\"0.0\")\n"
"\treturn {\n"
"\t\tOutputSignal = {OutputSignal1, OutputSignal2},\n"
"\t}\n"
"end\n"
"\n"
"local block = Target.Coder.CreateTargetBlock(\"TI C2000\", \"cpuload\")\n"
"\n"
"return block:getDirectFeedthroughCode()"
          MaskType      "CPU Load"
          MaskDescription "Provide the CPU load in percent."
          MaskHelp      "qthelp://com.plexim.c2000.1.0/doc/cpu_load_c2000.html"
          MaskDisplay   "Icon:text('CPU\\nLoad')\n"
"\n"
"local function drawDecoration(color, text)\n"
"  Icon:color(color[1], color[2], color[3])\n"
"  local flipped = Block:get(\"Flipped\")\n"
"  local direction = Block:get(\"Direction\")\n"
"  local frame = Block:get(\"Frame\")\n"
"  local xLeft = frame[1]\n"
"  local xTot = frame[3]\n"
"  local yUp = frame[2]\n"
"  local yTot = frame[4]\n"
"  local s1 = [[<b><i>]] .. string.sub(text,1,1) .. [[<i><b>]]\n"
"  local s2 = [[<b><i>]] .. string.sub(text,2,2) .. [[<i><b>]]\n"
"  local x, y, xT1, xT2, yT1, yT2, g, position\n"
"  if direction == 0.0 then\n"
"    x = -xLeft+yUp\n"
"    y = xLeft-yUp\n"
"    g = -1\n"
"    if flipped then\n"
"      xT1 = xLeft+4.5\n"
"      yT1 = yUp+8\n"
"      xT2 = xLeft+4.5\n"
"      yT2 = yUp+13\n"
"      position = 'upLeft'\n"
"    else\n"
"      xT1 = xLeft+4.5\n"
"      yT1 = -yUp-8\n"
"      xT2 = xLeft+4.5\n"
"      yT2 = -yUp-13\n"
"      position = 'upRight'\n"
"    end\n"
"  end\n"
"  if direction == 0.25 then\n"
"    x = 0\n"
"    y = 0\n"
"    g = 1\n"
"    if flipped then\n"
"      xT1 = -xLeft-8\n"
"      yT1 = yUp+4.5\n"
"      xT2 = -xLeft-13\n"
"      yT2 = yUp+4.5\n"
"      position = 'upRight'\n"
"    else\n"
"      xT1 = -xLeft-8\n"
"      yT1 = -yUp-4.5\n"
"      xT2 = -xLeft-13\n"
"      yT2 = -yUp-4.5\n"
"      position = 'lowRight'\n"
"    end\n"
"  end\n"
"  if direction == 0.5 then\n"
"    x = -xLeft+yUp\n"
"    y = xLeft-yUp\n"
"    g = -1\n"
"    if flipped then\n"
"      xT1 = -xLeft-4.5\n"
"      yT1 = -yUp-8\n"
"      xT2 = -xLeft-4.5\n"
"      yT2 = -yUp-13\n"
"      position = 'lowRight'\n"
"    else\n"
"      xT1 = -xLeft-4.5\n"
"      yT1 = yUp+8\n"
"      xT2 = -xLeft-4.5\n"
"      yT2 = yUp+13\n"
"      position = 'lowLeft'\n"
"    end\n"
"  end\n"
"  if direction == 0.75 then\n"
"    x = 0\n"
"    y = 0\n"
"    g = 1\n"
"    if flipped then\n"
"      xT1 = xLeft+8\n"
"      yT1 = yUp+yTot-4.5\n"
"      xT2 = xLeft+13\n"
"      yT2 = yUp+yTot-4.5\n"
"      position = 'lowLeft'\n"
"    else\n"
"      xT1 = xLeft+8\n"
"      yT1 = yUp+4.5\n"
"      xT2 = xLeft+13\n"
"      yT2 = yUp+4.5\n"
"      position = 'upLeft'\n"
"    end\n"
"  end \n"
"  if position == 'upLeft' then\n"
"    Icon:patch({xLeft+x,xLeft+16.9+x,xLeft+16.9+x,xLeft+5.55+x},{yUp+8+y,yUp+"
"8+y,yUp+1+y,yUp+1+y})\n"
"    Icon:color(0,0,0)\n"
"    Icon:arc(xLeft+10+x,yUp+10+y,10,10,180,-90)\n"
"    Icon:text(xT1, yT1, s1, 'FontSize', 9, 'TextFormat', 'RichText', 'Color',"
" {255,255,255})\n"
"    Icon:text(xT2, yT2, s2, 'FontSize', 9, 'TextFormat', 'RichText', 'Color',"
" {255,255,255})\n"
"  elseif position == 'upRight' then\n"
"    Icon:patch({xLeft+xTot-16.9-x,xLeft+xTot-x,xLeft+xTot-5.55-x,xLeft+xTot-1"
"6.9-x},{yUp+8+y,yUp+8+y,yUp+1+y,yUp+1+y})\n"
"    Icon:color(0,0,0)\n"
"    Icon:arc(xLeft+xTot-10-x,yUp+10+y,10,10,0,90)\n"
"    Icon:text(g*(-xT2), g*yT2, s1, 'FontSize', 9, 'TextFormat', 'RichText', '"
"Color', {255,255,255})\n"
"    Icon:text(g*(-xT1), g*yT1, s2, 'FontSize', 9, 'TextFormat', 'RichText', '"
"Color', {255,255,255})\n"
"  elseif position == 'lowRight' then\n"
"    Icon:patch({xLeft+xTot-16.9-x,xLeft+xTot-x,xLeft+xTot-5.55-x,xLeft+xTot-1"
"6.9-x},{yUp+yTot-8-y,yUp+yTot-8-y,yUp+yTot-1-y,yUp+yTot-1-y})\n"
"    Icon:color(0,0,0)\n"
"    Icon:arc(xLeft+xTot-10-x,yUp+yTot-10-y,10,10,0,-90)\n"
"    Icon:text(-xT2, -yT2, s1, 'FontSize', 9, 'TextFormat', 'RichText', 'Color"
"', {255,255,255})\n"
"    Icon:text(-xT1, -yT1, s2, 'FontSize', 9, 'TextFormat', 'RichText', 'Color"
"', {255,255,255})\n"
"  elseif position == 'lowLeft' then\n"
"    Icon:patch({xLeft+x,xLeft+16.9+x,xLeft+16.9+x,xLeft+5.55+x},{yUp+yTot-8-y"
",yUp+yTot-8-y,yUp+yTot-1-y,yUp+yTot-1-y})\n"
"    Icon:color(0,0,0)\n"
"    Icon:arc(xLeft+10+x,yUp+yTot-10-y,10,10,180,90)\n"
"    Icon:text(g*xT1, -yT1*g, s1, 'FontSize', 9, 'TextFormat', 'RichText', 'Co"
"lor', {255,255,255})\n"
"    Icon:text(g*xT2, -yT2*g, s2, 'FontSize', 9, 'TextFormat', 'RichText', 'Co"
"lor', {255,255,255})\n"
"  end\n"
"end\n"
"\n"
"drawDecoration({204,0,0}, 'TI')"
          MaskDisplayLang "2"
          MaskIconFrame on
          MaskIconOpaque off
          MaskIconRotates off
          MaskInit      "curComp = plecs('get','','CurrentComponent');\n"
"curPath = plecs('get','','CurrentCircuit');\n"
"path=curComp(length(curPath)+2:end);"
          MaskDialogCallback "Block:showTerminal('ts', false)\n"
          Terminal {
            Type          Output
            Position      [29, 0]
            Direction     right
          }
          Terminal {
            Type          Output
            Position      [29, 10]
            Direction     right
          }
          Schematic {
            Location      [423, 332; 1461, 923]
            ZoomFactor    1
            SliderPosition [0, 0]
            ShowBrowser   off
            BrowserWidth  100
            Component {
              Type          Output
              Name          "%"
              Show          off
              Position      [180, 60]
              Direction     right
              Flipped       off
              LabelPosition south
              Parameter {
                Variable      "Index"
                Value         "1"
                Show          on
              }
              Parameter {
                Variable      "DataType"
                Value         "10"
                Show          off
              }
              Parameter {
                Variable      "DataTypeOverflowMode"
                Value         "1"
                Show          off
              }
              Parameter {
                Variable      "Width"
                Value         "-1"
                Show          off
              }
            }
            Component {
              Type          Output
              Name          "ts"
              Show          on
              Position      [180, 105]
              Direction     right
              Flipped       off
              LabelPosition south
              Parameter {
                Variable      "Index"
                Value         "2"
                Show          on
              }
              Parameter {
                Variable      "DataType"
                Value         "10"
                Show          off
              }
              Parameter {
                Variable      "DataTypeOverflowMode"
                Value         "1"
                Show          off
              }
              Parameter {
                Variable      "Width"
                Value         "4"
                Show          off
              }
            }
          }
        }
        Component {
          Type          Display
          Name          "%"
          Show          on
          Position      [170, 1480]
          Direction     up
          Flipped       off
          LabelPosition south
          Frame         [-21, -11; 21, 11]
          Parameter {
            Variable      "Notation"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "Precision"
            Value         "2"
            Show          off
          }
        }
        Component {
          Type          Scope
          Name          "Scope10"
          Show          on
          Position      [1210, 1095]
          Direction     up
          Flipped       off
          LabelPosition south
          Frame         [-15, -15; 15, 15]
          Location      [0, 24; 1539, 847]
          State         "AAAA/wAAAAD9AAAAAgAAAAEAAAAAAAAAAPwCAAAAA/sAAAAQAFoAb"
"wBvAG0AQQByAGUAYQAAAAAA/////wAAAC8A////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwAAAA"
"AA/////wAAAGEA////+wAAAAwAVAByAGEAYwBlAHMAAAAAAP////8AAABhAP///wAAAAMAAAAAAAA"
"AAPwBAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQAAAAAAP////8AAABEAP///wAABgMAAAMY"
"AAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP////8AA"
"AAAAAAAAA=="
          SavedViews    "AAAAAgAAAAA="
          HeaderState   "{\"DefaultSecSize\":0,\"FirstSecSize\":99,\"Labels\":"
"[],\"VisualIdxs\":[]}"
          PlotPalettes  "AAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
          Axes          "1"
          TimeRange     "0.0"
          ScrollingMode "1"
          SingleTimeAxis "1"
          Open          "0"
          Ts            "-1"
          SampleLimit   "25000"
          XAxisLabel    "Time / s"
          ShowLegend    "1"
          Axis {
            Name          ""
            AutoScale     1
            MinValue      0
            MaxValue      1
            Signals       {}
            SignalTypes   [ ]
            Untangle      0
            KeepBaseline  off
            BaselineValue 0
          }
          Fourier {
            SingleXAxis       on
            AxisLabel         "Frequency / Hz"
            Scaling           0
            PhaseDisplay      0
            ShowFourierLegend off
            Axis {
              Name          ""
              AutoScale     1
              MinValue      0
              MaxValue      1
              Signals       {}
              Untangle      0
              KeepBaseline  off
              BaselineValue 0
            }
          }
        }
        Component {
          Type          Subsystem
          Name          "PR1"
          Show          on
          Position      [760, 540]
          Direction     up
          Flipped       off
          LabelPosition none
          Frame         [-20, -20; 20, 20]
          SampleTime    "-1"
          CodeGenDiscretizationMethod "2"
          CodeGenTarget "Generic"
          MaskDisplayLang "2"
          MaskIconFrame on
          MaskIconOpaque off
          MaskIconRotates on
          Terminal {
            Type          Output
            Position      [24, 0]
            Direction     right
          }
          Terminal {
            Type          Input
            Position      [-20, 0]
            Direction     left
          }
          Schematic {
            Location      [769, 30; 1535, 772]
            ZoomFactor    1.30957
            SliderPosition [0, 0]
            ShowBrowser   off
            BrowserWidth  100
            Component {
              Type          Output
              Name          "1"
              Show          on
              Position      [345, 190]
              Direction     right
              Flipped       off
              LabelPosition south
              Parameter {
                Variable      "Index"
                Value         "1"
                Show          on
              }
              Parameter {
                Variable      "Width"
                Value         "-1"
                Show          off
              }
            }
            Component {
              Type          Input
              Name          "2"
              Show          on
              Position      [20, 80]
              Direction     right
              Flipped       off
              LabelPosition south
              Parameter {
                Variable      "Index"
                Value         "2"
                Show          on
              }
              Parameter {
                Variable      "Width"
                Value         "-1"
                Show          off
              }
            }
            Component {
              Type          TransferFunction
              Name          "Transfer Fcn"
              Show          on
              Position      [135, 150]
              Direction     right
              Flipped       off
              LabelPosition south
              CommentOut    DisabledOpenCircuit
              Frame         [-55, -15; 55, 15]
              Parameter {
                Variable      "Numerator"
                Value         "[0.01 5 0]"
                Show          off
              }
              Parameter {
                Variable      "Denominator"
                Value         "[1 0 40000*pi*pi]"
                Show          off
              }
              Parameter {
                Variable      "X0"
                Value         "0"
                Show          off
              }
            }
            Component {
              Type          TransferFunction
              Name          "Transfer Fcn1"
              Show          on
              Position      [135, 190]
              Direction     right
              Flipped       off
              LabelPosition south
              CommentOut    DisabledOpenCircuit
              Frame         [-55, -15; 55, 15]
              Parameter {
                Variable      "Numerator"
                Value         "[0.1 5 0]"
                Show          off
              }
              Parameter {
                Variable      "Denominator"
                Value         "[1 0 160000*pi*pi]"
                Show          off
              }
              Parameter {
                Variable      "X0"
                Value         "0"
                Show          off
              }
            }
            Component {
              Type          TransferFunction
              Name          "Transfer Fcn2"
              Show          on
              Position      [135, 230]
              Direction     right
              Flipped       off
              LabelPosition south
              CommentOut    DisabledOpenCircuit
              Frame         [-55, -15; 55, 15]
              Parameter {
                Variable      "Numerator"
                Value         "[0.1 10 0]"
                Show          off
              }
              Parameter {
                Variable      "Denominator"
                Value         "[1 0 90000*pi*pi]"
                Show          off
              }
              Parameter {
                Variable      "X0"
                Value         "0"
                Show          off
              }
            }
            Component {
              Type          TransferFunction
              Name          "Transfer Fcn3"
              Show          on
              Position      [135, 270]
              Direction     right
              Flipped       off
              LabelPosition south
              CommentOut    DisabledOpenCircuit
              Frame         [-55, -15; 55, 15]
              Parameter {
                Variable      "Numerator"
                Value         "[0.1 0.5 0]"
                Show          off
              }
              Parameter {
                Variable      "Denominator"
                Value         "[1 0 360000*pi*pi]"
                Show          off
              }
              Parameter {
                Variable      "X0"
                Value         "0"
                Show          off
              }
            }
            Component {
              Type          Sum
              Name          "Sum1"
              Show          off
              Position      [290, 190]
              Direction     up
              Flipped       off
              LabelPosition south
              Parameter {
                Variable      "IconShape"
                Value         "1"
                Show          off
              }
              Parameter {
                Variable      "Inputs"
                Value         "+++++"
                Show          off
              }
              Parameter {
                Variable      "DataType"
                Value         "11"
                Show          off
              }
              Parameter {
                Variable      "DataTypeOverflowMode"
                Value         "1"
                Show          off
              }
            }
            Component {
              Type          Reference
              SrcComponent  "Components/Control/Continuous/Continuous PID\\nCo"
"ntroller"
              Name          "Continuous PID\nController1"
              Show          on
              Position      [130, 80]
              Direction     up
              Flipped       off
              LabelPosition south
              Frame         [-40, -25; 40, 25]
              Parameter {
                Variable      "cont_type"
                Value         "3"
                Show          off
              }
              Parameter {
                Variable      "par_source"
                Value         "1"
                Show          off
              }
              Parameter {
                Variable      "kp"
                Value         "0.66"
                Show          off
              }
              Parameter {
                Variable      "ki"
                Value         "66.6"
                Show          off
              }
              Parameter {
                Variable      "kd"
                Value         "1"
                Show          off
              }
              Parameter {
                Variable      "kf"
                Value         "1"
                Show          off
              }
              Parameter {
                Variable      "ex_reset"
                Value         "1"
                Show          off
              }
              Parameter {
                Variable      "x0_source"
                Value         "1"
                Show          off
              }
              Parameter {
                Variable      "x0"
                Value         "0"
                Show          off
              }
              Parameter {
                Variable      "ex_sat"
                Value         "1"
                Show          off
              }
              Parameter {
                Variable      "sat_lim"
                Value         "1"
                Show          off
              }
              Parameter {
                Variable      "up_limit"
                Value         "inf"
                Show          off
              }
              Parameter {
                Variable      "low_limit"
                Value         "-inf"
                Show          off
              }
              Parameter {
                Variable      "aw_method"
                Value         "1"
                Show          off
              }
              Parameter {
                Variable      "kbc"
                Value         "1"
                Show          off
              }
              Terminal {
                Type          Input
                Position      [-40, 0]
                Direction     left
              }
              Terminal {
                Type          Output
                Position      [44, 0]
                Direction     right
              }
              Terminal {
                Type          Input
                Position      [-5, -25]
                Direction     up
              }
              Terminal {
                Type          Input
                Position      [5, -25]
                Direction     up
              }
              Terminal {
                Type          Input
                Position      [15, -25]
                Direction     up
              }
              Terminal {
                Type          Input
                Position      [-40, -15]
                Direction     left
              }
              Terminal {
                Type          Input
                Position      [-40, 10]
                Direction     left
              }
              Terminal {
                Type          Input
                Position      [25, -25]
                Direction     up
              }
              Terminal {
                Type          Input
                Position      [35, -25]
                Direction     up
              }
              Terminal {
                Type          Input
                Position      [-40, -20]
                Direction     left
              }
              Terminal {
                Type          Input
                Position      [-40, -10]
                Direction     left
              }
              Terminal {
                Type          Input
                Position      [-40, 20]
                Direction     left
              }
            }
            Component {
              Type          Scope
              Name          "Scope"
              Show          on
              Position      [260, 100]
              Direction     up
              Flipped       off
              LabelPosition south
              Frame         [-15, -30; 15, 30]
              Location      [0, 24; 1536, 847]
              State         "AAAA/wAAAAD9AAAAAgAAAAEAAAAAAAAAAPwCAAAAA/sAAAAQA"
"FoAbwBvAG0AQQByAGUAYQAAAAAA/////wAAAM8A////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcw"
"AAAAAA/////wAAAGEA////+wAAAAwAVAByAGEAYwBlAHMAAAAAAP////8AAABhAP///wAAAAMAAAA"
"AAAAAAPwBAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQAAAAAAP////8AAABEAP///wAABgAA"
"AAMYAAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP///"
"/8AAAAAAAAAAA=="
              SavedViews    "AAAAAgAAAAA="
              HeaderState   "{\"DefaultSecSize\":0,\"FirstSecSize\":67,\"Label"
"s\":[],\"VisualIdxs\":[]}"
              PlotPalettes  "AAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
"AAAAAAAAAAAAAAAA="
              Axes          "5"
              TimeRange     "0"
              ScrollingMode "1"
              SingleTimeAxis "1"
              Open          "0"
              Ts            "-1"
              SampleLimit   "25000"
              XAxisLabel    "Time / s"
              ShowLegend    "1"
              Axis {
                Name          ""
                AutoScale     1
                MinValue      0
                MaxValue      1
                Signals       {}
                SignalTypes   [ ]
                Untangle      0
                KeepBaseline  off
                BaselineValue 0
              }
              Axis {
                Name          ""
                AutoScale     1
                MinValue      0
                MaxValue      1
                Signals       {}
                SignalTypes   [ ]
                Untangle      0
                KeepBaseline  off
                BaselineValue 0
              }
              Axis {
                Name          ""
                AutoScale     1
                MinValue      0
                MaxValue      1
                Signals       {}
                SignalTypes   [ ]
                Untangle      0
                KeepBaseline  off
                BaselineValue 0
              }
              Axis {
                Name          ""
                AutoScale     1
                MinValue      0
                MaxValue      1
                Signals       {}
                SignalTypes   [ ]
                Untangle      0
                KeepBaseline  off
                BaselineValue 0
              }
              Axis {
                Name          ""
                AutoScale     1
                MinValue      0
                MaxValue      1
                Signals       {}
                SignalTypes   [ ]
                Untangle      0
                KeepBaseline  off
                BaselineValue 0
              }
              Fourier {
                SingleXAxis       on
                AxisLabel         "Frequency / Hz"
                Scaling           0
                PhaseDisplay      0
                ShowFourierLegend off
                Axis {
                  Name          ""
                  AutoScale     1
                  MinValue      0
                  MaxValue      1
                  Signals       {}
                  Untangle      0
                  KeepBaseline  off
                  BaselineValue 0
                }
                Axis {
                  Name          ""
                  AutoScale     1
                  MinValue      0
                  MaxValue      1
                  Signals       {}
                  Untangle      0
                  KeepBaseline  off
                  BaselineValue 0
                }
                Axis {
                  Name          ""
                  AutoScale     1
                  MinValue      0
                  MaxValue      1
                  Signals       {}
                  Untangle      0
                  KeepBaseline  off
                  BaselineValue 0
                }
                Axis {
                  Name          ""
                  AutoScale     1
                  MinValue      0
                  MaxValue      1
                  Signals       {}
                  Untangle      0
                  KeepBaseline  off
                  BaselineValue 0
                }
                Axis {
                  Name          ""
                  AutoScale     1
                  MinValue      0
                  MaxValue      1
                  Signals       {}
                  Untangle      0
                  KeepBaseline  off
                  BaselineValue 0
                }
              }
            }
            Connection {
              Type          Signal
              SrcComponent  "Sum1"
              SrcTerminal   1
              DstComponent  "1"
              DstTerminal   1
            }
            Connection {
              Type          Signal
              SrcComponent  "2"
              SrcTerminal   1
              Points        [45, 80]
              Branch {
                DstComponent  "Continuous PID\nController1"
                DstTerminal   1
              }
              Branch {
                Points        [45, 150]
                Branch {
                  Points        [45, 190]
                  Branch {
                    Points        [45, 230]
                    Branch {
                      Points        [45, 270]
                      DstComponent  "Transfer Fcn3"
                      DstTerminal   1
                    }
                    Branch {
                      DstComponent  "Transfer Fcn2"
                      DstTerminal   1
                    }
                  }
                  Branch {
                    DstComponent  "Transfer Fcn1"
                    DstTerminal   1
                  }
                }
                Branch {
                  DstComponent  "Transfer Fcn"
                  DstTerminal   1
                }
              }
            }
            Connection {
              Type          Signal
              SrcComponent  "Continuous PID\nController1"
              SrcTerminal   2
              Points        [210, 80]
              Branch {
                Points        [210, 170]
                DstComponent  "Sum1"
                DstTerminal   2
              }
              Branch {
                DstComponent  "Scope"
                DstTerminal   1
              }
            }
            Connection {
              Type          Signal
              SrcComponent  "Transfer Fcn"
              SrcTerminal   2
              Points        [205, 150]
              Branch {
                Points        [205, 180]
                DstComponent  "Sum1"
                DstTerminal   3
              }
              Branch {
                Points        [205, 90]
                DstComponent  "Scope"
                DstTerminal   2
              }
            }
            Connection {
              Type          Signal
              SrcComponent  "Transfer Fcn1"
              SrcTerminal   2
              Points        [200, 190]
              Branch {
                DstComponent  "Sum1"
                DstTerminal   4
              }
              Branch {
                Points        [200, 100]
                DstComponent  "Scope"
                DstTerminal   3
              }
            }
            Connection {
              Type          Signal
              SrcComponent  "Transfer Fcn2"
              SrcTerminal   2
              Points        [205, 230; 205, 200]
              Branch {
                DstComponent  "Sum1"
                DstTerminal   5
              }
              Branch {
                Points        [205, 110]
                DstComponent  "Scope"
                DstTerminal   4
              }
            }
            Connection {
              Type          Signal
              SrcComponent  "Transfer Fcn3"
              SrcTerminal   2
              Points        [215, 270; 215, 210]
              Branch {
                DstComponent  "Sum1"
                DstTerminal   6
              }
              Branch {
                Points        [215, 120]
                DstComponent  "Scope"
                DstTerminal   5
              }
            }
          }
        }
        Component {
          Type          Subsystem
          Name          "PR2"
          Show          on
          Position      [760, 690]
          Direction     up
          Flipped       off
          LabelPosition none
          Frame         [-20, -20; 20, 20]
          SampleTime    "-1"
          CodeGenDiscretizationMethod "2"
          CodeGenTarget "Generic"
          MaskDisplayLang "2"
          MaskIconFrame on
          MaskIconOpaque off
          MaskIconRotates on
          Terminal {
            Type          Output
            Position      [24, 0]
            Direction     right
          }
          Terminal {
            Type          Input
            Position      [-20, 0]
            Direction     left
          }
          Schematic {
            Location      [769, 30; 1535, 772]
            ZoomFactor    1.30957
            SliderPosition [0, 0]
            ShowBrowser   off
            BrowserWidth  100
            Component {
              Type          Output
              Name          "1"
              Show          on
              Position      [345, 190]
              Direction     right
              Flipped       off
              LabelPosition south
              Parameter {
                Variable      "Index"
                Value         "1"
                Show          on
              }
              Parameter {
                Variable      "Width"
                Value         "-1"
                Show          off
              }
            }
            Component {
              Type          Input
              Name          "2"
              Show          on
              Position      [20, 80]
              Direction     right
              Flipped       off
              LabelPosition south
              Parameter {
                Variable      "Index"
                Value         "2"
                Show          on
              }
              Parameter {
                Variable      "Width"
                Value         "-1"
                Show          off
              }
            }
            Component {
              Type          TransferFunction
              Name          "Transfer Fcn"
              Show          on
              Position      [135, 150]
              Direction     right
              Flipped       off
              LabelPosition south
              CommentOut    DisabledOpenCircuit
              Frame         [-55, -15; 55, 15]
              Parameter {
                Variable      "Numerator"
                Value         "[0.01 5 0]"
                Show          off
              }
              Parameter {
                Variable      "Denominator"
                Value         "[1 0 40000*pi*pi]"
                Show          off
              }
              Parameter {
                Variable      "X0"
                Value         "0"
                Show          off
              }
            }
            Component {
              Type          TransferFunction
              Name          "Transfer Fcn1"
              Show          on
              Position      [135, 190]
              Direction     right
              Flipped       off
              LabelPosition south
              CommentOut    DisabledOpenCircuit
              Frame         [-55, -15; 55, 15]
              Parameter {
                Variable      "Numerator"
                Value         "[0.1 5 0]"
                Show          off
              }
              Parameter {
                Variable      "Denominator"
                Value         "[1 0 160000*pi*pi]"
                Show          off
              }
              Parameter {
                Variable      "X0"
                Value         "0"
                Show          off
              }
            }
            Component {
              Type          TransferFunction
              Name          "Transfer Fcn2"
              Show          on
              Position      [135, 230]
              Direction     right
              Flipped       off
              LabelPosition south
              CommentOut    DisabledOpenCircuit
              Frame         [-55, -15; 55, 15]
              Parameter {
                Variable      "Numerator"
                Value         "[0.1 10 0]"
                Show          off
              }
              Parameter {
                Variable      "Denominator"
                Value         "[1 0 90000*pi*pi]"
                Show          off
              }
              Parameter {
                Variable      "X0"
                Value         "0"
                Show          off
              }
            }
            Component {
              Type          TransferFunction
              Name          "Transfer Fcn3"
              Show          on
              Position      [135, 270]
              Direction     right
              Flipped       off
              LabelPosition south
              CommentOut    DisabledOpenCircuit
              Frame         [-55, -15; 55, 15]
              Parameter {
                Variable      "Numerator"
                Value         "[0.1 0.5 0]"
                Show          off
              }
              Parameter {
                Variable      "Denominator"
                Value         "[1 0 360000*pi*pi]"
                Show          off
              }
              Parameter {
                Variable      "X0"
                Value         "0"
                Show          off
              }
            }
            Component {
              Type          Sum
              Name          "Sum1"
              Show          off
              Position      [290, 190]
              Direction     up
              Flipped       off
              LabelPosition south
              Parameter {
                Variable      "IconShape"
                Value         "1"
                Show          off
              }
              Parameter {
                Variable      "Inputs"
                Value         "+++++"
                Show          off
              }
              Parameter {
                Variable      "DataType"
                Value         "11"
                Show          off
              }
              Parameter {
                Variable      "DataTypeOverflowMode"
                Value         "1"
                Show          off
              }
            }
            Component {
              Type          Reference
              SrcComponent  "Components/Control/Continuous/Continuous PID\\nCo"
"ntroller"
              Name          "Continuous PID\nController1"
              Show          on
              Position      [130, 80]
              Direction     up
              Flipped       off
              LabelPosition south
              Frame         [-40, -25; 40, 25]
              Parameter {
                Variable      "cont_type"
                Value         "3"
                Show          off
              }
              Parameter {
                Variable      "par_source"
                Value         "1"
                Show          off
              }
              Parameter {
                Variable      "kp"
                Value         "0.66"
                Show          off
              }
              Parameter {
                Variable      "ki"
                Value         "66.6"
                Show          off
              }
              Parameter {
                Variable      "kd"
                Value         "1"
                Show          off
              }
              Parameter {
                Variable      "kf"
                Value         "1"
                Show          off
              }
              Parameter {
                Variable      "ex_reset"
                Value         "1"
                Show          off
              }
              Parameter {
                Variable      "x0_source"
                Value         "1"
                Show          off
              }
              Parameter {
                Variable      "x0"
                Value         "0"
                Show          off
              }
              Parameter {
                Variable      "ex_sat"
                Value         "1"
                Show          off
              }
              Parameter {
                Variable      "sat_lim"
                Value         "1"
                Show          off
              }
              Parameter {
                Variable      "up_limit"
                Value         "inf"
                Show          off
              }
              Parameter {
                Variable      "low_limit"
                Value         "-inf"
                Show          off
              }
              Parameter {
                Variable      "aw_method"
                Value         "1"
                Show          off
              }
              Parameter {
                Variable      "kbc"
                Value         "1"
                Show          off
              }
              Terminal {
                Type          Input
                Position      [-40, 0]
                Direction     left
              }
              Terminal {
                Type          Output
                Position      [44, 0]
                Direction     right
              }
              Terminal {
                Type          Input
                Position      [-5, -25]
                Direction     up
              }
              Terminal {
                Type          Input
                Position      [5, -25]
                Direction     up
              }
              Terminal {
                Type          Input
                Position      [15, -25]
                Direction     up
              }
              Terminal {
                Type          Input
                Position      [-40, -15]
                Direction     left
              }
              Terminal {
                Type          Input
                Position      [-40, 10]
                Direction     left
              }
              Terminal {
                Type          Input
                Position      [25, -25]
                Direction     up
              }
              Terminal {
                Type          Input
                Position      [35, -25]
                Direction     up
              }
              Terminal {
                Type          Input
                Position      [-40, -20]
                Direction     left
              }
              Terminal {
                Type          Input
                Position      [-40, -10]
                Direction     left
              }
              Terminal {
                Type          Input
                Position      [-40, 20]
                Direction     left
              }
            }
            Component {
              Type          Scope
              Name          "Scope"
              Show          on
              Position      [260, 100]
              Direction     up
              Flipped       off
              LabelPosition south
              Frame         [-15, -30; 15, 30]
              Location      [0, 24; 1536, 847]
              State         "AAAA/wAAAAD9AAAAAgAAAAEAAAAAAAAAAPwCAAAAA/sAAAAQA"
"FoAbwBvAG0AQQByAGUAYQAAAAAA/////wAAAM8A////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcw"
"AAAAAA/////wAAAGEA////+wAAAAwAVAByAGEAYwBlAHMAAAAAAP////8AAABhAP///wAAAAMAAAA"
"AAAAAAPwBAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQAAAAAAP////8AAABEAP///wAABgAA"
"AAMYAAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP///"
"/8AAAAAAAAAAA=="
              SavedViews    "AAAAAgAAAAA="
              HeaderState   "{\"DefaultSecSize\":0,\"FirstSecSize\":67,\"Label"
"s\":[],\"VisualIdxs\":[]}"
              PlotPalettes  "AAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
"AAAAAAAAAAAAAAAA="
              Axes          "5"
              TimeRange     "0"
              ScrollingMode "1"
              SingleTimeAxis "1"
              Open          "0"
              Ts            "-1"
              SampleLimit   "25000"
              XAxisLabel    "Time / s"
              ShowLegend    "1"
              Axis {
                Name          ""
                AutoScale     1
                MinValue      0
                MaxValue      1
                Signals       {}
                SignalTypes   [ ]
                Untangle      0
                KeepBaseline  off
                BaselineValue 0
              }
              Axis {
                Name          ""
                AutoScale     1
                MinValue      0
                MaxValue      1
                Signals       {}
                SignalTypes   [ ]
                Untangle      0
                KeepBaseline  off
                BaselineValue 0
              }
              Axis {
                Name          ""
                AutoScale     1
                MinValue      0
                MaxValue      1
                Signals       {}
                SignalTypes   [ ]
                Untangle      0
                KeepBaseline  off
                BaselineValue 0
              }
              Axis {
                Name          ""
                AutoScale     1
                MinValue      0
                MaxValue      1
                Signals       {}
                SignalTypes   [ ]
                Untangle      0
                KeepBaseline  off
                BaselineValue 0
              }
              Axis {
                Name          ""
                AutoScale     1
                MinValue      0
                MaxValue      1
                Signals       {}
                SignalTypes   [ ]
                Untangle      0
                KeepBaseline  off
                BaselineValue 0
              }
              Fourier {
                SingleXAxis       on
                AxisLabel         "Frequency / Hz"
                Scaling           0
                PhaseDisplay      0
                ShowFourierLegend off
                Axis {
                  Name          ""
                  AutoScale     1
                  MinValue      0
                  MaxValue      1
                  Signals       {}
                  Untangle      0
                  KeepBaseline  off
                  BaselineValue 0
                }
                Axis {
                  Name          ""
                  AutoScale     1
                  MinValue      0
                  MaxValue      1
                  Signals       {}
                  Untangle      0
                  KeepBaseline  off
                  BaselineValue 0
                }
                Axis {
                  Name          ""
                  AutoScale     1
                  MinValue      0
                  MaxValue      1
                  Signals       {}
                  Untangle      0
                  KeepBaseline  off
                  BaselineValue 0
                }
                Axis {
                  Name          ""
                  AutoScale     1
                  MinValue      0
                  MaxValue      1
                  Signals       {}
                  Untangle      0
                  KeepBaseline  off
                  BaselineValue 0
                }
                Axis {
                  Name          ""
                  AutoScale     1
                  MinValue      0
                  MaxValue      1
                  Signals       {}
                  Untangle      0
                  KeepBaseline  off
                  BaselineValue 0
                }
              }
            }
            Connection {
              Type          Signal
              SrcComponent  "Sum1"
              SrcTerminal   1
              DstComponent  "1"
              DstTerminal   1
            }
            Connection {
              Type          Signal
              SrcComponent  "2"
              SrcTerminal   1
              Points        [45, 80]
              Branch {
                DstComponent  "Continuous PID\nController1"
                DstTerminal   1
              }
              Branch {
                Points        [45, 150]
                Branch {
                  Points        [45, 190]
                  Branch {
                    Points        [45, 230]
                    Branch {
                      Points        [45, 270]
                      DstComponent  "Transfer Fcn3"
                      DstTerminal   1
                    }
                    Branch {
                      DstComponent  "Transfer Fcn2"
                      DstTerminal   1
                    }
                  }
                  Branch {
                    DstComponent  "Transfer Fcn1"
                    DstTerminal   1
                  }
                }
                Branch {
                  DstComponent  "Transfer Fcn"
                  DstTerminal   1
                }
              }
            }
            Connection {
              Type          Signal
              SrcComponent  "Continuous PID\nController1"
              SrcTerminal   2
              Points        [210, 80]
              Branch {
                Points        [210, 170]
                DstComponent  "Sum1"
                DstTerminal   2
              }
              Branch {
                DstComponent  "Scope"
                DstTerminal   1
              }
            }
            Connection {
              Type          Signal
              SrcComponent  "Transfer Fcn"
              SrcTerminal   2
              Points        [205, 150]
              Branch {
                Points        [205, 180]
                DstComponent  "Sum1"
                DstTerminal   3
              }
              Branch {
                Points        [205, 90]
                DstComponent  "Scope"
                DstTerminal   2
              }
            }
            Connection {
              Type          Signal
              SrcComponent  "Transfer Fcn1"
              SrcTerminal   2
              Points        [200, 190]
              Branch {
                DstComponent  "Sum1"
                DstTerminal   4
              }
              Branch {
                Points        [200, 100]
                DstComponent  "Scope"
                DstTerminal   3
              }
            }
            Connection {
              Type          Signal
              SrcComponent  "Transfer Fcn2"
              SrcTerminal   2
              Points        [205, 230; 205, 200]
              Branch {
                DstComponent  "Sum1"
                DstTerminal   5
              }
              Branch {
                Points        [205, 110]
                DstComponent  "Scope"
                DstTerminal   4
              }
            }
            Connection {
              Type          Signal
              SrcComponent  "Transfer Fcn3"
              SrcTerminal   2
              Points        [215, 270; 215, 210]
              Branch {
                DstComponent  "Sum1"
                DstTerminal   6
              }
              Branch {
                Points        [215, 120]
                DstComponent  "Scope"
                DstTerminal   5
              }
            }
          }
        }
        Component {
          Type          Scope
          Name          "Scope12"
          Show          on
          Position      [1025, 1005]
          Direction     up
          Flipped       off
          LabelPosition south
          Frame         [-15, -15; 15, 15]
          Location      [0, 24; 1539, 847]
          State         "AAAA/wAAAAD9AAAAAgAAAAEAAAAAAAAAAPwCAAAAA/sAAAAQAFoAb"
"wBvAG0AQQByAGUAYQAAAAAA/////wAAAC8A////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwAAAA"
"AA/////wAAAGEA////+wAAAAwAVAByAGEAYwBlAHMAAAAAAP////8AAABhAP///wAAAAMAAAAAAAA"
"AAPwBAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQAAAAAAP////8AAABEAP///wAABgMAAAMY"
"AAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP////8AA"
"AAAAAAAAA=="
          SavedViews    "AAAAAgAAAAA="
          HeaderState   "{\"DefaultSecSize\":0,\"FirstSecSize\":99,\"Labels\":"
"[],\"VisualIdxs\":[]}"
          PlotPalettes  "AAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
          Axes          "1"
          TimeRange     "0.0"
          ScrollingMode "1"
          SingleTimeAxis "1"
          Open          "0"
          Ts            "-1"
          SampleLimit   "25000"
          XAxisLabel    "Time / s"
          ShowLegend    "1"
          Axis {
            Name          ""
            AutoScale     1
            MinValue      0
            MaxValue      1
            Signals       {}
            SignalTypes   [ ]
            Untangle      0
            KeepBaseline  off
            BaselineValue 0
          }
          Fourier {
            SingleXAxis       on
            AxisLabel         "Frequency / Hz"
            Scaling           0
            PhaseDisplay      0
            ShowFourierLegend off
            Axis {
              Name          ""
              AutoScale     1
              MinValue      0
              MaxValue      1
              Signals       {}
              Untangle      0
              KeepBaseline  off
              BaselineValue 0
            }
          }
        }
        Component {
          Type          Scope
          Name          "Scope13"
          Show          on
          Position      [1360, 1095]
          Direction     up
          Flipped       off
          LabelPosition south
          Frame         [-15, -15; 15, 15]
          Location      [0, 24; 1539, 847]
          State         "AAAA/wAAAAD9AAAAAgAAAAEAAAAAAAAAAPwCAAAAA/sAAAAQAFoAb"
"wBvAG0AQQByAGUAYQAAAAAA/////wAAAC8A////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwAAAA"
"AA/////wAAAGEA////+wAAAAwAVAByAGEAYwBlAHMAAAAAAP////8AAABhAP///wAAAAMAAAAAAAA"
"AAPwBAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQAAAAAAP////8AAABEAP///wAABgMAAAMY"
"AAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP////8AA"
"AAAAAAAAA=="
          SavedViews    "AAAAAgAAAAA="
          HeaderState   "{\"DefaultSecSize\":0,\"FirstSecSize\":99,\"Labels\":"
"[],\"VisualIdxs\":[]}"
          PlotPalettes  "AAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
          Axes          "1"
          TimeRange     "0"
          ScrollingMode "1"
          SingleTimeAxis "1"
          Open          "0"
          Ts            "-1"
          SampleLimit   "25000"
          XAxisLabel    "Time / s"
          ShowLegend    "1"
          Axis {
            Name          ""
            AutoScale     1
            MinValue      0
            MaxValue      1
            Signals       {}
            SignalTypes   [ ]
            Untangle      0
            KeepBaseline  off
            BaselineValue 0
          }
          Fourier {
            SingleXAxis       on
            AxisLabel         "Frequency / Hz"
            Scaling           0
            PhaseDisplay      0
            ShowFourierLegend off
            Axis {
              Name          ""
              AutoScale     1
              MinValue      0
              MaxValue      1
              Signals       {}
              Untangle      0
              KeepBaseline  off
              BaselineValue 0
            }
          }
        }
        Component {
          Type          Constant
          Name          "Constant9"
          Show          on
          Position      [920, 1275]
          Direction     right
          Flipped       off
          LabelPosition south
          Frame         [-25, -10; 25, 10]
          Parameter {
            Variable      "Value"
            Value         "0"
            Show          off
          }
          Parameter {
            Variable      "DataType"
            Value         "10"
            Show          off
          }
        }
        Component {
          Type          TargetCode
          Name          "Timer"
          Show          on
          Position      [50, 1055]
          Direction     up
          Flipped       off
          LabelPosition south
          Frame         [-25, -25; 25, 25]
          TargetPortIndices ""
          SampleTime    "0"
          EnforceBaseTask "1"
          CodeFcnLang   "2"
          CodeFcn       "local block = Target.Coder.CreateTargetBlock(\"TI C20"
"00\", \"timer\")\n"
"\n"
"return block:getDirectFeedthroughCode()"
          MaskType      "Timer"
          MaskDescription "Generate trigger signals for ADC and model."
          MaskHelp      "qthelp://com.plexim.c2000.1.0/doc/timer_c2000.html"
          MaskDisplay   "Icon:text('Timer')\n"
"\n"
"local function drawDecoration(color, text)\n"
"  Icon:color(color[1], color[2], color[3])\n"
"  local flipped = Block:get(\"Flipped\")\n"
"  local direction = Block:get(\"Direction\")\n"
"  local frame = Block:get(\"Frame\")\n"
"  local xLeft = frame[1]\n"
"  local xTot = frame[3]\n"
"  local yUp = frame[2]\n"
"  local yTot = frame[4]\n"
"  local s1 = [[<b><i>]] .. string.sub(text,1,1) .. [[<i><b>]]\n"
"  local s2 = [[<b><i>]] .. string.sub(text,2,2) .. [[<i><b>]]\n"
"  local x, y, xT1, xT2, yT1, yT2, g, position\n"
"  if direction == 0.0 then\n"
"    x = -xLeft+yUp\n"
"    y = xLeft-yUp\n"
"    g = -1\n"
"    if flipped then\n"
"      xT1 = xLeft+4.5\n"
"      yT1 = yUp+8\n"
"      xT2 = xLeft+4.5\n"
"      yT2 = yUp+13\n"
"      position = 'upLeft'\n"
"    else\n"
"      xT1 = xLeft+4.5\n"
"      yT1 = -yUp-8\n"
"      xT2 = xLeft+4.5\n"
"      yT2 = -yUp-13\n"
"      position = 'upRight'\n"
"    end\n"
"  end\n"
"  if direction == 0.25 then\n"
"    x = 0\n"
"    y = 0\n"
"    g = 1\n"
"    if flipped then\n"
"      xT1 = -xLeft-8\n"
"      yT1 = yUp+4.5\n"
"      xT2 = -xLeft-13\n"
"      yT2 = yUp+4.5\n"
"      position = 'upRight'\n"
"    else\n"
"      xT1 = -xLeft-8\n"
"      yT1 = -yUp-4.5\n"
"      xT2 = -xLeft-13\n"
"      yT2 = -yUp-4.5\n"
"      position = 'lowRight'\n"
"    end\n"
"  end\n"
"  if direction == 0.5 then\n"
"    x = -xLeft+yUp\n"
"    y = xLeft-yUp\n"
"    g = -1\n"
"    if flipped then\n"
"      xT1 = -xLeft-4.5\n"
"      yT1 = -yUp-8\n"
"      xT2 = -xLeft-4.5\n"
"      yT2 = -yUp-13\n"
"      position = 'lowRight'\n"
"    else\n"
"      xT1 = -xLeft-4.5\n"
"      yT1 = yUp+8\n"
"      xT2 = -xLeft-4.5\n"
"      yT2 = yUp+13\n"
"      position = 'lowLeft'\n"
"    end\n"
"  end\n"
"  if direction == 0.75 then\n"
"    x = 0\n"
"    y = 0\n"
"    g = 1\n"
"    if flipped then\n"
"      xT1 = xLeft+8\n"
"      yT1 = yUp+yTot-4.5\n"
"      xT2 = xLeft+13\n"
"      yT2 = yUp+yTot-4.5\n"
"      position = 'lowLeft'\n"
"    else\n"
"      xT1 = xLeft+8\n"
"      yT1 = yUp+4.5\n"
"      xT2 = xLeft+13\n"
"      yT2 = yUp+4.5\n"
"      position = 'upLeft'\n"
"    end\n"
"  end \n"
"  if position == 'upLeft' then\n"
"    Icon:patch({xLeft+x,xLeft+16.9+x,xLeft+16.9+x,xLeft+5.55+x},{yUp+8+y,yUp+"
"8+y,yUp+1+y,yUp+1+y})\n"
"    Icon:color(0,0,0)\n"
"    Icon:arc(xLeft+10+x,yUp+10+y,10,10,180,-90)\n"
"    Icon:text(xT1, yT1, s1, 'FontSize', 9, 'TextFormat', 'RichText', 'Color',"
" {255,255,255})\n"
"    Icon:text(xT2, yT2, s2, 'FontSize', 9, 'TextFormat', 'RichText', 'Color',"
" {255,255,255})\n"
"  elseif position == 'upRight' then\n"
"    Icon:patch({xLeft+xTot-16.9-x,xLeft+xTot-x,xLeft+xTot-5.55-x,xLeft+xTot-1"
"6.9-x},{yUp+8+y,yUp+8+y,yUp+1+y,yUp+1+y})\n"
"    Icon:color(0,0,0)\n"
"    Icon:arc(xLeft+xTot-10-x,yUp+10+y,10,10,0,90)\n"
"    Icon:text(g*(-xT2), g*yT2, s1, 'FontSize', 9, 'TextFormat', 'RichText', '"
"Color', {255,255,255})\n"
"    Icon:text(g*(-xT1), g*yT1, s2, 'FontSize', 9, 'TextFormat', 'RichText', '"
"Color', {255,255,255})\n"
"  elseif position == 'lowRight' then\n"
"    Icon:patch({xLeft+xTot-16.9-x,xLeft+xTot-x,xLeft+xTot-5.55-x,xLeft+xTot-1"
"6.9-x},{yUp+yTot-8-y,yUp+yTot-8-y,yUp+yTot-1-y,yUp+yTot-1-y})\n"
"    Icon:color(0,0,0)\n"
"    Icon:arc(xLeft+xTot-10-x,yUp+yTot-10-y,10,10,0,-90)\n"
"    Icon:text(-xT2, -yT2, s1, 'FontSize', 9, 'TextFormat', 'RichText', 'Color"
"', {255,255,255})\n"
"    Icon:text(-xT1, -yT1, s2, 'FontSize', 9, 'TextFormat', 'RichText', 'Color"
"', {255,255,255})\n"
"  elseif position == 'lowLeft' then\n"
"    Icon:patch({xLeft+x,xLeft+16.9+x,xLeft+16.9+x,xLeft+5.55+x},{yUp+yTot-8-y"
",yUp+yTot-8-y,yUp+yTot-1-y,yUp+yTot-1-y})\n"
"    Icon:color(0,0,0)\n"
"    Icon:arc(xLeft+10+x,yUp+yTot-10-y,10,10,180,90)\n"
"    Icon:text(g*xT1, -yT1*g, s1, 'FontSize', 9, 'TextFormat', 'RichText', 'Co"
"lor', {255,255,255})\n"
"    Icon:text(g*xT2, -yT2*g, s2, 'FontSize', 9, 'TextFormat', 'RichText', 'Co"
"lor', {255,255,255})\n"
"  end\n"
"end\n"
"\n"
"drawDecoration({204,0,0}, 'TI')"
          MaskDisplayLang "2"
          MaskIconFrame on
          MaskIconOpaque off
          MaskIconRotates off
          MaskInit      "if numel(f) ~= 1 || ~isreal(f),\n"
"  error('\"Timer frequency [Hz]\" must be a real scalar value.');\n"
"end\n"
"\n"
"if any(f <= 0)\n"
"\terror('\"Timer frequency [Hz]\" must be greater than 0.')\n"
"end\n"
"\n"
"if any(f > 200e6)\n"
"\terror('\"Timer frequency [Hz]\" greater than SYSCLK for all supported C2000"
" chips, please reduce the timer frequency.')\n"
"end\n"
"\n"
"if numel(f_tol) ~= 1,\n"
"  error('\"Frequency tolerance\" must be scalar.');\n"
"end"
          Parameter {
            Variable      "f"
            Prompt        "Frequency [Hz]"
            Type          FreeText
            Value         "10e3"
            Show          off
            Tunable       off
            TabName       ""
          }
          Parameter {
            Variable      "f_tol"
            Prompt        "Frequency tolerance"
            Type          FixedText
            PossibleValues {"Enforce exact value", "Round to closest achievabl"
"e value"}
            Value         "1"
            Show          off
            Tunable       off
            TabName       ""
          }
          Terminal {
            Type          EventOutput
            Position      [29, 15]
            Direction     right
          }
          Terminal {
            Type          EventOutput
            Position      [29, -15]
            Direction     right
          }
          Schematic {
            Location      [42, 520; 779, 755]
            ZoomFactor    1
            SliderPosition [0, 0]
            ShowBrowser   off
            BrowserWidth  100
            Component {
              Type          PulseGenerator
              Name          "Pulse\nGenerator"
              Show          off
              Position      [80, 55]
              Direction     right
              Flipped       off
              LabelPosition south
              Parameter {
                Variable      "Hi"
                Value         "1"
                Show          off
              }
              Parameter {
                Variable      "Lo"
                Value         "0"
                Show          off
              }
              Parameter {
                Variable      "f"
                Value         "f"
                Show          on
              }
              Parameter {
                Variable      "DutyCycle"
                Value         "0.5"
                Show          off
              }
              Parameter {
                Variable      "Delay"
                Value         "0"
                Show          off
              }
              Parameter {
                Variable      "DataType"
                Value         "10"
                Show          off
              }
            }
            Component {
              Type          EdgeDetection
              Name          "Edge Detection"
              Show          off
              Position      [140, 55]
              Direction     right
              Flipped       off
              LabelPosition south
              Parameter {
                Variable      "Direction"
                Value         "1"
                Show          off
              }
            }
            Component {
              Type          EventOutput
              Name          "Task"
              Show          on
              Position      [220, 55]
              Direction     right
              Flipped       off
              LabelPosition south
              Parameter {
                Variable      "Index"
                Value         "1"
                Show          on
              }
              Parameter {
                Variable      "Width"
                Value         "-1"
                Show          off
              }
            }
            Component {
              Type          EventOutput
              Name          "ADC"
              Show          on
              Position      [220, 100]
              Direction     right
              Flipped       off
              LabelPosition south
              Parameter {
                Variable      "Index"
                Value         "2"
                Show          on
              }
              Parameter {
                Variable      "Width"
                Value         "-1"
                Show          off
              }
            }
            Connection {
              Type          Signal
              SrcComponent  "Pulse\nGenerator"
              SrcTerminal   1
              DstComponent  "Edge Detection"
              DstTerminal   1
            }
            Connection {
              Type          Signal
              SrcComponent  "Edge Detection"
              SrcTerminal   2
              Points        [180, 55]
              Branch {
                DstComponent  "Task"
                DstTerminal   1
              }
              Branch {
                Points        [180, 100]
                DstComponent  "ADC"
                DstTerminal   1
              }
            }
          }
        }
        Component {
          Type          Saturation
          Name          "Saturation"
          Show          on
          Position      [1445, 1380]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "UpperLimit"
            Value         "0.99"
            Show          off
          }
          Parameter {
            Variable      "LowerLimit"
            Value         "0.01"
            Show          off
          }
        }
        Component {
          Type          Saturation
          Name          "Saturation1"
          Show          on
          Position      [1445, 1330]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "UpperLimit"
            Value         "0.99"
            Show          off
          }
          Parameter {
            Variable      "LowerLimit"
            Value         "0.01"
            Show          off
          }
        }
        Component {
          Type          Saturation
          Name          "Saturation2"
          Show          on
          Position      [1445, 1280]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "UpperLimit"
            Value         "0.99"
            Show          off
          }
          Parameter {
            Variable      "LowerLimit"
            Value         "0.01"
            Show          off
          }
        }
        Component {
          Type          Gain
          Name          "Gain7"
          Show          on
          Position      [1530, 1280]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "K"
            Value         "65535"
            Show          off
          }
          Parameter {
            Variable      "Multiplication"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "OutputDataType"
            Value         "11"
            Show          off
          }
          Parameter {
            Variable      "DataTypeOverflowMode"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "GainDataType"
            Value         "11"
            Show          off
          }
        }
        Component {
          Type          Gain
          Name          "Gain8"
          Show          on
          Position      [1530, 1330]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "K"
            Value         "65535"
            Show          off
          }
          Parameter {
            Variable      "Multiplication"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "OutputDataType"
            Value         "11"
            Show          off
          }
          Parameter {
            Variable      "DataTypeOverflowMode"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "GainDataType"
            Value         "11"
            Show          off
          }
        }
        Component {
          Type          Gain
          Name          "Gain9"
          Show          on
          Position      [1530, 1380]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "K"
            Value         "65535"
            Show          off
          }
          Parameter {
            Variable      "Multiplication"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "OutputDataType"
            Value         "11"
            Show          off
          }
          Parameter {
            Variable      "DataTypeOverflowMode"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "GainDataType"
            Value         "11"
            Show          off
          }
        }
        Component {
          Type          SignalMux
          Name          "Mux2"
          Show          off
          Position      [1600, 1330]
          Direction     right
          Flipped       off
          LabelPosition south
          Frame         [-2, -55; 7, 55]
          Parameter {
            Variable      "Width"
            Value         "3"
            Show          off
          }
        }
        Component {
          Type          DataType
          Name          "Data Type"
          Show          on
          Position      [1675, 1330]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "DataType"
            Value         "4"
            Show          off
          }
          Parameter {
            Variable      "DataTypeOverflowMode"
            Value         "2"
            Show          off
          }
        }
        Component {
          Type          TargetCode
          Name          "SPI Controller"
          Show          on
          Position      [1790, 1310]
          Direction     up
          Flipped       off
          LabelPosition south
          Frame         [-25, -30; 25, 30]
          TargetPortIndices "3 4 5 6"
          SampleTime    "0"
          EnforceBaseTask "1"
          CodeFcnLang   "2"
          CodeFcn       "if Target.Name == \"Generic\" then\n"
"  local OutputSignal = StringList:new()\n"
"\n"
"  OutputSignal[1] = {}\n"
"  for i = 1, Block.Mask.dim do\n"
"    OutputSignal[1][i] = \"0.0\"\n"
"  end\n"
"  OutputSignal[2] = {}\n"
"  OutputSignal[2][1] = \"0.0\"\n"
"  OutputSignal[3] = {}\n"
"  OutputSignal[3][1] = \"0.0\"\n"
"  return {\n"
"    OutputSignal = OutputSignal,\n"
"  }\n"
"end\n"
"\n"
"local block = Target.Coder.CreateTargetBlock(\"TI C2000\", \"spi_master\")\n"
"\n"
"return block:getDirectFeedthroughCode()"
          NonDftCodeFcn "if Target.Name == \"Generic\" then\n"
"  return {}\n"
"end\n"
"\n"
"local block = Target.Coder.GetTargetBlock(Block.UserData.bid)\n"
"\n"
"return block:getNonDirectFeedthroughCode()"
          MaskType      "SPI Master"
          MaskDescription "Implement SPI master connected to one or multiple s"
"laves."
          MaskHelp      "qthelp://com.plexim.c2000.1.0/doc/spimaster_c2000.htm"
"l"
          MaskDisplay   "Icon:text(0, -4, 'SPI\\nMaster')\n"
"\n"
"local function drawDecoration(color, text)\n"
"  Icon:color(color[1], color[2], color[3])\n"
"  local flipped = Block:get(\"Flipped\")\n"
"  local direction = Block:get(\"Direction\")\n"
"  local frame = Block:get(\"Frame\")\n"
"  local xLeft = frame[1]\n"
"  local xTot = frame[3]\n"
"  local yUp = frame[2]\n"
"  local yTot = frame[4]\n"
"  local s1 = [[<b><i>]] .. string.sub(text,1,1) .. [[<i><b>]]\n"
"  local s2 = [[<b><i>]] .. string.sub(text,2,2) .. [[<i><b>]]\n"
"  local x, y, xT1, xT2, yT1, yT2, g, position\n"
"  if direction == 0.0 then\n"
"    x = -xLeft+yUp\n"
"    y = xLeft-yUp\n"
"    g = -1\n"
"    if flipped then\n"
"      xT1 = xLeft+4.5\n"
"      yT1 = yUp+8\n"
"      xT2 = xLeft+4.5\n"
"      yT2 = yUp+13\n"
"      position = 'upLeft'\n"
"    else\n"
"      xT1 = xLeft+4.5\n"
"      yT1 = -yUp-8\n"
"      xT2 = xLeft+4.5\n"
"      yT2 = -yUp-13\n"
"      position = 'upRight'\n"
"    end\n"
"  end\n"
"  if direction == 0.25 then\n"
"    x = 0\n"
"    y = 0\n"
"    g = 1\n"
"    if flipped then\n"
"      xT1 = -xLeft-8\n"
"      yT1 = yUp+4.5\n"
"      xT2 = -xLeft-13\n"
"      yT2 = yUp+4.5\n"
"      position = 'upRight'\n"
"    else\n"
"      xT1 = -xLeft-8\n"
"      yT1 = -yUp-4.5\n"
"      xT2 = -xLeft-13\n"
"      yT2 = -yUp-4.5\n"
"      position = 'lowRight'\n"
"    end\n"
"  end\n"
"  if direction == 0.5 then\n"
"    x = -xLeft+yUp\n"
"    y = xLeft-yUp\n"
"    g = -1\n"
"    if flipped then\n"
"      xT1 = -xLeft-4.5\n"
"      yT1 = -yUp-8\n"
"      xT2 = -xLeft-4.5\n"
"      yT2 = -yUp-13\n"
"      position = 'lowRight'\n"
"    else\n"
"      xT1 = -xLeft-4.5\n"
"      yT1 = yUp+8\n"
"      xT2 = -xLeft-4.5\n"
"      yT2 = yUp+13\n"
"      position = 'lowLeft'\n"
"    end\n"
"  end\n"
"  if direction == 0.75 then\n"
"    x = 0\n"
"    y = 0\n"
"    g = 1\n"
"    if flipped then\n"
"      xT1 = xLeft+8\n"
"      yT1 = yUp+yTot-4.5\n"
"      xT2 = xLeft+13\n"
"      yT2 = yUp+yTot-4.5\n"
"      position = 'lowLeft'\n"
"    else\n"
"      xT1 = xLeft+8\n"
"      yT1 = yUp+4.5\n"
"      xT2 = xLeft+13\n"
"      yT2 = yUp+4.5\n"
"      position = 'upLeft'\n"
"    end\n"
"  end \n"
"  if position == 'upLeft' then\n"
"    Icon:patch({xLeft+x,xLeft+16.9+x,xLeft+16.9+x,xLeft+5.55+x},{yUp+8+y,yUp+"
"8+y,yUp+1+y,yUp+1+y})\n"
"    Icon:color(0,0,0)\n"
"    Icon:arc(xLeft+10+x,yUp+10+y,10,10,180,-90)\n"
"    Icon:text(xT1, yT1, s1, 'FontSize', 9, 'TextFormat', 'RichText', 'Color',"
" {255,255,255})\n"
"    Icon:text(xT2, yT2, s2, 'FontSize', 9, 'TextFormat', 'RichText', 'Color',"
" {255,255,255})\n"
"  elseif position == 'upRight' then\n"
"    Icon:patch({xLeft+xTot-16.9-x,xLeft+xTot-x,xLeft+xTot-5.55-x,xLeft+xTot-1"
"6.9-x},{yUp+8+y,yUp+8+y,yUp+1+y,yUp+1+y})\n"
"    Icon:color(0,0,0)\n"
"    Icon:arc(xLeft+xTot-10-x,yUp+10+y,10,10,0,90)\n"
"    Icon:text(g*(-xT2), g*yT2, s1, 'FontSize', 9, 'TextFormat', 'RichText', '"
"Color', {255,255,255})\n"
"    Icon:text(g*(-xT1), g*yT1, s2, 'FontSize', 9, 'TextFormat', 'RichText', '"
"Color', {255,255,255})\n"
"  elseif position == 'lowRight' then\n"
"    Icon:patch({xLeft+xTot-16.9-x,xLeft+xTot-x,xLeft+xTot-5.55-x,xLeft+xTot-1"
"6.9-x},{yUp+yTot-8-y,yUp+yTot-8-y,yUp+yTot-1-y,yUp+yTot-1-y})\n"
"    Icon:color(0,0,0)\n"
"    Icon:arc(xLeft+xTot-10-x,yUp+yTot-10-y,10,10,0,-90)\n"
"    Icon:text(-xT2, -yT2, s1, 'FontSize', 9, 'TextFormat', 'RichText', 'Color"
"', {255,255,255})\n"
"    Icon:text(-xT1, -yT1, s2, 'FontSize', 9, 'TextFormat', 'RichText', 'Color"
"', {255,255,255})\n"
"  elseif position == 'lowLeft' then\n"
"    Icon:patch({xLeft+x,xLeft+16.9+x,xLeft+16.9+x,xLeft+5.55+x},{yUp+yTot-8-y"
",yUp+yTot-8-y,yUp+yTot-1-y,yUp+yTot-1-y})\n"
"    Icon:color(0,0,0)\n"
"    Icon:arc(xLeft+10+x,yUp+yTot-10-y,10,10,180,90)\n"
"    Icon:text(g*xT1, -yT1*g, s1, 'FontSize', 9, 'TextFormat', 'RichText', 'Co"
"lor', {255,255,255})\n"
"    Icon:text(g*xT2, -yT2*g, s2, 'FontSize', 9, 'TextFormat', 'RichText', 'Co"
"lor', {255,255,255})\n"
"  end\n"
"end\n"
"\n"
"drawDecoration({204,0,0}, 'TI')"
          MaskDisplayLang "2"
          MaskIconFrame on
          MaskIconOpaque off
          MaskIconRotates off
          MaskDialogCallback "local parent = Block:get(\"Parent\")\n"
"local blockName = Block:get(\"Name\")\n"
"local showParentTerms = Dialog:get(\"offlineSimulation\") ~= \"1\"\n"
"parent:showTerminal(\"%s / o \" % { blockName }, showParentTerms)\n"
"parent:showTerminal(\"%s / v \" % { blockName }, showParentTerms)\n"
"parent:showTerminal(\"%s / In \" % { blockName }, showParentTerms)\n"
"parent:showTerminal(\"%s / Out \" % { blockName }, showParentTerms)\n"
"\n"
"Dialog:set('mode', 'Visible', Dialog:get('mode')~='5')\n"
"Dialog:set('Mode', 'Visible', Dialog:get('mode')=='5')"
          Parameter {
            Variable      "spi"
            Prompt        "SPI module"
            Type          FixedText
            PossibleValues {"A", "B"}
            Value         "1"
            Show          off
            Tunable       off
            TabName       ""
          }
          Parameter {
            Variable      "clk"
            Prompt        "Clock rate"
            Type          FreeText
            Value         "5000000"
            Show          off
            Tunable       off
            TabName       ""
          }
          Parameter {
            Variable      "charlen"
            Prompt        "Bits per word (1-16)"
            Type          FreeText
            Value         "16"
            Show          off
            Tunable       off
            TabName       ""
          }
          Parameter {
            Variable      "mode"
            Prompt        "Mode [CPOL, CPHA] (deprecated, set to 'hide')"
            Type          FixedText
            PossibleValues {"2 - [1, 1]", "3 - [1, 0]", "0 - [0, 1]", "1 - [0,"
" 0]", "hide"}
            Value         "5"
            Show          off
            Tunable       off
            TabName       ""
          }
          Parameter {
            Variable      "Mode"
            Prompt        "Mode [CPOL, CPHA]"
            Type          FixedText
            PossibleValues {"0 - [0, 1]", "1 - [0, 0]", "2 - [1, 1]", "3 - [1,"
" 0]"}
            Value         "1"
            Show          off
            Tunable       off
            TabName       ""
          }
          Parameter {
            Variable      "pinset"
            Prompt        "Serial GPIO numbers [SIMO, SOMI, CLK]"
            Type          FreeText
            Value         "[16,17,18]"
            Show          off
            Tunable       off
            TabName       ""
          }
          Parameter {
            Variable      "csgpio"
            Prompt        "/CS GPIO number(s)"
            Type          FreeText
            Value         "19"
            Show          off
            Tunable       off
            TabName       "Slave(s)"
          }
          Parameter {
            Variable      "dim"
            Prompt        "Words per transmission (vector for multiple slaves)"
            Type          FreeText
            Value         "3"
            Show          off
            Tunable       off
            TabName       "Slave(s)"
          }
          Parameter {
            Variable      "offlineSimulation"
            Prompt        "Offline simulation"
            Type          FixedText
            PossibleValues {"disable", "enable"}
            Value         "2"
            Show          off
            Tunable       off
            TabName       ""
          }
          Terminal {
            Type          Output
            Position      [29, 20]
            Direction     right
          }
          Terminal {
            Type          Input
            Position      [-25, 20]
            Direction     left
          }
          Terminal {
            Type          Output
            Position      [29, -20]
            Direction     right
          }
          Terminal {
            Type          Output
            Position      [29, -10]
            Direction     right
          }
          Schematic {
            Location      [553, 486; 1639, 805]
            ZoomFactor    1
            SliderPosition [0, 0]
            ShowBrowser   off
            BrowserWidth  100
            Component {
              Type          Output
              Name          "RX"
              Show          on
              Position      [135, 40]
              Direction     right
              Flipped       off
              LabelPosition south
              Parameter {
                Variable      "Index"
                Value         "1"
                Show          on
              }
              Parameter {
                Variable      "DataType"
                Value         "10"
                Show          off
              }
              Parameter {
                Variable      "DataTypeOverflowMode"
                Value         "1"
                Show          off
              }
              Parameter {
                Variable      "Width"
                Value         "-1"
                Show          off
              }
            }
            Component {
              Type          Input
              Name          "TX"
              Show          on
              Position      [55, 85]
              Direction     right
              Flipped       off
              LabelPosition south
              Parameter {
                Variable      "Index"
                Value         "2"
                Show          on
              }
              Parameter {
                Variable      "InitialOutput"
                Value         "[]"
                Show          off
              }
              Parameter {
                Variable      "HasDirectFeedthrough"
                Value         "2"
                Show          off
              }
              Parameter {
                Variable      "DataType"
                Value         "11"
                Show          off
              }
              Parameter {
                Variable      "DataTypeOverflowMode"
                Value         "1"
                Show          off
              }
              Parameter {
                Variable      "Width"
                Value         "sum(dim)"
                Show          off
              }
            }
            Component {
              Type          Output
              Name          " v"
              Show          on
              Position      [135, 130]
              Direction     right
              Flipped       off
              LabelPosition south
              Parameter {
                Variable      "Index"
                Value         "3"
                Show          on
              }
              Parameter {
                Variable      "DataType"
                Value         "10"
                Show          off
              }
              Parameter {
                Variable      "DataTypeOverflowMode"
                Value         "1"
                Show          off
              }
              Parameter {
                Variable      "Width"
                Value         "-1"
                Show          off
              }
            }
            Component {
              Type          Output
              Name          "  o"
              Show          on
              Position      [135, 175]
              Direction     right
              Flipped       off
              LabelPosition south
              Parameter {
                Variable      "Index"
                Value         "4"
                Show          on
              }
              Parameter {
                Variable      "DataType"
                Value         "10"
                Show          off
              }
              Parameter {
                Variable      "DataTypeOverflowMode"
                Value         "1"
                Show          off
              }
              Parameter {
                Variable      "Width"
                Value         "-1"
                Show          off
              }
            }
            Component {
              Type          TargetInput
              Name          "In"
              Show          on
              Position      [55, 40]
              Direction     right
              Flipped       off
              LabelPosition south
              Parameter {
                Variable      "Width"
                Value         "sum(dim)"
                Show          off
              }
            }
            Component {
              Type          TargetOutput
              Name          "Out"
              Show          on
              Position      [135, 85]
              Direction     right
              Flipped       off
              LabelPosition south
              Parameter {
                Variable      "Width"
                Value         "-1"
                Show          off
              }
            }
            Component {
              Type          TargetInput
              Name          "v"
              Show          on
              Position      [55, 130]
              Direction     right
              Flipped       off
              LabelPosition south
              Parameter {
                Variable      "Width"
                Value         "-1"
                Show          off
              }
            }
            Component {
              Type          TargetInput
              Name          "o"
              Show          on
              Position      [55, 175]
              Direction     right
              Flipped       off
              LabelPosition south
              Parameter {
                Variable      "Width"
                Value         "-1"
                Show          off
              }
            }
            Connection {
              Type          Signal
              SrcComponent  "In"
              SrcTerminal   1
              DstComponent  "RX"
              DstTerminal   1
            }
            Connection {
              Type          Signal
              SrcComponent  "TX"
              SrcTerminal   1
              DstComponent  "Out"
              DstTerminal   1
            }
            Connection {
              Type          Signal
              SrcComponent  "v"
              SrcTerminal   1
              DstComponent  " v"
              DstTerminal   1
            }
            Connection {
              Type          Signal
              SrcComponent  "o"
              SrcTerminal   1
              DstComponent  "  o"
              DstTerminal   1
            }
          }
        }
        Component {
          Type          Scope
          Name          "Scope14"
          Show          on
          Position      [1880, 1230]
          Direction     up
          Flipped       off
          LabelPosition south
          Frame         [-15, -15; 15, 15]
          Location      [0, 24; 1539, 847]
          State         "AAAA/wAAAAD9AAAAAgAAAAEAAAAAAAAAAPwCAAAAA/sAAAAQAFoAb"
"wBvAG0AQQByAGUAYQAAAAAA/////wAAAC8A////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwAAAA"
"AA/////wAAAGEA////+wAAAAwAVAByAGEAYwBlAHMAAAAAAP////8AAABhAP///wAAAAMAAAAAAAA"
"AAPwBAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQAAAAAAP////8AAABEAP///wAABgMAAAMY"
"AAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP////8AA"
"AAAAAAAAA=="
          SavedViews    "AAAAAgAAAAA="
          HeaderState   "{\"DefaultSecSize\":0,\"FirstSecSize\":99,\"Labels\":"
"[],\"VisualIdxs\":[]}"
          PlotPalettes  "AAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
          Axes          "1"
          TimeRange     "0"
          ScrollingMode "1"
          SingleTimeAxis "1"
          Open          "0"
          Ts            "-1"
          SampleLimit   "25000"
          XAxisLabel    "Time / s"
          ShowLegend    "1"
          Axis {
            Name          ""
            AutoScale     1
            MinValue      0
            MaxValue      1
            Signals       {}
            SignalTypes   [ ]
            Untangle      0
            KeepBaseline  off
            BaselineValue 0
          }
          Fourier {
            SingleXAxis       on
            AxisLabel         "Frequency / Hz"
            Scaling           0
            PhaseDisplay      0
            ShowFourierLegend off
            Axis {
              Name          ""
              AutoScale     1
              MinValue      0
              MaxValue      1
              Signals       {}
              Untangle      0
              KeepBaseline  off
              BaselineValue 0
            }
          }
        }
        Component {
          Type          Scope
          Name          "Scope15"
          Show          on
          Position      [1940, 1230]
          Direction     up
          Flipped       off
          LabelPosition south
          Frame         [-15, -15; 15, 15]
          Location      [0, 24; 1539, 847]
          State         "AAAA/wAAAAD9AAAAAgAAAAEAAAAAAAAAAPwCAAAAA/sAAAAQAFoAb"
"wBvAG0AQQByAGUAYQAAAAAA/////wAAAC8A////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwAAAA"
"AA/////wAAAGEA////+wAAAAwAVAByAGEAYwBlAHMAAAAAAP////8AAABhAP///wAAAAMAAAAAAAA"
"AAPwBAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQAAAAAAP////8AAABEAP///wAABgMAAAMY"
"AAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP////8AA"
"AAAAAAAAA=="
          SavedViews    "AAAAAgAAAAA="
          HeaderState   "{\"DefaultSecSize\":0,\"FirstSecSize\":99,\"Labels\":"
"[],\"VisualIdxs\":[]}"
          PlotPalettes  "AAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
          Axes          "1"
          TimeRange     "0"
          ScrollingMode "1"
          SingleTimeAxis "1"
          Open          "0"
          Ts            "-1"
          SampleLimit   "25000"
          XAxisLabel    "Time / s"
          ShowLegend    "1"
          Axis {
            Name          ""
            AutoScale     1
            MinValue      0
            MaxValue      1
            Signals       {}
            SignalTypes   [ ]
            Untangle      0
            KeepBaseline  off
            BaselineValue 0
          }
          Fourier {
            SingleXAxis       on
            AxisLabel         "Frequency / Hz"
            Scaling           0
            PhaseDisplay      0
            ShowFourierLegend off
            Axis {
              Name          ""
              AutoScale     1
              MinValue      0
              MaxValue      1
              Signals       {}
              Untangle      0
              KeepBaseline  off
              BaselineValue 0
            }
          }
        }
        Component {
          Type          Scope
          Name          "Scope16"
          Show          on
          Position      [1545, 1185]
          Direction     up
          Flipped       off
          LabelPosition south
          Frame         [-15, -15; 15, 15]
          Location      [0, 24; 1539, 847]
          State         "AAAA/wAAAAD9AAAAAgAAAAEAAAAAAAAAAPwCAAAAA/sAAAAQAFoAb"
"wBvAG0AQQByAGUAYQAAAAAA/////wAAAC8A////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwAAAA"
"AA/////wAAAGEA////+wAAAAwAVAByAGEAYwBlAHMAAAAAAP////8AAABhAP///wAAAAMAAAAAAAA"
"AAPwBAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQAAAAAAP////8AAABEAP///wAABgMAAAMY"
"AAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP////8AA"
"AAAAAAAAA=="
          SavedViews    "AAAAAgAAAAA="
          HeaderState   "{\"DefaultSecSize\":0,\"FirstSecSize\":99,\"Labels\":"
"[],\"VisualIdxs\":[]}"
          PlotPalettes  "AAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
          Axes          "1"
          TimeRange     "0"
          ScrollingMode "1"
          SingleTimeAxis "1"
          Open          "0"
          Ts            "-1"
          SampleLimit   "25000"
          XAxisLabel    "Time / s"
          ShowLegend    "1"
          Axis {
            Name          ""
            AutoScale     1
            MinValue      0
            MaxValue      1
            Signals       {}
            SignalTypes   [ ]
            Untangle      0
            KeepBaseline  off
            BaselineValue 0
          }
          Fourier {
            SingleXAxis       on
            AxisLabel         "Frequency / Hz"
            Scaling           0
            PhaseDisplay      0
            ShowFourierLegend off
            Axis {
              Name          ""
              AutoScale     1
              MinValue      0
              MaxValue      1
              Signals       {}
              Untangle      0
              KeepBaseline  off
              BaselineValue 0
            }
          }
        }
        Component {
          Type          From
          Name          "From22"
          Show          off
          Position      [430, 885]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "Udcbc"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Connection {
          Type          Signal
          SrcComponent  "Three-Phase PLL"
          SrcTerminal   3
          DstComponent  base64 "6ZSB55u4546v"
          DstTerminal   2
        }
        Connection {
          Type          Signal
          SrcComponent  "Three-Phase PLL"
          SrcTerminal   4
          DstComponent  base64 "6ZSB55u4546v"
          DstTerminal   3
        }
        Connection {
          Type          Signal
          SrcComponent  "Three-Phase PLL"
          SrcTerminal   2
          Points        [625, 145]
          Branch {
            Points        [640, 145]
            Branch {
              DstComponent  base64 "6ZSB55u4546v"
              DstTerminal   1
            }
            Branch {
              DstComponent  "Trigonometric\nFunction"
              DstTerminal   1
            }
          }
          Branch {
            DstComponent  "Goto2"
            DstTerminal   1
          }
        }
        Connection {
          Type          Signal
          SrcComponent  "From1"
          SrcTerminal   1
          DstComponent  "3ph->RRF"
          DstTerminal   3
        }
        Connection {
          Type          Signal
          SrcComponent  "Demux"
          SrcTerminal   2
          DstComponent  "Goto"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "Demux"
          SrcTerminal   3
          DstComponent  "Goto1"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "3ph->RRF"
          SrcTerminal   2
          DstComponent  "Demux"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "Demux1"
          SrcTerminal   3
          Points        [535, 285]
          Branch {
            DstComponent  "Subtract"
            DstTerminal   3
          }
          Branch {
            DstComponent  "Subtract1"
            DstTerminal   2
          }
        }
        Connection {
          Type          Signal
          SrcComponent  "Demux1"
          SrcTerminal   4
          Points        [525, 295; 525, 315]
          Branch {
            DstComponent  "Subtract1"
            DstTerminal   3
          }
          Branch {
            Points        [525, 335]
            DstComponent  "Subtract2"
            DstTerminal   2
          }
        }
        Connection {
          Type          Signal
          SrcComponent  "Demux1"
          SrcTerminal   2
          Points        [515, 275]
          Branch {
            DstComponent  "Subtract"
            DstTerminal   2
          }
          Branch {
            Points        [515, 345]
            DstComponent  "Subtract2"
            DstTerminal   3
          }
        }
        Connection {
          Type          Signal
          SrcComponent  "Subtract"
          SrcTerminal   1
          DstComponent  "Mux"
          DstTerminal   2
        }
        Connection {
          Type          Signal
          SrcComponent  "Subtract1"
          SrcTerminal   1
          Points        [585, 290]
          DstComponent  "Mux"
          DstTerminal   3
        }
        Connection {
          Type          Signal
          SrcComponent  "Subtract2"
          SrcTerminal   1
          Points        [590, 340]
          DstComponent  "Mux"
          DstTerminal   4
        }
        Connection {
          Type          Signal
          SrcComponent  "Mux"
          SrcTerminal   1
          DstComponent  "Gain"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "Gain"
          SrcTerminal   2
          DstComponent  "3ph->RRF1"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "From4"
          SrcTerminal   1
          Points        [670, 340; 670, 300]
          DstComponent  "3ph->RRF1"
          DstTerminal   3
        }
        Connection {
          Type          Signal
          SrcComponent  "3ph->RRF1"
          SrcTerminal   2
          DstComponent  "Demux2"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "Demux2"
          SrcTerminal   3
          DstComponent  "Goto4"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "From6"
          SrcTerminal   1
          DstComponent  "3ph->RRF2"
          DstTerminal   3
        }
        Connection {
          Type          Signal
          SrcComponent  "3ph->RRF2"
          SrcTerminal   2
          DstComponent  "Demux4"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "Demux4"
          SrcTerminal   2
          DstComponent  "Goto5"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "Demux4"
          SrcTerminal   3
          DstComponent  "Goto6"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "Trigonometric\nFunction"
          SrcTerminal   2
          DstComponent  "Scope"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "Demux2"
          SrcTerminal   2
          Points        [770, 290]
          Branch {
            Points        [875, 290; 875, 265]
            DstComponent  "Sum1"
            DstTerminal   3
          }
          Branch {
            Points        [770, 255]
            DstComponent  "Transfer Fcn"
            DstTerminal   1
          }
        }
        Connection {
          Type          Signal
          SrcComponent  "Transfer Fcn"
          SrcTerminal   2
          DstComponent  "Sum1"
          DstTerminal   2
        }
        Connection {
          Type          Signal
          SrcComponent  "Sum1"
          SrcTerminal   1
          DstComponent  "Goto7"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "Sum3"
          SrcTerminal   1
          DstComponent  "Gain3"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "Gain3"
          SrcTerminal   2
          Points        [800, 895]
          Branch {
            Points        [800, 835]
            Branch {
              DstComponent  "Subtract3"
              DstTerminal   3
            }
            Branch {
              Points        [800, 795]
              DstComponent  "Mux7"
              DstTerminal   3
            }
          }
          Branch {
            DstComponent  "Goto15"
            DstTerminal   1
          }
        }
        Connection {
          Type          Signal
          SrcComponent  "Constant"
          SrcTerminal   1
          Points        [780, 825]
          Branch {
            DstComponent  "Subtract3"
            DstTerminal   2
          }
          Branch {
            Points        [780, 785]
            DstComponent  "Mux7"
            DstTerminal   2
          }
        }
        Connection {
          Type          Signal
          SrcComponent  "Mux7"
          SrcTerminal   1
          DstComponent  "Scope2"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "Transfer Fcn1"
          SrcTerminal   2
          Points        [610, 840; 610, 885]
          DstComponent  "Sum3"
          DstTerminal   2
        }
        Connection {
          Type          Signal
          SrcComponent  "Transfer Fcn2"
          SrcTerminal   2
          Points        [605, 885; 605, 895]
          DstComponent  "Sum3"
          DstTerminal   3
        }
        Connection {
          Type          Signal
          SrcComponent  "Transfer Fcn3"
          SrcTerminal   2
          Points        [585, 905]
          DstComponent  "Sum3"
          DstTerminal   4
        }
        Connection {
          Type          Signal
          SrcComponent  "From8"
          SrcTerminal   1
          DstComponent  "Transfer Fcn1"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "From11"
          SrcTerminal   1
          Points        [1360, 515; 1360, 530; 1375, 530]
          Branch {
            DstComponent  "Subtract4"
            DstTerminal   2
          }
          Branch {
            Points        [1375, 605]
            Branch {
              DstComponent  "Subtract5"
              DstTerminal   2
            }
            Branch {
              Points        [1375, 675]
              DstComponent  "Subtract6"
              DstTerminal   2
            }
          }
        }
        Connection {
          Type          Signal
          SrcComponent  "Subtract4"
          SrcTerminal   1
          DstComponent  "Continuous PID\nController3"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "Subtract5"
          SrcTerminal   1
          DstComponent  "Continuous PID\nController4"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "Subtract6"
          SrcTerminal   1
          DstComponent  "Continuous PID\nController5"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "Continuous PID\nController3"
          SrcTerminal   2
          DstComponent  "Sum4"
          DstTerminal   2
        }
        Connection {
          Type          Signal
          SrcComponent  "Continuous PID\nController4"
          SrcTerminal   2
          DstComponent  "Sum5"
          DstTerminal   2
        }
        Connection {
          Type          Signal
          SrcComponent  "Continuous PID\nController5"
          SrcTerminal   2
          DstComponent  "Sum6"
          DstTerminal   2
        }
        Connection {
          Type          Signal
          SrcComponent  "From15"
          SrcTerminal   1
          Points        [1560, 760]
          Branch {
            Points        [1580, 760]
            DstComponent  "Sum6"
            DstTerminal   3
          }
          Branch {
            Points        [1560, 640]
            Branch {
              Points        [1560, 560]
              DstComponent  "Sum4"
              DstTerminal   3
            }
            Branch {
              Points        [1580, 640]
              DstComponent  "Sum5"
              DstTerminal   3
            }
          }
        }
        Connection {
          Type          Signal
          SrcComponent  "Sum4"
          SrcTerminal   1
          DstComponent  "Gain4"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "Sum5"
          SrcTerminal   1
          DstComponent  "Gain5"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "Sum6"
          SrcTerminal   1
          DstComponent  "Gain6"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "Sum7"
          SrcTerminal   1
          DstComponent  "Trigonometric\nFunction2"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "Sum8"
          SrcTerminal   1
          DstComponent  "Trigonometric\nFunction6"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "From16"
          SrcTerminal   1
          Points        [1595, 790; 1595, 720]
          Branch {
            Points        [1595, 650]
            Branch {
              Points        [1595, 580]
              DstComponent  "Trigonometric\nFunction1"
              DstTerminal   1
            }
            Branch {
              DstComponent  "Sum7"
              DstTerminal   2
            }
          }
          Branch {
            DstComponent  "Sum8"
            DstTerminal   2
          }
        }
        Connection {
          Type          Signal
          SrcComponent  "Constant1"
          SrcTerminal   1
          Points        [1625, 825; 1625, 745]
          Branch {
            DstComponent  "Sum7"
            DstTerminal   3
          }
          Branch {
            DstComponent  "Sum8"
            DstTerminal   3
          }
        }
        Connection {
          Type          Signal
          SrcComponent  "Gain4"
          SrcTerminal   2
          DstComponent  "Product1"
          DstTerminal   2
        }
        Connection {
          Type          Signal
          SrcComponent  "Trigonometric\nFunction1"
          SrcTerminal   2
          Points        [1745, 580]
          DstComponent  "Product1"
          DstTerminal   3
        }
        Connection {
          Type          Signal
          SrcComponent  "Gain5"
          SrcTerminal   2
          DstComponent  "Product2"
          DstTerminal   2
        }
        Connection {
          Type          Signal
          SrcComponent  "Trigonometric\nFunction2"
          SrcTerminal   2
          Points        [1745, 650]
          DstComponent  "Product2"
          DstTerminal   3
        }
        Connection {
          Type          Signal
          SrcComponent  "Gain6"
          SrcTerminal   2
          DstComponent  "Product3"
          DstTerminal   2
        }
        Connection {
          Type          Signal
          SrcComponent  "Trigonometric\nFunction6"
          SrcTerminal   2
          Points        [1745, 720]
          DstComponent  "Product3"
          DstTerminal   3
        }
        Connection {
          Type          Signal
          SrcComponent  "Product1"
          SrcTerminal   1
          DstComponent  "Mux1"
          DstTerminal   2
        }
        Connection {
          Type          Signal
          SrcComponent  "Product2"
          SrcTerminal   1
          Points        [1775, 610; 1775, 545]
          DstComponent  "Mux1"
          DstTerminal   3
        }
        Connection {
          Type          Signal
          SrcComponent  "Product3"
          SrcTerminal   1
          Points        [1795, 680; 1795, 555]
          DstComponent  "Mux1"
          DstTerminal   4
        }
        Connection {
          Type          Signal
          SrcComponent  "Mux1"
          SrcTerminal   1
          Points        [1850, 545]
          Branch {
            DstComponent  "Goto16"
            DstTerminal   1
          }
          Branch {
            Points        [1850, 580]
            DstComponent  "Scope5"
            DstTerminal   1
          }
        }
        Connection {
          Type          Signal
          SrcComponent  "From12"
          SrcTerminal   1
          DstComponent  "Transfer Fcn4"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "Transfer Fcn4"
          SrcTerminal   2
          DstComponent  "Subtract4"
          DstTerminal   3
        }
        Connection {
          Type          Signal
          SrcComponent  "From13"
          SrcTerminal   1
          DstComponent  "Transfer Fcn5"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "Transfer Fcn5"
          SrcTerminal   2
          DstComponent  "Subtract5"
          DstTerminal   3
        }
        Connection {
          Type          Signal
          SrcComponent  "From14"
          SrcTerminal   1
          DstComponent  "Transfer Fcn6"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "Transfer Fcn6"
          SrcTerminal   2
          DstComponent  "Subtract6"
          DstTerminal   3
        }
        Connection {
          Type          Signal
          SrcComponent  "From2"
          SrcTerminal   1
          DstComponent  "Gain1"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "From"
          SrcTerminal   1
          DstComponent  "Sum"
          DstTerminal   2
        }
        Connection {
          Type          Signal
          SrcComponent  "From3"
          SrcTerminal   1
          Points        [545, 565]
          DstComponent  "Sum"
          DstTerminal   3
        }
        Connection {
          Type          Signal
          SrcComponent  "From5"
          SrcTerminal   1
          Points        [570, 605]
          Branch {
            Points        [570, 545; 600, 545]
            Branch {
              DstComponent  "Subtract7"
              DstTerminal   3
            }
            Branch {
              DstComponent  "Mux6"
              DstTerminal   3
            }
          }
          Branch {
            DstComponent  "Gain2"
            DstTerminal   1
          }
        }
        Connection {
          Type          Signal
          SrcComponent  "From7"
          SrcTerminal   1
          Points        [570, 625]
          Branch {
            Points        [570, 685; 580, 685]
            Branch {
              DstComponent  "Subtract8"
              DstTerminal   2
            }
            Branch {
              Points        [580, 725]
              DstComponent  "Mux9"
              DstTerminal   3
            }
          }
          Branch {
            DstComponent  "Gain13"
            DstTerminal   1
          }
        }
        Connection {
          Type          Signal
          SrcComponent  "From18"
          SrcTerminal   1
          Points        [910, 510]
          DstComponent  "Sum2"
          DstTerminal   2
        }
        Connection {
          Type          Signal
          SrcComponent  "From19"
          SrcTerminal   1
          Points        [910, 720]
          DstComponent  "Sum17"
          DstTerminal   4
        }
        Connection {
          Type          Signal
          SrcComponent  "Sum2"
          SrcTerminal   1
          DstComponent  "Mux5"
          DstTerminal   2
        }
        Connection {
          Type          Signal
          SrcComponent  "Sum17"
          SrcTerminal   1
          Points        [965, 690; 965, 550]
          DstComponent  "Mux5"
          DstTerminal   3
        }
        Connection {
          Type          Signal
          SrcComponent  "Mux5"
          SrcTerminal   1
          DstComponent  "RRF->3ph"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "From20"
          SrcTerminal   1
          Points        [1030, 570]
          DstComponent  "RRF->3ph"
          DstTerminal   3
        }
        Connection {
          Type          Signal
          SrcComponent  "Sum"
          SrcTerminal   1
          Points        [595, 535]
          Branch {
            DstComponent  "Subtract7"
            DstTerminal   2
          }
          Branch {
            Points        [595, 500]
            DstComponent  "Mux6"
            DstTerminal   2
          }
        }
        Connection {
          Type          Signal
          SrcComponent  "Mux6"
          SrcTerminal   1
          DstComponent  "Scope3"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "Subtract8"
          SrcTerminal   1
          DstComponent  "PR2"
          DstTerminal   2
        }
        Connection {
          Type          Signal
          SrcComponent  "Gain1"
          SrcTerminal   2
          Points        [595, 695]
          Branch {
            DstComponent  "Subtract8"
            DstTerminal   3
          }
          Branch {
            DstComponent  "Mux9"
            DstTerminal   2
          }
        }
        Connection {
          Type          Signal
          SrcComponent  "Mux9"
          SrcTerminal   1
          DstComponent  "Scope6"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "RRF->3ph"
          SrcTerminal   2
          Points        [1095, 550]
          Branch {
            DstComponent  "Goto17"
            DstTerminal   1
          }
          Branch {
            Points        [1095, 605]
            DstComponent  "Scope7"
            DstTerminal   1
          }
        }
        Connection {
          Type          Signal
          SrcComponent  "Subtract7"
          SrcTerminal   1
          DstComponent  "PR1"
          DstTerminal   2
        }
        Connection {
          Type          Signal
          SrcComponent  "Continuous PID\nController2"
          SrcTerminal   2
          Points        [1050, 830]
          Branch {
            DstComponent  "Goto14"
            DstTerminal   1
          }
          Branch {
            Points        [1050, 870]
            DstComponent  "Scope11"
            DstTerminal   1
          }
        }
        Connection {
          Type          Signal
          SrcComponent  "Demux3"
          SrcTerminal   2
          Points        [645, 1000; 645, 990]
          DstComponent  "Goto8"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "Demux3"
          SrcTerminal   3
          DstComponent  "Goto9"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "Demux3"
          SrcTerminal   4
          Points        [645, 1020; 645, 1030]
          DstComponent  "Goto10"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "From17"
          SrcTerminal   1
          DstComponent  "Demux5"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "From21"
          SrcTerminal   1
          DstComponent  "Demux6"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "Demux5"
          SrcTerminal   2
          DstComponent  "Sum9"
          DstTerminal   2
        }
        Connection {
          Type          Signal
          SrcComponent  "Demux6"
          SrcTerminal   2
          Points        [915, 1090]
          DstComponent  "Sum9"
          DstTerminal   3
        }
        Connection {
          Type          Signal
          SrcComponent  "Demux5"
          SrcTerminal   3
          DstComponent  "Sum10"
          DstTerminal   2
        }
        Connection {
          Type          Signal
          SrcComponent  "Demux6"
          SrcTerminal   3
          Points        [955, 1100]
          DstComponent  "Sum10"
          DstTerminal   3
        }
        Connection {
          Type          Signal
          SrcComponent  "Demux5"
          SrcTerminal   4
          DstComponent  "Sum11"
          DstTerminal   2
        }
        Connection {
          Type          Signal
          SrcComponent  "Demux6"
          SrcTerminal   4
          Points        [995, 1110]
          DstComponent  "Sum11"
          DstTerminal   3
        }
        Connection {
          Type          Signal
          SrcComponent  "Sum18"
          SrcTerminal   1
          DstComponent  "Divide"
          DstTerminal   2
        }
        Connection {
          Type          Signal
          SrcComponent  "Sum20"
          SrcTerminal   1
          DstComponent  "Divide5"
          DstTerminal   2
        }
        Connection {
          Type          Signal
          SrcComponent  "Constant2"
          SrcTerminal   1
          Points        [1035, 1170]
          Branch {
            Points        [1100, 1170]
            DstComponent  "Divide"
            DstTerminal   3
          }
          Branch {
            Points        [1035, 1350]
            Branch {
              Points        [1100, 1350]
              DstComponent  "Divide5"
              DstTerminal   3
            }
            Branch {
              Points        [1035, 1535; 1100, 1535]
              DstComponent  "Divide10"
              DstTerminal   3
            }
          }
        }
        Connection {
          Type          Signal
          SrcComponent  "Sum22"
          SrcTerminal   1
          DstComponent  "Divide10"
          DstTerminal   2
        }
        Connection {
          Type          Signal
          SrcComponent  "Gain14"
          SrcTerminal   2
          DstComponent  "Sum24"
          DstTerminal   2
        }
        Connection {
          Type          Signal
          SrcComponent  "Gain15"
          SrcTerminal   2
          DstComponent  "Sum25"
          DstTerminal   2
        }
        Connection {
          Type          Signal
          SrcComponent  "Gain16"
          SrcTerminal   2
          DstComponent  "Sum26"
          DstTerminal   2
        }
        Connection {
          Type          Signal
          SrcComponent  "Divide5"
          SrcTerminal   1
          DstComponent  "Gain15"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "Divide10"
          SrcTerminal   1
          DstComponent  "Gain16"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "Subtract3"
          SrcTerminal   1
          DstComponent  "Continuous PID\nController2"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "Gain13"
          SrcTerminal   2
          Points        [910, 625; 910, 580]
          Branch {
            DstComponent  "Sum2"
            DstTerminal   4
          }
          Branch {
            DstComponent  "Scope8"
            DstTerminal   1
          }
        }
        Connection {
          Type          Signal
          SrcComponent  "Gain2"
          SrcTerminal   2
          Points        [910, 605]
          Branch {
            DstComponent  "Sum17"
            DstTerminal   2
          }
          Branch {
            DstComponent  "Scope8"
            DstTerminal   2
          }
        }
        Connection {
          Type          Signal
          SrcComponent  "ADC"
          SrcTerminal   1
          DstComponent  "Demux7"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "Mux11"
          SrcTerminal   1
          Points        [250, 1175; 250, 155; 490, 155]
          Branch {
            DstComponent  "Three-Phase PLL"
            DstTerminal   1
          }
          Branch {
            Points        [490, 215]
            Branch {
              DstComponent  "3ph->RRF"
              DstTerminal   1
            }
            Branch {
              Points        [490, 220]
              DstComponent  "Scope"
              DstTerminal   2
            }
          }
        }
        Connection {
          Type          Signal
          SrcComponent  "Mux12"
          SrcTerminal   1
          Points        [315, 1205; 315, 285]
          DstComponent  "Demux1"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "Mux13"
          SrcTerminal   1
          Points        [365, 1235; 365, 375; 495, 375]
          Branch {
            DstComponent  "3ph->RRF2"
            DstTerminal   1
          }
          Branch {
            Points        [495, 430]
            DstComponent  "Scope1"
            DstTerminal   1
          }
        }
        Connection {
          Type          Signal
          SrcComponent  "Mux14"
          SrcTerminal   1
          Points        [415, 1265; 415, 1010; 595, 1010]
          Branch {
            DstComponent  "Demux3"
            DstTerminal   1
          }
          Branch {
            DstComponent  "Scope4"
            DstTerminal   1
          }
        }
        Connection {
          Type          Signal
          SrcComponent  "Demux7"
          SrcTerminal   2
          DstComponent  "Mux11"
          DstTerminal   2
        }
        Connection {
          Type          Signal
          SrcComponent  "Demux7"
          SrcTerminal   3
          DstComponent  "Mux11"
          DstTerminal   3
        }
        Connection {
          Type          Signal
          SrcComponent  "Demux7"
          SrcTerminal   4
          DstComponent  "Mux11"
          DstTerminal   4
        }
        Connection {
          Type          Signal
          SrcComponent  "Demux7"
          SrcTerminal   5
          DstComponent  "Mux12"
          DstTerminal   2
        }
        Connection {
          Type          Signal
          SrcComponent  "Demux7"
          SrcTerminal   6
          DstComponent  "Mux12"
          DstTerminal   3
        }
        Connection {
          Type          Signal
          SrcComponent  "Demux7"
          SrcTerminal   7
          DstComponent  "Mux12"
          DstTerminal   4
        }
        Connection {
          Type          Signal
          SrcComponent  "Demux7"
          SrcTerminal   8
          DstComponent  "Mux13"
          DstTerminal   2
        }
        Connection {
          Type          Signal
          SrcComponent  "Demux7"
          SrcTerminal   9
          DstComponent  "Mux13"
          DstTerminal   3
        }
        Connection {
          Type          Signal
          SrcComponent  "Demux7"
          SrcTerminal   10
          DstComponent  "Mux13"
          DstTerminal   4
        }
        Connection {
          Type          Signal
          SrcComponent  "Demux7"
          SrcTerminal   11
          DstComponent  "Mux14"
          DstTerminal   2
        }
        Connection {
          Type          Signal
          SrcComponent  "Demux7"
          SrcTerminal   12
          DstComponent  "Mux14"
          DstTerminal   3
        }
        Connection {
          Type          Signal
          SrcComponent  "Demux7"
          SrcTerminal   13
          DstComponent  "Mux14"
          DstTerminal   4
        }
        Connection {
          Type          Signal
          SrcComponent  "Delay1"
          SrcTerminal   2
          Points        [55, 1385; 55, 1410]
          DstComponent  "Logical\nOperator1"
          DstTerminal   2
        }
        Connection {
          Type          Signal
          SrcComponent  "Logical\nOperator1"
          SrcTerminal   1
          Points        [125, 1410; 125, 1385]
          Branch {
            DstComponent  "LED Blinking"
            DstTerminal   1
          }
          Branch {
            DstComponent  "Delay1"
            DstTerminal   1
          }
        }
        Connection {
          Type          Signal
          SrcComponent  "Load"
          SrcTerminal   1
          DstComponent  "%"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "Divide"
          SrcTerminal   1
          Points        [1160, 1150]
          Branch {
            DstComponent  "Gain14"
            DstTerminal   1
          }
          Branch {
            Points        [1160, 1095]
            DstComponent  "Scope10"
            DstTerminal   1
          }
        }
        Connection {
          Type          Signal
          SrcComponent  "PR1"
          SrcTerminal   1
          Points        [840, 540]
          Branch {
            DstComponent  "Sum2"
            DstTerminal   3
          }
          Branch {
            DstComponent  "Scope9"
            DstTerminal   1
          }
        }
        Connection {
          Type          Signal
          SrcComponent  "PR2"
          SrcTerminal   1
          Points        [840, 690]
          Branch {
            DstComponent  "Sum17"
            DstTerminal   3
          }
          Branch {
            DstComponent  "Scope9"
            DstTerminal   2
          }
        }
        Connection {
          Type          Signal
          SrcComponent  "Sum9"
          SrcTerminal   1
          Points        [985, 1060]
          Branch {
            Points        [1060, 1060]
            DstComponent  "Sum18"
            DstTerminal   2
          }
          Branch {
            Points        [985, 1005]
            DstComponent  "Scope12"
            DstTerminal   1
          }
        }
        Connection {
          Type          Signal
          SrcComponent  "Sum24"
          SrcTerminal   1
          Points        [1315, 1150]
          Branch {
            Points        [1325, 1150; 1325, 1280]
            DstComponent  "Saturation2"
            DstTerminal   1
          }
          Branch {
            Points        [1315, 1095]
            DstComponent  "Scope13"
            DstTerminal   1
          }
        }
        Connection {
          Type          Signal
          SrcComponent  "Sum10"
          SrcTerminal   1
          Points        [1045, 1070; 1045, 1325]
          DstComponent  "Sum20"
          DstTerminal   2
        }
        Connection {
          Type          Signal
          SrcComponent  "Sum11"
          SrcTerminal   1
          Points        [1025, 1080; 1025, 1510]
          DstComponent  "Sum22"
          DstTerminal   2
        }
        Connection {
          Type          Signal
          SrcComponent  "Constant8"
          SrcTerminal   1
          Points        [1245, 1605; 1245, 1540]
          Branch {
            Points        [1245, 1355]
            Branch {
              Points        [1245, 1175]
              DstComponent  "Sum24"
              DstTerminal   3
            }
            Branch {
              DstComponent  "Sum25"
              DstTerminal   3
            }
          }
          Branch {
            DstComponent  "Sum26"
            DstTerminal   3
          }
        }
        Connection {
          Type          Signal
          SrcComponent  "Constant9"
          SrcTerminal   1
          Points        [970, 1275]
          Branch {
            Points        [1085, 1275]
            DstComponent  "Sum18"
            DstTerminal   3
          }
          Branch {
            Points        [970, 1360]
            Branch {
              Points        [1085, 1360]
              DstComponent  "Sum20"
              DstTerminal   3
            }
            Branch {
              Points        [970, 1535]
              DstComponent  "Sum22"
              DstTerminal   3
            }
          }
        }
        Connection {
          Type          Event
          SrcComponent  "Timer"
          SrcTerminal   2
          Points        [135, 1040; 135, 1115; 65, 1115]
          DstComponent  "ADC"
          DstTerminal   3
        }
        Connection {
          Type          Signal
          SrcComponent  "Sum26"
          SrcTerminal   1
          Points        [1325, 1515; 1325, 1380]
          DstComponent  "Saturation"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "Sum25"
          SrcTerminal   1
          DstComponent  "Saturation1"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "Saturation1"
          SrcTerminal   2
          DstComponent  "Gain8"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "Saturation"
          SrcTerminal   2
          DstComponent  "Gain9"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "Gain7"
          SrcTerminal   2
          DstComponent  "Mux2"
          DstTerminal   2
        }
        Connection {
          Type          Signal
          SrcComponent  "Gain8"
          SrcTerminal   2
          DstComponent  "Mux2"
          DstTerminal   3
        }
        Connection {
          Type          Signal
          SrcComponent  "Gain9"
          SrcTerminal   2
          DstComponent  "Mux2"
          DstTerminal   4
        }
        Connection {
          Type          Signal
          SrcComponent  "Mux2"
          SrcTerminal   1
          DstComponent  "Data Type"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "Data Type"
          SrcTerminal   2
          DstComponent  "SPI Controller"
          DstTerminal   2
        }
        Connection {
          Type          Signal
          SrcComponent  "SPI Controller"
          SrcTerminal   3
          Points        [1840, 1290; 1840, 1230]
          DstComponent  "Scope14"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "SPI Controller"
          SrcTerminal   4
          Points        [1905, 1300; 1905, 1230]
          DstComponent  "Scope15"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "Saturation2"
          SrcTerminal   2
          Points        [1480, 1280]
          Branch {
            DstComponent  "Gain7"
            DstTerminal   1
          }
          Branch {
            Points        [1480, 1185]
            DstComponent  "Scope16"
            DstTerminal   1
          }
        }
        Connection {
          Type          Signal
          SrcComponent  "From10"
          SrcTerminal   1
          DstComponent  "Transfer Fcn3"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "From22"
          SrcTerminal   1
          DstComponent  "Transfer Fcn2"
          DstTerminal   1
        }
        RectangleAnnotation {
          Position     [800, 615]
          Width        800
          Height       280
          CornerRadius 3
          Thickness    2
          PenColor     4278190080
          PenAlpha     1
          BrushColor   0
          BrushAlpha   0
        } 
        RectangleAnnotation {
          Position     [800, 855]
          Width        800
          Height       200
          CornerRadius 3
          Thickness    2
          PenColor     4278190080
          PenAlpha     1
          BrushColor   0
          BrushAlpha   0
        } 
        RectangleAnnotation {
          Position     [1585, 715]
          Width        740
          Height       480
          CornerRadius 3
          Thickness    2
          PenColor     4278190080
          PenAlpha     1
          BrushColor   0
          BrushAlpha   0
        } 
        RectangleAnnotation {
          Position     [800, 285]
          Width        800
          Height       380
          CornerRadius 3
          Thickness    2
          PenColor     4278190080
          PenAlpha     1
          BrushColor   0
          BrushAlpha   0
        } 
        RectangleAnnotation {
          Position     [1385, 1310]
          Width        1250
          Height       670
          CornerRadius 3
          Thickness    2
          PenColor     4278190335
          PenAlpha     1
          BrushColor   0
          BrushAlpha   0
        } 
      }
    }
    Component {
      Type          Subsystem
      Name          "Sub"
      Show          on
      Position      [420, 410]
      Direction     up
      Flipped       off
      LabelPosition none
      Frame         [-100, -70; 100, 70]
      TreatAsAtomicUnit on
      SampleTime    "-1"
      TaskingMode "1"
      CodeGenEnable on
      CodeGenSampleTime "5e-6"
      CodeGenDiscretizationMethod "2"
      CodeGenTarget "PLECS RT Box 3"
      CodeGenTargetSettings "AAAAfwAAAAAbQ29kZUdlblRhcmdldDo6U2V0dGluZ3NNYXAAA"
"AAAAQAAABwAUABMAEUAQwBTACAAUgBUACAAQgBvAHgAIAAzAAAALAAAABoARQBYAFQARQBSAE4AQQ"
"BMAF8ATQBPAEQARQAAAAIAMQAAABoAVABBAFIARwBFAFQAXwBEAEUAVgBJAEMARQAAADAAcgB0AGI"
"AbwB4AC0AMgAwAGIAMABmADcAMAA4AGQAYwA3AGMALgBsAG8AYwBhAGwAAABKAFUAUwBFAF8ARABB"
"AFQAQQBfAFQAWQBQAEUAUwBfAEYATwBSAF8AVABVAE4AQQBCAEwARQBfAFAAQQBSAEEATQBFAFQAR"
"QBSAFMAAAACADEAAAA6AFUAUwBFAF8ARQBYAFQARQBSAE4AXwBNAE8ARABFAEwAXwBEAEEAVABBAF"
"8AUwBUAFIAVQBDAFQAUwAAAAIAMAAAACAAYQBuAGEAbABvAGcASQBuAHAAdQB0AFIAYQBuAGcAZQA"
"AAAIAMQAAACIAYQBuAGEAbABvAGcATwB1AHQAcAB1AHQAUgBhAG4AZwBlAAAAAgAxAAAAHABhAG4A"
"YQBsAG8AZwBTAGEAbQBwAGwAaQBuAGcAAAACADEAAAAQAGMAYQBuADEAQgBhAHUAZAAAAAwANQAwA"
"DAAMAAwADAAAAAUAGMAYQBuADEARQBuAGEAYgBsAGUAAAACADAAAAAiAGMAYQBuADEAUgBlAGMAbw"
"B2AGUAcgB5AEQAZQBsAGEAeQAAAAIAMAAAAB4AYwBhAG4AMQBUAGUAcgBtAGkAbgBhAHQAaQBvAG4"
"AAAACADIAAAAQAGMAYQBuADEAVAB4AFIAeAAAAAIAMQAAABAAYwBhAG4AMgBCAGEAdQBkAAAADAA1"
"ADAAMAAwADAAMAAAABQAYwBhAG4AMgBFAG4AYQBiAGwAZQAAAAIAMAAAACIAYwBhAG4AMgBSAGUAY"
"wBvAHYAZQByAHkARABlAGwAYQB5AAAAAgAwAAAAHgBjAGEAbgAyAFQAZQByAG0AaQBuAGEAdABpAG"
"8AbgAAAAIAMgAAABAAYwBhAG4AMgBUAHgAUgB4AAAAAgAxAAAAJABkAGkAZwBpAHQAYQBsAE8AdQB"
"0AHAAdQB0AEwAZQB2AGUAbAAAAAIAMQAAABIAZQBuAGEAYgBsAGUAWABDAFAAAAACADAAAAAwAGgA"
"YQBzAEgAYQByAGQAdwBhAHIAZQBQAHIAZQBwAHIAbwBjAGUAcwBzAGkAbgBnAAAAAgAxAAAAKgBoA"
"GEAcwBIAGEAcgBkAHcAYQByAGUAUwBpAG0AdQBsAGEAdABpAG8AbgAAAAIAMQAAACIAaABhAHMATg"
"BhAG4AbwBzAHQAZQBwAFMAbwBsAHYAZQByAAAAAgAxAAAAEgBtAGEAcwB0AGUAcgBTAEYAUAAAAAI"
"AMQAAABgAbQBhAHgAXwBvAHYAZQByAHIAdQBuAHMAAAACADUAAAAgAG4AYQBuAG8AUwB0AGUAcABC"
"AGkAdABXAGkAZAB0AGgAAAAEADIANgAAABIAbgBhAG4AbwBTAHQAZQBwAFAAAAAEADEAMQAAABgAb"
"gBhAG4AbwBTAHQAZQBwAFMAaQB6AGUAAAAIADQAZQAtADkAAAAeAG4AYQBuAG8AUwB0AGUAcABWAG"
"UAcgBzAGkAbwBuAAAAAAAAAC4AbgBhAG4AbwBzAHQAZQBwAEQAUwB1AGIATwB1AHQAcAB1AHQAUgB"
"hAG4AZwBlAAAAAgAxAAAAGABuAHUAbQBEAGkAZwBpAHQAYQBsAEkAbgAAAAQANgA0AAAAGABwAHcA"
"bQBDAGwAawBQAGUAcgBpAG8AZAAAAA4AMQAvADEANQAwAGUANgAAABoAcwBhAG0AcABsAGkAbgBnA"
"EQAZQBsAGEAeQAAAAIAMAAAABwAcwBpAG0AdQBsAGEAdABpAG8AbgBNAG8AZABlAAAAAgAxAAAAGA"
"BzAHQAYQByAHQAdQBwAFMARgBQAF8AQQAAAAIAMAAAABgAcwB0AGEAcgB0AHUAcABTAEYAUABfAEI"
"AAAACADAAAAAYAHMAdABhAHIAdAB1AHAAUwBGAFAAXwBDAAAAAgAwAAAAGABzAHQAYQByAHQAdQBw"
"AFMARgBQAF8ARAAAAAIAMAAAABgAcwB0AGEAcgB0AHUAcABTAEYAUABfAEUAAAACADAAAAAYAHMAd"
"ABhAHIAdAB1AHAAUwBGAFAAXwBGAAAAAgAwAAAAGABzAHQAYQByAHQAdQBwAFMARgBQAF8ARwAAAA"
"IAMAAAABgAcwB0AGEAcgB0AHUAcABTAEYAUABfAEgAAAACADAAAAAeAHMAeQBuAGMAaAByAG8AbgB"
"pAHoAZQBUAGkAbQBlAAAAAgAwAAAAEAB4AGMAcABTAGwAYQB2AGUAAAAAAAAAIAB4AGMAcABTAGwA"
"YQB2AGUASQBkAGUAbgB0AGkAdAB5AAAAAgAx"
      CodeGenFloatingPointFormat "1"
      ExternalModeSettings "AAAAfwAAAAAYQ29kZUdlblRhcmdldDo6U2V0dGluZ3MAAAAABw"
"AAABQARABlAGMAaQBtAGEAdABpAG8AbgAAAAIAMQAAABQATgB1AG0AUwBhAG0AcABsAGUAcwAAAAo"
"AOAAxADkAMgAwAAAAFgBSAGUAZgByAGUAcwBoAFIAYQB0AGUAAAAEADIAMAAAABYAUwBlAG4AcwBp"
"AHQAaQB2AGkAdAB5AAAAAgAwAAAAHABUAHIAaQBnAGcAZQByAEMAaABhAG4AbgBlAGwAAAAEAC0AM"
"QAAABgAVAByAGkAZwBnAGUAcgBEAGUAbABhAHkAAAACADAAAAAYAFQAcgBpAGcAZwBlAHIAVgBhAG"
"wAdQBlAAAAAgAw"
      MaskDisplayLang "2"
      MaskIconFrame on
      MaskIconOpaque off
      MaskIconRotates on
      Terminal {
        Type          Output
        Position      [104, -25]
        Direction     right
        Index         "10"
      }
      Terminal {
        Type          Input
        Position      [-100, -45]
        Direction     left
        Index         "6"
      }
      Terminal {
        Type          Output
        Position      [104, 5]
        Direction     right
        Index         "9"
      }
      Terminal {
        Type          Input
        Position      [-100, -35]
        Direction     left
        Index         "5"
      }
      Terminal {
        Type          Input
        Position      [-100, -15]
        Direction     left
        Index         "4"
      }
      Terminal {
        Type          Input
        Position      [-100, -5]
        Direction     left
        Index         "3"
      }
      Terminal {
        Type          Output
        Position      [104, 15]
        Direction     right
        Index         "8"
      }
      Terminal {
        Type          Output
        Position      [104, 25]
        Direction     right
        Index         "7"
      }
      Terminal {
        Type          Output
        Position      [104, 35]
        Direction     right
        Index         "6"
      }
      Terminal {
        Type          Input
        Position      [-100, 5]
        Direction     left
        Index         "2"
      }
      Terminal {
        Type          Output
        Position      [104, -15]
        Direction     right
        Index         "5"
      }
      Terminal {
        Type          Output
        Position      [104, -65]
        Direction     right
        Index         "4"
      }
      Terminal {
        Type          Output
        Position      [104, -55]
        Direction     right
        Index         "3"
      }
      Terminal {
        Type          Output
        Position      [104, -45]
        Direction     right
        Index         "2"
      }
      Terminal {
        Type          Output
        Position      [104, -5]
        Direction     right
        Index         "1"
      }
      Terminal {
        Type          Input
        Position      [-100, -55]
        Direction     left
        Index         "1"
      }
      Schematic {
        Location      [0, 24; 1602, 961]
        ZoomFactor    1.49862
        SliderPosition [2984, 1032]
        ShowBrowser   off
        BrowserWidth  100
        Component {
          Type          ThreePhaseVoltageSource
          Name          "V_3ph"
          Show          on
          Position      [1835, 415]
          Direction     up
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "V"
            Value         "35000*sqrt(2)/sqrt(3)"
            Show          off
          }
          Parameter {
            Variable      "w"
            Value         "50"
            Show          off
          }
          Parameter {
            Variable      "phi"
            Value         "0"
            Show          off
          }
          Parameter {
            Variable      "neutral"
            Value         "1"
            Show          off
          }
        }
        Component {
          Type          ThreePhaseMeter
          Name          "3ph Meter"
          Show          off
          Position      [2090, 415]
          Direction     up
          Flipped       off
          LabelPosition southSoutheast
          Parameter {
            Variable      "voltage"
            Value         "2"
            Show          off
          }
        }
        Component {
          Type          Scope
          Name          base64 "55S15Y6L"
          Show          on
          Position      [2140, 245]
          Direction     up
          Flipped       off
          LabelPosition south
          Frame         [-15, -15; 15, 15]
          Location      [0, 24; 1536, 897]
          State         "AAAA/wAAAAD9AAAAAgAAAAEAAAAAAAAAAPwCAAAAA/sAAAAQAFoAb"
"wBvAG0AQQByAGUAYQAAAAAA/////wAAAC8A////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwAAAA"
"AA/////wAAAGEA////+wAAAAwAVAByAGEAYwBlAHMAAAAAAP////8AAABhAP///wAAAAMAAAYAAAA"
"AffwBAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQBAAAAAAAABgAAAABEAP///wAABgAAAALH"
"AAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP////8AA"
"AAAAAAAAA=="
          SavedViews    "AAAAAgAAAAA="
          HeaderState   "{\"DefaultSecSize\":0,\"FirstSecSize\":228,\"Labels\""
":[\"Delta\"],\"VisualIdxs\":[3]}"
          PlotPalettes  "AAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
          Axes          "1"
          TimeRange     "0.0"
          ScrollingMode "1"
          SingleTimeAxis "1"
          Open          "0"
          Ts            "-1"
          SampleLimit   "25000"
          XAxisLabel    "Time / s"
          ShowLegend    "2"
          Axis {
            Name          ""
            AutoScale     1
            MinValue      0
            MaxValue      1
            Signals       {}
            SignalTypes   [ ]
            Untangle      0
            KeepBaseline  off
            BaselineValue 0
          }
          Fourier {
            SingleXAxis       on
            AxisLabel         "Frequency / Hz"
            Scaling           0
            PhaseDisplay      0
            ShowFourierLegend off
            Axis {
              Name          ""
              AutoScale     1
              MinValue      0
              MaxValue      1
              Signals       {}
              Untangle      0
              KeepBaseline  off
              BaselineValue 0
            }
          }
        }
        Component {
          Type          Scope
          Name          base64 "55S15rWB"
          Show          on
          Position      [2140, 295]
          Direction     up
          Flipped       off
          LabelPosition south
          Frame         [-15, -15; 15, 15]
          Location      [0, 24; 1536, 847]
          State         "AAAA/wAAAAD9AAAAAgAAAAEAAAAAAAAAAPwCAAAAA/sAAAAQAFoAb"
"wBvAG0AQQByAGUAYQAAAAAA/////wAAAC8A////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwAAAA"
"AA/////wAAAGEA////+wAAAAwAVAByAGEAYwBlAHMAAAAAAP////8AAABhAP///wAAAAMAAAAAAAA"
"AAPwBAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQAAAAAAP////8AAABEAP///wAABgAAAAMY"
"AAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP////8AA"
"AAAAAAAAA=="
          SavedViews    "AAAAAgAAAAA="
          HeaderState   "{\"DefaultSecSize\":0,\"FirstSecSize\":227,\"Labels\""
":[],\"VisualIdxs\":[]}"
          PlotPalettes  "AAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
          Axes          "1"
          TimeRange     "0.0"
          ScrollingMode "1"
          SingleTimeAxis "1"
          Open          "0"
          Ts            "-1"
          SampleLimit   "25000"
          XAxisLabel    "Time / s"
          ShowLegend    "1"
          Axis {
            Name          ""
            AutoScale     1
            MinValue      0
            MaxValue      1
            Signals       {}
            SignalTypes   [ ]
            Untangle      0
            KeepBaseline  off
            BaselineValue 0
          }
          Fourier {
            SingleXAxis       on
            AxisLabel         "Frequency / Hz"
            Scaling           0
            PhaseDisplay      0
            ShowFourierLegend off
            Axis {
              Name          ""
              AutoScale     1
              MinValue      0
              MaxValue      1
              Signals       {}
              Untangle      0
              KeepBaseline  off
              BaselineValue 0
            }
          }
        }
        Component {
          Type          Resistor
          Name          "R4"
          Show          on
          Position      [1905, 400]
          Direction     left
          Flipped       on
          LabelPosition north
          Parameter {
            Variable      "R"
            Value         "1e-3"
            Show          off
          }
        }
        Component {
          Type          Resistor
          Name          "R5"
          Show          on
          Position      [1905, 415]
          Direction     left
          Flipped       on
          LabelPosition north
          Parameter {
            Variable      "R"
            Value         "1e-3"
            Show          off
          }
        }
        Component {
          Type          Resistor
          Name          "R6"
          Show          on
          Position      [1905, 430]
          Direction     left
          Flipped       on
          LabelPosition north
          Parameter {
            Variable      "R"
            Value         "1e-3"
            Show          off
          }
        }
        Component {
          Type          ThreePhaseMeter
          Name          "3ph Meter1"
          Show          off
          Position      [2060, 555]
          Direction     right
          Flipped       off
          LabelPosition westSouthwest
          Parameter {
            Variable      "voltage"
            Value         "2"
            Show          off
          }
        }
        Component {
          Type          Scope
          Name          base64 "U1ZH55S15rWB"
          Show          on
          Position      [2210, 560]
          Direction     up
          Flipped       off
          LabelPosition south
          Frame         [-15, -15; 15, 15]
          Location      [0, 30; 1536, 853]
          State         "AAAA/wAAAAD9AAAAAgAAAAEAAAAAAAAAAPwCAAAAA/sAAAAQAFoAb"
"wBvAG0AQQByAGUAYQAAAAAA/////wAAAC8A////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwAAAA"
"AA/////wAAAGEA////+wAAAAwAVAByAGEAYwBlAHMAAAAAAP////8AAABhAP///wAAAAMAAAAAAAA"
"AAPwBAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQAAAAAAP////8AAABEAP///wAABgAAAAMY"
"AAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP////8AA"
"AAAAAAAAA=="
          SavedViews    "AAAAAgAAAAA="
          HeaderState   "{\"DefaultSecSize\":0,\"FirstSecSize\":233,\"Labels\""
":[],\"VisualIdxs\":[]}"
          PlotPalettes  "AAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
          Axes          "1"
          TimeRange     "0.0"
          ScrollingMode "1"
          SingleTimeAxis "1"
          Open          "0"
          Ts            "-1"
          SampleLimit   "25000"
          XAxisLabel    "Time / s"
          ShowLegend    "1"
          Axis {
            Name          ""
            AutoScale     1
            MinValue      0
            MaxValue      1
            Signals       {}
            SignalTypes   [ ]
            Untangle      0
            KeepBaseline  off
            BaselineValue 0
          }
          Fourier {
            SingleXAxis       on
            AxisLabel         "Frequency / Hz"
            Scaling           0
            PhaseDisplay      0
            ShowFourierLegend off
            Axis {
              Name          ""
              AutoScale     1
              MinValue      0
              MaxValue      1
              Signals       {}
              Untangle      0
              KeepBaseline  off
              BaselineValue 0
            }
          }
        }
        Component {
          Type          ThreePhaseMeter
          Name          "3ph Meter2"
          Show          off
          Position      [1975, 415]
          Direction     up
          Flipped       off
          LabelPosition southSoutheast
          Parameter {
            Variable      "voltage"
            Value         "1"
            Show          off
          }
        }
        Component {
          Type          Ground
          Name          "Ground8"
          Show          off
          Position      [1975, 445]
          Direction     up
          Flipped       off
          LabelPosition east
        }
        Component {
          Type          Scope
          Name          base64 "5a+55q+U"
          Show          on
          Position      [2015, 355]
          Direction     up
          Flipped       off
          LabelPosition south
          Frame         [-15, -15; 15, 15]
          Location      [0, 24; 1539, 847]
          State         "AAAA/wAAAAD9AAAAAgAAAAAAAABRAAADGPwCAAAAAfsAAAAUAEQAY"
"QB0AGEAVwBpAGQAZwBlAHQBAAAAMwAAAxgAAABVAP///wAAAAEAAAAAAAAAAPwCAAAAA/sAAAAQAF"
"oAbwBvAG0AQQByAGUAYQAAAAAA/////wAAAFcA////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwA"
"AAAAA/////wAAAGEA////+wAAAAwAVAByAGEAYwBlAHMAAAAAAP////8AAABhAP///wAABawAAAMY"
"AAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP////8AA"
"AAAAAAAAA=="
          SavedViews    "AAAAAgAAAAA="
          HeaderState   "{\"DefaultSecSize\":0,\"FirstSecSize\":232,\"Labels\""
":[\"Delta\"],\"VisualIdxs\":[3]}"
          PlotPalettes  "AAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="
          Axes          "2"
          TimeRange     "0"
          ScrollingMode "1"
          SingleTimeAxis "1"
          Open          "0"
          Ts            "20e-6"
          SampleLimit   "0"
          XAxisLabel    "Time / s"
          ShowLegend    "1"
          Axis {
            Name          ""
            AutoScale     1
            MinValue      0
            MaxValue      1
            Signals       {}
            SignalTypes   [ ]
            Untangle      0
            KeepBaseline  off
            BaselineValue 0
          }
          Axis {
            Name          ""
            AutoScale     1
            MinValue      0
            MaxValue      1
            Signals       {}
            SignalTypes   [ ]
            Untangle      0
            KeepBaseline  off
            BaselineValue 0
          }
          Fourier {
            SingleXAxis       on
            AxisLabel         "Frequency / Hz"
            Scaling           0
            PhaseDisplay      0
            ShowFourierLegend off
            Axis {
              Name          ""
              AutoScale     1
              MinValue      0
              MaxValue      1
              Signals       {}
              Untangle      0
              KeepBaseline  off
              BaselineValue 0
            }
            Axis {
              Name          ""
              AutoScale     1
              MinValue      0
              MaxValue      1
              Signals       {}
              Untangle      0
              KeepBaseline  off
              BaselineValue 0
            }
          }
        }
        Component {
          Type          Inductor
          Name          "L4"
          Show          on
          Position      [2050, 750]
          Direction     down
          Flipped       off
          LabelPosition west
          Parameter {
            Variable      "L"
            Value         "0.02"
            Show          off
          }
          Parameter {
            Variable      "i_init"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Inductor
          Name          "L5"
          Show          on
          Position      [2135, 750]
          Direction     down
          Flipped       off
          LabelPosition west
          Parameter {
            Variable      "L"
            Value         "0.02"
            Show          off
          }
          Parameter {
            Variable      "i_init"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Inductor
          Name          "L6"
          Show          on
          Position      [2220, 750]
          Direction     down
          Flipped       off
          LabelPosition west
          Parameter {
            Variable      "L"
            Value         "0.02"
            Show          off
          }
          Parameter {
            Variable      "i_init"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Ammeter
          Name          "Am1"
          Show          on
          Position      [2050, 705]
          Direction     up
          Flipped       off
          LabelPosition west
        }
        Component {
          Type          Ammeter
          Name          "Am2"
          Show          on
          Position      [2135, 705]
          Direction     up
          Flipped       off
          LabelPosition west
        }
        Component {
          Type          Ammeter
          Name          "Am3"
          Show          on
          Position      [2220, 705]
          Direction     up
          Flipped       off
          LabelPosition west
        }
        Component {
          Type          SignalMux
          Name          "Mux"
          Show          off
          Position      [2380, 825]
          Direction     right
          Flipped       off
          LabelPosition south
          Frame         [-2, -15; 7, 15]
          Parameter {
            Variable      "Width"
            Value         "3"
            Show          off
          }
        }
        Component {
          Type          SignalMux
          Name          "Mux1"
          Show          off
          Position      [2380, 865]
          Direction     right
          Flipped       off
          LabelPosition south
          Frame         [-2, -15; 7, 15]
          Parameter {
            Variable      "Width"
            Value         "3"
            Show          off
          }
        }
        Component {
          Type          Voltmeter
          Name          "Vm1"
          Show          on
          Position      [2115, 835]
          Direction     up
          Flipped       off
          LabelPosition west
        }
        Component {
          Type          Voltmeter
          Name          "Vm2"
          Show          on
          Position      [2200, 970]
          Direction     up
          Flipped       off
          LabelPosition west
        }
        Component {
          Type          Voltmeter
          Name          "Vm3"
          Show          on
          Position      [2030, 1150]
          Direction     up
          Flipped       off
          LabelPosition west
        }
        Component {
          Type          Scope
          Name          "Scope"
          Show          on
          Position      [2450, 860]
          Direction     up
          Flipped       off
          LabelPosition south
          Frame         [-15, -15; 15, 15]
          Location      [0, 24; 1920, 1013]
          State         "AAAA/wAAAAD9AAAAAQAAAAEAAAC7AAADvvwCAAAABPsAAAAUAEQAY"
"QB0AGEAVwBpAGQAZwBlAHQBAAAAMwAAA74AAABVAP////sAAAAQAFoAbwBvAG0AQQByAGUAYQAAAA"
"AA/////wAAAFcA////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwAAAAAA/////wAAAGEA////+wA"
"AAAwAVAByAGEAYwBlAHMAAAAAAP////8AAABhAP///wAABr8AAAO+AAAABAAAAAQAAAAIAAAACPwA"
"AAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP////8AAAAAAAAAAA=="
          SavedViews    "AAAAAgAAAAA="
          HeaderState   "{\"DefaultSecSize\":0,\"FirstSecSize\":187,\"Labels\""
":[],\"VisualIdxs\":[]}"
          PlotPalettes  "AAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="
          Axes          "2"
          TimeRange     "0"
          ScrollingMode "1"
          SingleTimeAxis "1"
          Open          "0"
          Ts            "-1"
          SampleLimit   "25000"
          XAxisLabel    "Time / s"
          ShowLegend    "1"
          Axis {
            Name          ""
            AutoScale     1
            MinValue      0
            MaxValue      1
            Signals       {}
            SignalTypes   [ ]
            Untangle      0
            KeepBaseline  off
            BaselineValue 0
          }
          Axis {
            Name          ""
            AutoScale     1
            MinValue      0
            MaxValue      1
            Signals       {}
            SignalTypes   [ ]
            Untangle      0
            KeepBaseline  off
            BaselineValue 0
          }
          Fourier {
            SingleXAxis       on
            AxisLabel         "Frequency / Hz"
            Scaling           0
            PhaseDisplay      0
            ShowFourierLegend off
            Axis {
              Name          ""
              AutoScale     1
              MinValue      0
              MaxValue      1
              Signals       {}
              Untangle      0
              KeepBaseline  off
              BaselineValue 0
            }
            Axis {
              Name          ""
              AutoScale     1
              MinValue      0
              MaxValue      1
              Signals       {}
              Untangle      0
              KeepBaseline  off
              BaselineValue 0
            }
          }
        }
        Component {
          Type          Reference
          SrcComponent  "Components/Electrical/Power Modules/MFB1"
          Name          "MFB1"
          Show          on
          Position      [1885, 860]
          Direction     up
          Flipped       off
          LabelPosition west
          Frame         [-60, -60; 60, 60]
          Parameter {
            Variable      "semiSymbol"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "N"
            Value         "4"
            Show          off
          }
          Parameter {
            Variable      "assert"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "switchModel"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
          Parameter {
            Variable      "combineRevDiode"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "thermalIgbtDiode"
            Value         ""
            Show          off
          }
          Parameter {
            Variable      "thermalIgbt"
            Value         ""
            Show          off
          }
          Parameter {
            Variable      "thermalMosfetDiode"
            Value         ""
            Show          off
          }
          Parameter {
            Variable      "thermalMosfet"
            Value         ""
            Show          off
          }
          Parameter {
            Variable      "thermalRevDiode"
            Value         ""
            Show          off
          }
          Parameter {
            Variable      "Configuration"
            Value         "2"
            Show          off
          }
          Terminal {
            Type          Input
            Position      [-60, -30]
            Direction     left
          }
          Terminal {
            Type          Port
            Position      [65, -5]
            Direction     right
          }
          Terminal {
            Type          Port
            Position      [65, 5]
            Direction     right
          }
          Terminal {
            Type          Port
            Position      [-65, -55]
            Direction     left
          }
          Terminal {
            Type          Input
            Position      [-60, 30]
            Direction     left
          }
          Terminal {
            Type          Port
            Position      [-65, 55]
            Direction     left
          }
          Terminal {
            Type          Input
            Position      [20, -30]
            Direction     left
          }
          Terminal {
            Type          Input
            Position      [20, 30]
            Direction     left
          }
        }
        Component {
          Type          Capacitor
          Name          "C1"
          Show          on
          Position      [1760, 860]
          Direction     down
          Flipped       on
          LabelPosition west
          Parameter {
            Variable      "C"
            Value         "1000e-6"
            Show          off
          }
          Parameter {
            Variable      "v_init"
            Value         "Vdc"
            Show          off
          }
        }
        Component {
          Type          Voltmeter
          Name          "Vmab"
          Show          on
          Position      [1490, 860]
          Direction     down
          Flipped       on
          LabelPosition east
        }
        Component {
          Type          Reference
          SrcComponent  "Components/Electrical/Power Modules/MFB1"
          Name          "MFB2"
          Show          on
          Position      [1885, 990]
          Direction     up
          Flipped       off
          LabelPosition west
          Frame         [-60, -60; 60, 60]
          Parameter {
            Variable      "semiSymbol"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "N"
            Value         "4"
            Show          off
          }
          Parameter {
            Variable      "assert"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "switchModel"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
          Parameter {
            Variable      "combineRevDiode"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "thermalIgbtDiode"
            Value         ""
            Show          off
          }
          Parameter {
            Variable      "thermalIgbt"
            Value         ""
            Show          off
          }
          Parameter {
            Variable      "thermalMosfetDiode"
            Value         ""
            Show          off
          }
          Parameter {
            Variable      "thermalMosfet"
            Value         ""
            Show          off
          }
          Parameter {
            Variable      "thermalRevDiode"
            Value         ""
            Show          off
          }
          Parameter {
            Variable      "Configuration"
            Value         "2"
            Show          off
          }
          Terminal {
            Type          Input
            Position      [-60, -30]
            Direction     left
          }
          Terminal {
            Type          Port
            Position      [65, -5]
            Direction     right
          }
          Terminal {
            Type          Port
            Position      [65, 5]
            Direction     right
          }
          Terminal {
            Type          Port
            Position      [-65, -55]
            Direction     left
          }
          Terminal {
            Type          Input
            Position      [-60, 30]
            Direction     left
          }
          Terminal {
            Type          Port
            Position      [-65, 55]
            Direction     left
          }
          Terminal {
            Type          Input
            Position      [20, -30]
            Direction     left
          }
          Terminal {
            Type          Input
            Position      [20, 30]
            Direction     left
          }
        }
        Component {
          Type          Capacitor
          Name          "C2"
          Show          on
          Position      [1760, 990]
          Direction     down
          Flipped       on
          LabelPosition west
          Parameter {
            Variable      "C"
            Value         "1000e-6"
            Show          off
          }
          Parameter {
            Variable      "v_init"
            Value         "Vdc"
            Show          off
          }
        }
        Component {
          Type          Voltmeter
          Name          "Vmbc"
          Show          on
          Position      [1490, 990]
          Direction     down
          Flipped       on
          LabelPosition east
        }
        Component {
          Type          Capacitor
          Name          "C3"
          Show          on
          Position      [1760, 1120]
          Direction     down
          Flipped       on
          LabelPosition west
          Parameter {
            Variable      "C"
            Value         "1000e-6"
            Show          off
          }
          Parameter {
            Variable      "v_init"
            Value         "Vdc"
            Show          off
          }
        }
        Component {
          Type          Voltmeter
          Name          "Vmca"
          Show          on
          Position      [1490, 1120]
          Direction     down
          Flipped       on
          LabelPosition east
        }
        Component {
          Type          Goto
          Name          "Goto1"
          Show          off
          Position      [1445, 860]
          Direction     right
          Flipped       on
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "Vab"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Goto
          Name          "Goto2"
          Show          off
          Position      [1445, 990]
          Direction     right
          Flipped       on
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "Vbc"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Goto
          Name          "Goto3"
          Show          off
          Position      [1445, 1120]
          Direction     right
          Flipped       on
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "Vca"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          From
          Name          "From17"
          Show          off
          Position      [2640, 795]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "Vab"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Sum
          Name          "Sum9"
          Show          off
          Position      [2755, 850]
          Direction     up
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "IconShape"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "Inputs"
            Value         "++++"
            Show          off
          }
          Parameter {
            Variable      "DataType"
            Value         "11"
            Show          off
          }
          Parameter {
            Variable      "DataTypeOverflowMode"
            Value         "1"
            Show          off
          }
        }
        Component {
          Type          Sum
          Name          "Sum10"
          Show          off
          Position      [2755, 990]
          Direction     up
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "IconShape"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "Inputs"
            Value         "++++"
            Show          off
          }
          Parameter {
            Variable      "DataType"
            Value         "11"
            Show          off
          }
          Parameter {
            Variable      "DataTypeOverflowMode"
            Value         "1"
            Show          off
          }
        }
        Component {
          Type          Sum
          Name          "Sum11"
          Show          off
          Position      [2755, 1135]
          Direction     up
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "IconShape"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "Inputs"
            Value         "++++"
            Show          off
          }
          Parameter {
            Variable      "DataType"
            Value         "11"
            Show          off
          }
          Parameter {
            Variable      "DataTypeOverflowMode"
            Value         "1"
            Show          off
          }
        }
        Component {
          Type          Scope
          Name          "Scope4"
          Show          on
          Position      [3030, 980]
          Direction     up
          Flipped       off
          LabelPosition south
          Frame         [-15, -15; 15, 15]
          Location      [7, 30; 1543, 871]
          State         "AAAA/wAAAAD9AAAAAgAAAAEAAAAAAAAAAPwCAAAAA/sAAAAQAFoAb"
"wBvAG0AQQByAGUAYQAAAAAA/////wAAAC8A////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwAAAA"
"AA/////wAAAGEA////+wAAAAwAVAByAGEAYwBlAHMAAAAAAP////8AAABhAP///wAAAAMAAAAAAAA"
"AAPwBAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQAAAAAAP////8AAABEAP///wAABgAAAAMq"
"AAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP////8AA"
"AAAAAAAAA=="
          SavedViews    "AAAAAgAAAAA="
          HeaderState   "{\"DefaultSecSize\":0,\"FirstSecSize\":156,\"Labels\""
":[],\"VisualIdxs\":[]}"
          PlotPalettes  "AAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
          Axes          "1"
          TimeRange     "0"
          ScrollingMode "1"
          SingleTimeAxis "1"
          Open          "0"
          Ts            "-1"
          SampleLimit   "25000"
          XAxisLabel    "Time / s"
          ShowLegend    "1"
          Axis {
            Name          base64 "U1ZH55u05rWB5L6n5LiJ55u455S15a6555S15Y6L"
            AutoScale     1
            MinValue      0
            MaxValue      1
            Signals       {}
            SignalTypes   [ ]
            Untangle      0
            KeepBaseline  off
            BaselineValue 0
          }
          Fourier {
            SingleXAxis       on
            AxisLabel         "Frequency / Hz"
            Scaling           0
            PhaseDisplay      0
            ShowFourierLegend off
            Axis {
              Name          ""
              AutoScale     1
              MinValue      0
              MaxValue      1
              Signals       {}
              Untangle      0
              KeepBaseline  off
              BaselineValue 0
            }
          }
        }
        Component {
          Type          SignalMux
          Name          "Mux8"
          Show          off
          Position      [2870, 980]
          Direction     right
          Flipped       off
          LabelPosition south
          Frame         [-2, -15; 7, 15]
          Parameter {
            Variable      "Width"
            Value         "3"
            Show          off
          }
        }
        Component {
          Type          SignalDemux
          Name          "Demux3"
          Show          off
          Position      [2695, 780]
          Direction     right
          Flipped       on
          LabelPosition south
          Frame         [-7, -35; 2, 35]
          Parameter {
            Variable      "Width"
            Value         "4"
            Show          off
          }
        }
        Component {
          Type          Goto
          Name          "Goto18"
          Show          off
          Position      [2745, 750]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "Vab1"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Goto
          Name          "Goto19"
          Show          off
          Position      [2745, 770]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "Vab2"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          From
          Name          "From21"
          Show          off
          Position      [2655, 920]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "Vbc"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          SignalDemux
          Name          "Demux5"
          Show          off
          Position      [2695, 920]
          Direction     right
          Flipped       on
          LabelPosition south
          Frame         [-7, -35; 2, 35]
          Parameter {
            Variable      "Width"
            Value         "4"
            Show          off
          }
        }
        Component {
          Type          Goto
          Name          "Goto23"
          Show          off
          Position      [2745, 890]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "Vbc1"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Goto
          Name          "Goto24"
          Show          off
          Position      [2745, 910]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "Vbc2"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          From
          Name          "From22"
          Show          off
          Position      [2655, 1065]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "Vca"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          SignalDemux
          Name          "Demux6"
          Show          off
          Position      [2695, 1065]
          Direction     right
          Flipped       on
          LabelPosition south
          Frame         [-7, -35; 2, 35]
          Parameter {
            Variable      "Width"
            Value         "4"
            Show          off
          }
        }
        Component {
          Type          Goto
          Name          "Goto28"
          Show          off
          Position      [2745, 1035]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "Vca1"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Goto
          Name          "Goto29"
          Show          off
          Position      [2745, 1055]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "Vca2"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Scope
          Name          "Scope1"
          Show          on
          Position      [1505, 715]
          Direction     up
          Flipped       off
          LabelPosition south
          Frame         [-15, -15; 15, 15]
          Location      [0, 30; 1536, 829]
          State         "AAAA/wAAAAD9AAAAAgAAAAEAAAAAAAAAAPwCAAAAA/sAAAAQAFoAb"
"wBvAG0AQQByAGUAYQAAAAAA/////wAAAC8A////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwAAAA"
"AA/////wAAAGEA////+wAAAAwAVAByAGEAYwBlAHMAAAAAAP////8AAABhAP///wAAAAMAAAYAAAA"
"AbfwBAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQBAAAAAAAABgAAAABEAP///wAABgAAAAKN"
"AAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP////8AA"
"AAAAAAAAA=="
          SavedViews    "AAAAAgAAAAA="
          HeaderState   "{\"DefaultSecSize\":0,\"FirstSecSize\":202,\"Labels\""
":[],\"VisualIdxs\":[]}"
          PlotPalettes  "AAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
          Axes          "1"
          TimeRange     "0.0"
          ScrollingMode "1"
          SingleTimeAxis "1"
          Open          "0"
          Ts            "-1"
          SampleLimit   "25000"
          XAxisLabel    "Time / s"
          ShowLegend    "1"
          Axis {
            Name          ""
            AutoScale     1
            MinValue      0
            MaxValue      1
            Signals       {}
            SignalTypes   [ ]
            Untangle      0
            KeepBaseline  off
            BaselineValue 0
          }
          Fourier {
            SingleXAxis       on
            AxisLabel         "Frequency / Hz"
            Scaling           0
            PhaseDisplay      0
            ShowFourierLegend off
            Axis {
              Name          ""
              AutoScale     1
              MinValue      0
              MaxValue      1
              Signals       {}
              Untangle      0
              KeepBaseline  off
              BaselineValue 0
            }
          }
        }
        Component {
          Type          SignalMux
          Name          "Mux2"
          Show          off
          Position      [1290, 725]
          Direction     right
          Flipped       off
          LabelPosition south
          Frame         [-2, -35; 7, 35]
          Parameter {
            Variable      "Width"
            Value         "4"
            Show          off
          }
        }
        Component {
          Type          SignalMux
          Name          "Mux3"
          Show          off
          Position      [1340, 795]
          Direction     right
          Flipped       off
          LabelPosition south
          Frame         [-2, -35; 7, 35]
          Parameter {
            Variable      "Width"
            Value         "4"
            Show          off
          }
        }
        Component {
          Type          SignalMux
          Name          "Mux4"
          Show          off
          Position      [1290, 870]
          Direction     right
          Flipped       off
          LabelPosition south
          Frame         [-2, -35; 7, 35]
          Parameter {
            Variable      "Width"
            Value         "4"
            Show          off
          }
        }
        Component {
          Type          SignalMux
          Name          "Mux5"
          Show          off
          Position      [1320, 970]
          Direction     right
          Flipped       off
          LabelPosition south
          Frame         [-2, -35; 7, 35]
          Parameter {
            Variable      "Width"
            Value         "4"
            Show          off
          }
        }
        Component {
          Type          SignalMux
          Name          "Mux6"
          Show          off
          Position      [1280, 1065]
          Direction     right
          Flipped       off
          LabelPosition south
          Frame         [-2, -35; 7, 35]
          Parameter {
            Variable      "Width"
            Value         "4"
            Show          off
          }
        }
        Component {
          Type          SignalMux
          Name          "Mux7"
          Show          off
          Position      [1320, 1150]
          Direction     right
          Flipped       off
          LabelPosition south
          Frame         [-2, -35; 7, 35]
          Parameter {
            Variable      "Width"
            Value         "4"
            Show          off
          }
        }
        Component {
          Type          DCVoltageSource
          Name          "V_dc2"
          Show          off
          Position      [1665, 870]
          Direction     down
          Flipped       on
          LabelPosition east
          CommentOut    DisabledOpenCircuit
          Parameter {
            Variable      "V"
            Value         "Vdc"
            Show          off
          }
        }
        Component {
          Type          Resistor
          Name          "R8"
          Show          off
          Position      [1665, 835]
          Direction     up
          Flipped       off
          LabelPosition east
          CommentOut    DisabledOpenCircuit
          Parameter {
            Variable      "R"
            Value         "0.01"
            Show          off
          }
        }
        Component {
          Type          DCVoltageSource
          Name          "V_dc3"
          Show          off
          Position      [1665, 1010]
          Direction     down
          Flipped       on
          LabelPosition east
          CommentOut    DisabledOpenCircuit
          Parameter {
            Variable      "V"
            Value         "Vdc"
            Show          off
          }
        }
        Component {
          Type          Resistor
          Name          "R9"
          Show          off
          Position      [1665, 970]
          Direction     up
          Flipped       off
          LabelPosition east
          CommentOut    DisabledOpenCircuit
          Parameter {
            Variable      "R"
            Value         "0.01"
            Show          off
          }
        }
        Component {
          Type          DCVoltageSource
          Name          "V_dc4"
          Show          off
          Position      [1665, 1140]
          Direction     down
          Flipped       on
          LabelPosition east
          CommentOut    DisabledOpenCircuit
          Parameter {
            Variable      "V"
            Value         "Vdc"
            Show          off
          }
        }
        Component {
          Type          Resistor
          Name          "R10"
          Show          off
          Position      [1665, 1100]
          Direction     up
          Flipped       off
          LabelPosition east
          CommentOut    DisabledOpenCircuit
          Parameter {
            Variable      "R"
            Value         "0.01"
            Show          off
          }
        }
        Component {
          Type          Ground
          Name          "Ground9"
          Show          off
          Position      [1805, 445]
          Direction     up
          Flipped       off
          LabelPosition east
        }
        Component {
          Type          Delay
          Name          "Delay2"
          Show          off
          Position      [2695, 630]
          Direction     right
          Flipped       on
          LabelPosition south
          Parameter {
            Variable      "N"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "X0"
            Value         "0"
            Show          off
          }
          Parameter {
            Variable      "Ts"
            Value         "0.6"
            Show          off
          }
        }
        Component {
          Type          LogicalOperator
          Name          "Logical\nOperator2"
          Show          off
          Position      [2695, 655]
          Direction     up
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Operator"
            Value         "6"
            Show          off
          }
          Parameter {
            Variable      "Inputs"
            Value         "1"
            Show          off
          }
        }
        Component {
          Type          TargetCode
          Name          "LED Blinking"
          LibraryKeywords "RTBox RT-Box TSP Digital Output Dout"
          Show          on
          Position      [2775, 630]
          Direction     up
          Flipped       off
          LabelPosition south
          Frame         [-25, -20; 25, 20]
          TargetPortIndices "1"
          SampleTime    "0"
          EnforceBaseTask "2"
          CodeFcnLang   "2"
          CodeFcn       "local InitCode = StringList:new()\n"
"local OutputCode = StringList:new()\n"
"local BlockRequire = ResourceList:new()\n"
"\n"
"if not string.find(Target.Family, \"PLECS RT Box\") then\n"
"  return \"This block can only be used with a PLECS RT Box target.\"\n"
"end\n"
"\n"
"for idx = 1, #Block.InputSignal[1] do\n"
"  local channel = Block.Mask.channel[idx]\n"
"  BlockRequire:add(\"Digital output\", channel)\n"
"  InitCode:append(\"setupDigitalOut(%i, DO_GPIO, DO_NINV);\\n\" % { channel }"
")\n"
"  OutputCode:append(\"writeDigitalOut(%i, %s);\\n\" % { channel, Block.InputS"
"ignal[1][idx] })\n"
"end\n"
"\n"
"return {\n"
"  Include = \"plexim/DigitalOut.h\",\n"
"  InitCode = InitCode,\n"
"  OutputCode = OutputCode,\n"
"  Require = BlockRequire,\n"
"}\n"
          MaskType      "Digital Out"
          MaskDescription "Set a digital output.\n"
"\n"
"The output is set low if the input signal is zero, it is set high for all oth"
"er values."
          MaskHelp      "qthelp://com.plexim.rtbox.1.0/doc/component-reference"
"/do_rtbox.html"
          MaskDisplay   "Icon:text('Digital\\nOut')\n"
"local status, IconLib = pcall (require, 'IconLib' )\n"
"if not status then\n"
"\treturn\n"
"end\n"
"\n"
"IconLib.drawPatch()"
          MaskDisplayLang "2"
          MaskIconFrame on
          MaskIconOpaque off
          MaskIconRotates off
          MaskInit      "task = plecs('get', '.', 'CompiledTask');\n"
"if ~isfield(task, 'SampleTime')\n"
"  task.SampleTime = 0;\n"
"end\n"
"\n"
          Parameter {
            Variable      "channel"
            Prompt        "Digital output channel(s)"
            Type          FreeText
            Constraints   "integer,nonEmpty,nonNegative,vector"
            Value         "31"
            Show          off
            Tunable       off
            TabName       ""
          }
          Terminal {
            Type          Input
            Position      [-25, 0]
            Direction     left
          }
          Schematic {
            Location      [137, 58; 1188, 335]
            ZoomFactor    1
            SliderPosition [0, 0]
            ShowBrowser   off
            BrowserWidth  100
            Component {
              Type          TargetOutput
              Name          "1"
              Show          on
              Position      [260, 75]
              Direction     right
              Flipped       off
              LabelPosition south
              Parameter {
                Variable      "Width"
                Value         "numel(channel)"
                Show          off
              }
            }
            Component {
              Type          Input
              Name          "In1"
              Show          off
              Position      [120, 75]
              Direction     right
              Flipped       off
              LabelPosition south
              Parameter {
                Variable      "Index"
                Value         "1"
                Show          on
              }
              Parameter {
                Variable      "InitialOutput"
                Value         "[]"
                Show          off
              }
              Parameter {
                Variable      "HasDirectFeedthrough"
                Value         "2"
                Show          off
              }
              Parameter {
                Variable      "DataType"
                Value         "1"
                Show          off
              }
              Parameter {
                Variable      "DataTypeOverflowMode"
                Value         "1"
                Show          off
              }
              Parameter {
                Variable      "Width"
                Value         "numel(channel)"
                Show          off
              }
            }
            Component {
              Type          ZeroOrderHold
              Name          "Zero-Order\nHold"
              Show          on
              Position      [185, 75]
              Direction     right
              Flipped       off
              LabelPosition south
              Parameter {
                Variable      "Ts"
                Value         "task.SampleTime"
                Show          off
              }
            }
            Connection {
              Type          Signal
              SrcComponent  "In1"
              SrcTerminal   1
              DstComponent  "Zero-Order\nHold"
              DstTerminal   1
            }
            Connection {
              Type          Signal
              SrcComponent  "Zero-Order\nHold"
              SrcTerminal   2
              DstComponent  "1"
              DstTerminal   1
            }
          }
        }
        Component {
          Type          Scope
          Name          "Scope2"
          Show          on
          Position      [1680, 770]
          Direction     up
          Flipped       off
          LabelPosition south
          Frame         [-15, -15; 15, 15]
          Location      [0, 24; 1920, 1013]
          State         "AAAA/wAAAAD9AAAAAgAAAAEAAAAAAAAAAPwCAAAAA/sAAAAQAFoAb"
"wBvAG0AQQByAGUAYQAAAAAA/////wAAAFcA////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwAAAA"
"AA/////wAAAGEA////+wAAAAwAVAByAGEAYwBlAHMAAAAAAP////8AAABhAP///wAAAAMAAAeAAAA"
"Am/wBAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQBAAAAAAAAB4AAAABEAP///wAAB4AAAAMd"
"AAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP////8AA"
"AAAAAAAAA=="
          SavedViews    "AAAAAgAAAAA="
          HeaderState   "{\"DefaultSecSize\":0,\"FirstSecSize\":66,\"Labels\":"
"[],\"VisualIdxs\":[]}"
          PlotPalettes  "AAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="
          Axes          "2"
          TimeRange     "0"
          ScrollingMode "1"
          SingleTimeAxis "1"
          Open          "0"
          Ts            "-1"
          SampleLimit   "25000"
          XAxisLabel    "Time / s"
          ShowLegend    "1"
          Axis {
            Name          ""
            AutoScale     1
            MinValue      0
            MaxValue      1
            Signals       {}
            SignalTypes   [ ]
            Untangle      0
            KeepBaseline  off
            BaselineValue 0
          }
          Axis {
            Name          ""
            AutoScale     1
            MinValue      0
            MaxValue      1
            Signals       {}
            SignalTypes   [ ]
            Untangle      0
            KeepBaseline  off
            BaselineValue 0
          }
          Fourier {
            SingleXAxis       on
            AxisLabel         "Frequency / Hz"
            Scaling           0
            PhaseDisplay      0
            ShowFourierLegend off
            Axis {
              Name          ""
              AutoScale     1
              MinValue      0
              MaxValue      1
              Signals       {}
              Untangle      0
              KeepBaseline  off
              BaselineValue 0
            }
            Axis {
              Name          ""
              AutoScale     1
              MinValue      0
              MaxValue      1
              Signals       {}
              Untangle      0
              KeepBaseline  off
              BaselineValue 0
            }
          }
        }
        Component {
          Type          Scope
          Name          "Scope3"
          Show          on
          Position      [1460, 935]
          Direction     up
          Flipped       off
          LabelPosition south
          Frame         [-15, -15; 15, 15]
          Location      [0, 24; 1920, 1013]
          State         "AAAA/wAAAAD9AAAAAgAAAAEAAAAAAAAAAPwCAAAAA/sAAAAQAFoAb"
"wBvAG0AQQByAGUAYQAAAAAA/////wAAAFcA////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwAAAA"
"AA/////wAAAGEA////+wAAAAwAVAByAGEAYwBlAHMAAAAAAP////8AAABhAP///wAAAAMAAAeAAAA"
"Am/wBAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQBAAAAAAAAB4AAAABEAP///wAAB4AAAAMd"
"AAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP////8AA"
"AAAAAAAAA=="
          SavedViews    "AAAAAgAAAAA="
          HeaderState   "{\"DefaultSecSize\":0,\"FirstSecSize\":66,\"Labels\":"
"[],\"VisualIdxs\":[]}"
          PlotPalettes  "AAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="
          Axes          "2"
          TimeRange     "0"
          ScrollingMode "1"
          SingleTimeAxis "1"
          Open          "0"
          Ts            "-1"
          SampleLimit   "25000"
          XAxisLabel    "Time / s"
          ShowLegend    "1"
          Axis {
            Name          ""
            AutoScale     1
            MinValue      0
            MaxValue      1
            Signals       {}
            SignalTypes   [ ]
            Untangle      0
            KeepBaseline  off
            BaselineValue 0
          }
          Axis {
            Name          ""
            AutoScale     1
            MinValue      0
            MaxValue      1
            Signals       {}
            SignalTypes   [ ]
            Untangle      0
            KeepBaseline  off
            BaselineValue 0
          }
          Fourier {
            SingleXAxis       on
            AxisLabel         "Frequency / Hz"
            Scaling           0
            PhaseDisplay      0
            ShowFourierLegend off
            Axis {
              Name          ""
              AutoScale     1
              MinValue      0
              MaxValue      1
              Signals       {}
              Untangle      0
              KeepBaseline  off
              BaselineValue 0
            }
            Axis {
              Name          ""
              AutoScale     1
              MinValue      0
              MaxValue      1
              Signals       {}
              Untangle      0
              KeepBaseline  off
              BaselineValue 0
            }
          }
        }
        Component {
          Type          Scope
          Name          "Scope5"
          Show          on
          Position      [1470, 1045]
          Direction     up
          Flipped       off
          LabelPosition south
          Frame         [-15, -15; 15, 15]
          Location      [0, 23; 1920, 1012]
          State         "AAAA/wAAAAD9AAAAAgAAAAEAAAAAAAAAAPwCAAAAA/sAAAAQAFoAb"
"wBvAG0AQQByAGUAYQAAAAAA/////wAAAFcA////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwAAAA"
"AA/////wAAAGEA////+wAAAAwAVAByAGEAYwBlAHMAAAAAAP////8AAABhAP///wAAAAMAAAAAAAA"
"AAPwBAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQAAAAAAP////8AAABEAP///wAAB4AAAAO+"
"AAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP////8AA"
"AAAAAAAAA=="
          SavedViews    "AAAAAgAAAAA="
          HeaderState   "{\"DefaultSecSize\":0,\"FirstSecSize\":66,\"Labels\":"
"[],\"VisualIdxs\":[]}"
          PlotPalettes  "AAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="
          Axes          "2"
          TimeRange     "0"
          ScrollingMode "1"
          SingleTimeAxis "1"
          Open          "0"
          Ts            "-1"
          SampleLimit   "25000"
          XAxisLabel    "Time / s"
          ShowLegend    "1"
          Axis {
            Name          ""
            AutoScale     1
            MinValue      0
            MaxValue      1
            Signals       {}
            SignalTypes   [ ]
            Untangle      0
            KeepBaseline  off
            BaselineValue 0
          }
          Axis {
            Name          ""
            AutoScale     1
            MinValue      0
            MaxValue      1
            Signals       {}
            SignalTypes   [ ]
            Untangle      0
            KeepBaseline  off
            BaselineValue 0
          }
          Fourier {
            SingleXAxis       on
            AxisLabel         "Frequency / Hz"
            Scaling           0
            PhaseDisplay      0
            ShowFourierLegend off
            Axis {
              Name          ""
              AutoScale     1
              MinValue      0
              MaxValue      1
              Signals       {}
              Untangle      0
              KeepBaseline  off
              BaselineValue 0
            }
            Axis {
              Name          ""
              AutoScale     1
              MinValue      0
              MaxValue      1
              Signals       {}
              Untangle      0
              KeepBaseline  off
              BaselineValue 0
            }
          }
        }
        Component {
          Type          Subsystem
          Name          "load"
          Show          on
          Position      [2335, 415]
          Direction     up
          Flipped       off
          LabelPosition none
          Frame         [-65, -45; 65, 45]
          SampleTime    "-1"
          CodeGenDiscretizationMethod "2"
          CodeGenTarget "Generic"
          MaskDisplayLang "2"
          MaskIconFrame on
          MaskIconOpaque off
          MaskIconRotates on
          Terminal {
            Type          Port
            Position      [-70, 10]
            Direction     left
          }
          Terminal {
            Type          Port
            Position      [-70, 0]
            Direction     left
          }
          Terminal {
            Type          Port
            Position      [-70, -10]
            Direction     left
          }
          Schematic {
            Location      [114, 66; 1394, 744]
            ZoomFactor    0.76361
            SliderPosition [0, 0]
            ShowBrowser   off
            BrowserWidth  100
            Component {
              Type          Resistor
              Name          "R1"
              Show          on
              Position      [60, 245]
              Direction     up
              Flipped       off
              LabelPosition east
              Parameter {
                Variable      "R"
                Value         "10"
                Show          off
              }
            }
            Component {
              Type          Inductor
              Name          "L1"
              Show          on
              Position      [60, 300]
              Direction     down
              Flipped       off
              LabelPosition west
              Parameter {
                Variable      "L"
                Value         "0.01"
                Show          off
              }
              Parameter {
                Variable      "i_init"
                Value         "0"
                Show          off
              }
            }
            Component {
              Type          Resistor
              Name          "R2"
              Show          on
              Position      [105, 245]
              Direction     up
              Flipped       off
              LabelPosition east
              Parameter {
                Variable      "R"
                Value         "10"
                Show          off
              }
            }
            Component {
              Type          Inductor
              Name          "L2"
              Show          on
              Position      [105, 300]
              Direction     down
              Flipped       off
              LabelPosition west
              Parameter {
                Variable      "L"
                Value         "0.01"
                Show          off
              }
              Parameter {
                Variable      "i_init"
                Value         "0"
                Show          off
              }
            }
            Component {
              Type          Resistor
              Name          "R3"
              Show          on
              Position      [155, 245]
              Direction     up
              Flipped       off
              LabelPosition east
              Parameter {
                Variable      "R"
                Value         "10"
                Show          off
              }
            }
            Component {
              Type          Inductor
              Name          "L3"
              Show          on
              Position      [155, 300]
              Direction     down
              Flipped       off
              LabelPosition west
              Parameter {
                Variable      "L"
                Value         "0.01"
                Show          off
              }
              Parameter {
                Variable      "i_init"
                Value         "0"
                Show          off
              }
            }
            Component {
              Type          CurrentSource
              Name          "I"
              Show          on
              Position      [295, 260]
              Direction     down
              Flipped       on
              LabelPosition east
              CommentOut    DisabledOpenCircuit
              Parameter {
                Variable      "DiscretizationBehavior"
                Value         "2"
                Show          off
              }
              Parameter {
                Variable      "StateSpaceInlining"
                Value         "1"
                Show          off
              }
            }
            Component {
              Type          SineGenerator
              Name          "Sine Wave"
              Show          on
              Position      [235, 260]
              Direction     right
              Flipped       off
              LabelPosition south
              CommentOut    DisabledOpenCircuit
              Parameter {
                Variable      "Amplitude"
                Value         "150"
                Show          off
              }
              Parameter {
                Variable      "Bias"
                Value         "0"
                Show          off
              }
              Parameter {
                Variable      "Frequency"
                Value         "100"
                Show          off
              }
              Parameter {
                Variable      "Phase"
                Value         "0"
                Show          off
              }
              Parameter {
                Variable      "Units"
                Value         "3"
                Show          off
              }
            }
            Component {
              Type          CurrentSource
              Name          "I1"
              Show          on
              Position      [330, 315]
              Direction     down
              Flipped       on
              LabelPosition east
              CommentOut    DisabledOpenCircuit
              Parameter {
                Variable      "DiscretizationBehavior"
                Value         "2"
                Show          off
              }
              Parameter {
                Variable      "StateSpaceInlining"
                Value         "1"
                Show          off
              }
            }
            Component {
              Type          SineGenerator
              Name          "Sine Wave1"
              Show          on
              Position      [235, 315]
              Direction     right
              Flipped       off
              LabelPosition south
              CommentOut    DisabledOpenCircuit
              Parameter {
                Variable      "Amplitude"
                Value         "150"
                Show          off
              }
              Parameter {
                Variable      "Bias"
                Value         "0"
                Show          off
              }
              Parameter {
                Variable      "Frequency"
                Value         "100"
                Show          off
              }
              Parameter {
                Variable      "Phase"
                Value         "120"
                Show          off
              }
              Parameter {
                Variable      "Units"
                Value         "3"
                Show          off
              }
            }
            Component {
              Type          CurrentSource
              Name          "I2"
              Show          on
              Position      [365, 370]
              Direction     down
              Flipped       on
              LabelPosition east
              CommentOut    DisabledOpenCircuit
              Parameter {
                Variable      "DiscretizationBehavior"
                Value         "2"
                Show          off
              }
              Parameter {
                Variable      "StateSpaceInlining"
                Value         "1"
                Show          off
              }
            }
            Component {
              Type          SineGenerator
              Name          "Sine Wave2"
              Show          on
              Position      [235, 370]
              Direction     right
              Flipped       off
              LabelPosition south
              CommentOut    DisabledOpenCircuit
              Parameter {
                Variable      "Amplitude"
                Value         "150"
                Show          off
              }
              Parameter {
                Variable      "Bias"
                Value         "0"
                Show          off
              }
              Parameter {
                Variable      "Frequency"
                Value         "100"
                Show          off
              }
              Parameter {
                Variable      "Phase"
                Value         "-120"
                Show          off
              }
              Parameter {
                Variable      "Units"
                Value         "3"
                Show          off
              }
            }
            Component {
              Type          Ground
              Name          "Ground1"
              Show          off
              Position      [295, 425]
              Direction     up
              Flipped       off
              LabelPosition east
              CommentOut    DisabledOpenCircuit
            }
            Component {
              Type          CurrentSource
              Name          "I3"
              Show          on
              Position      [495, 260]
              Direction     down
              Flipped       on
              LabelPosition east
              CommentOut    DisabledOpenCircuit
              Parameter {
                Variable      "DiscretizationBehavior"
                Value         "2"
                Show          off
              }
              Parameter {
                Variable      "StateSpaceInlining"
                Value         "1"
                Show          off
              }
            }
            Component {
              Type          SineGenerator
              Name          "Sine Wave3"
              Show          on
              Position      [435, 260]
              Direction     right
              Flipped       off
              LabelPosition south
              CommentOut    DisabledOpenCircuit
              Parameter {
                Variable      "Amplitude"
                Value         "350"
                Show          off
              }
              Parameter {
                Variable      "Bias"
                Value         "0"
                Show          off
              }
              Parameter {
                Variable      "Frequency"
                Value         "150"
                Show          off
              }
              Parameter {
                Variable      "Phase"
                Value         "0"
                Show          off
              }
              Parameter {
                Variable      "Units"
                Value         "3"
                Show          off
              }
            }
            Component {
              Type          CurrentSource
              Name          "I4"
              Show          on
              Position      [530, 315]
              Direction     down
              Flipped       on
              LabelPosition east
              CommentOut    DisabledOpenCircuit
              Parameter {
                Variable      "DiscretizationBehavior"
                Value         "2"
                Show          off
              }
              Parameter {
                Variable      "StateSpaceInlining"
                Value         "1"
                Show          off
              }
            }
            Component {
              Type          SineGenerator
              Name          "Sine Wave4"
              Show          on
              Position      [435, 315]
              Direction     right
              Flipped       off
              LabelPosition south
              CommentOut    DisabledOpenCircuit
              Parameter {
                Variable      "Amplitude"
                Value         "250"
                Show          off
              }
              Parameter {
                Variable      "Bias"
                Value         "0"
                Show          off
              }
              Parameter {
                Variable      "Frequency"
                Value         "150"
                Show          off
              }
              Parameter {
                Variable      "Phase"
                Value         "0"
                Show          off
              }
              Parameter {
                Variable      "Units"
                Value         "3"
                Show          off
              }
            }
            Component {
              Type          CurrentSource
              Name          "I5"
              Show          on
              Position      [565, 370]
              Direction     down
              Flipped       on
              LabelPosition east
              CommentOut    DisabledOpenCircuit
              Parameter {
                Variable      "DiscretizationBehavior"
                Value         "2"
                Show          off
              }
              Parameter {
                Variable      "StateSpaceInlining"
                Value         "1"
                Show          off
              }
            }
            Component {
              Type          SineGenerator
              Name          "Sine Wave5"
              Show          on
              Position      [435, 370]
              Direction     right
              Flipped       off
              LabelPosition south
              CommentOut    DisabledOpenCircuit
              Parameter {
                Variable      "Amplitude"
                Value         "150"
                Show          off
              }
              Parameter {
                Variable      "Bias"
                Value         "0"
                Show          off
              }
              Parameter {
                Variable      "Frequency"
                Value         "150"
                Show          off
              }
              Parameter {
                Variable      "Phase"
                Value         "0"
                Show          off
              }
              Parameter {
                Variable      "Units"
                Value         "3"
                Show          off
              }
            }
            Component {
              Type          Ground
              Name          "Ground2"
              Show          off
              Position      [495, 425]
              Direction     up
              Flipped       off
              LabelPosition east
              CommentOut    DisabledOpenCircuit
            }
            Component {
              Type          CurrentSource
              Name          "I6"
              Show          on
              Position      [725, 260]
              Direction     down
              Flipped       on
              LabelPosition east
              CommentOut    DisabledOpenCircuit
              Parameter {
                Variable      "DiscretizationBehavior"
                Value         "2"
                Show          off
              }
              Parameter {
                Variable      "StateSpaceInlining"
                Value         "1"
                Show          off
              }
            }
            Component {
              Type          SineGenerator
              Name          "Sine Wave6"
              Show          on
              Position      [665, 260]
              Direction     right
              Flipped       off
              LabelPosition south
              CommentOut    DisabledOpenCircuit
              Parameter {
                Variable      "Amplitude"
                Value         "100"
                Show          off
              }
              Parameter {
                Variable      "Bias"
                Value         "0"
                Show          off
              }
              Parameter {
                Variable      "Frequency"
                Value         "200"
                Show          off
              }
              Parameter {
                Variable      "Phase"
                Value         "0"
                Show          off
              }
              Parameter {
                Variable      "Units"
                Value         "3"
                Show          off
              }
            }
            Component {
              Type          CurrentSource
              Name          "I7"
              Show          on
              Position      [760, 315]
              Direction     down
              Flipped       on
              LabelPosition east
              CommentOut    DisabledOpenCircuit
              Parameter {
                Variable      "DiscretizationBehavior"
                Value         "2"
                Show          off
              }
              Parameter {
                Variable      "StateSpaceInlining"
                Value         "1"
                Show          off
              }
            }
            Component {
              Type          SineGenerator
              Name          "Sine Wave7"
              Show          on
              Position      [665, 315]
              Direction     right
              Flipped       off
              LabelPosition south
              CommentOut    DisabledOpenCircuit
              Parameter {
                Variable      "Amplitude"
                Value         "100"
                Show          off
              }
              Parameter {
                Variable      "Bias"
                Value         "0"
                Show          off
              }
              Parameter {
                Variable      "Frequency"
                Value         "200"
                Show          off
              }
              Parameter {
                Variable      "Phase"
                Value         "-120"
                Show          off
              }
              Parameter {
                Variable      "Units"
                Value         "3"
                Show          off
              }
            }
            Component {
              Type          CurrentSource
              Name          "I8"
              Show          on
              Position      [795, 370]
              Direction     down
              Flipped       on
              LabelPosition east
              CommentOut    DisabledOpenCircuit
              Parameter {
                Variable      "DiscretizationBehavior"
                Value         "2"
                Show          off
              }
              Parameter {
                Variable      "StateSpaceInlining"
                Value         "1"
                Show          off
              }
            }
            Component {
              Type          SineGenerator
              Name          "Sine Wave8"
              Show          on
              Position      [665, 370]
              Direction     right
              Flipped       off
              LabelPosition south
              CommentOut    DisabledOpenCircuit
              Parameter {
                Variable      "Amplitude"
                Value         "100"
                Show          off
              }
              Parameter {
                Variable      "Bias"
                Value         "0"
                Show          off
              }
              Parameter {
                Variable      "Frequency"
                Value         "200"
                Show          off
              }
              Parameter {
                Variable      "Phase"
                Value         "120"
                Show          off
              }
              Parameter {
                Variable      "Units"
                Value         "3"
                Show          off
              }
            }
            Component {
              Type          Ground
              Name          "Ground3"
              Show          off
              Position      [725, 425]
              Direction     up
              Flipped       off
              LabelPosition east
              CommentOut    DisabledOpenCircuit
            }
            Component {
              Type          CurrentSource
              Name          "I9"
              Show          on
              Position      [925, 260]
              Direction     down
              Flipped       on
              LabelPosition east
              CommentOut    DisabledOpenCircuit
              Parameter {
                Variable      "DiscretizationBehavior"
                Value         "2"
                Show          off
              }
              Parameter {
                Variable      "StateSpaceInlining"
                Value         "1"
                Show          off
              }
            }
            Component {
              Type          SineGenerator
              Name          "Sine Wave9"
              Show          on
              Position      [865, 260]
              Direction     right
              Flipped       off
              LabelPosition south
              CommentOut    DisabledOpenCircuit
              Parameter {
                Variable      "Amplitude"
                Value         "150"
                Show          off
              }
              Parameter {
                Variable      "Bias"
                Value         "0"
                Show          off
              }
              Parameter {
                Variable      "Frequency"
                Value         "250"
                Show          off
              }
              Parameter {
                Variable      "Phase"
                Value         "0"
                Show          off
              }
              Parameter {
                Variable      "Units"
                Value         "3"
                Show          off
              }
            }
            Component {
              Type          CurrentSource
              Name          "I10"
              Show          on
              Position      [960, 315]
              Direction     down
              Flipped       on
              LabelPosition east
              CommentOut    DisabledOpenCircuit
              Parameter {
                Variable      "DiscretizationBehavior"
                Value         "2"
                Show          off
              }
              Parameter {
                Variable      "StateSpaceInlining"
                Value         "1"
                Show          off
              }
            }
            Component {
              Type          SineGenerator
              Name          "Sine Wave10"
              Show          on
              Position      [865, 315]
              Direction     right
              Flipped       off
              LabelPosition south
              CommentOut    DisabledOpenCircuit
              Parameter {
                Variable      "Amplitude"
                Value         "150"
                Show          off
              }
              Parameter {
                Variable      "Bias"
                Value         "0"
                Show          off
              }
              Parameter {
                Variable      "Frequency"
                Value         "250"
                Show          off
              }
              Parameter {
                Variable      "Phase"
                Value         "120"
                Show          off
              }
              Parameter {
                Variable      "Units"
                Value         "3"
                Show          off
              }
            }
            Component {
              Type          CurrentSource
              Name          "I11"
              Show          on
              Position      [995, 370]
              Direction     down
              Flipped       on
              LabelPosition east
              CommentOut    DisabledOpenCircuit
              Parameter {
                Variable      "DiscretizationBehavior"
                Value         "2"
                Show          off
              }
              Parameter {
                Variable      "StateSpaceInlining"
                Value         "1"
                Show          off
              }
            }
            Component {
              Type          SineGenerator
              Name          "Sine Wave11"
              Show          on
              Position      [865, 370]
              Direction     right
              Flipped       off
              LabelPosition south
              CommentOut    DisabledOpenCircuit
              Parameter {
                Variable      "Amplitude"
                Value         "150"
                Show          off
              }
              Parameter {
                Variable      "Bias"
                Value         "0"
                Show          off
              }
              Parameter {
                Variable      "Frequency"
                Value         "250"
                Show          off
              }
              Parameter {
                Variable      "Phase"
                Value         "-120"
                Show          off
              }
              Parameter {
                Variable      "Units"
                Value         "3"
                Show          off
              }
            }
            Component {
              Type          Ground
              Name          "Ground4"
              Show          off
              Position      [925, 425]
              Direction     up
              Flipped       off
              LabelPosition east
              CommentOut    DisabledOpenCircuit
            }
            Component {
              Type          CurrentSource
              Name          "I15"
              Show          on
              Position      [1360, 260]
              Direction     down
              Flipped       on
              LabelPosition east
              CommentOut    DisabledOpenCircuit
              Parameter {
                Variable      "DiscretizationBehavior"
                Value         "2"
                Show          off
              }
              Parameter {
                Variable      "StateSpaceInlining"
                Value         "1"
                Show          off
              }
            }
            Component {
              Type          SineGenerator
              Name          "Sine Wave15"
              Show          on
              Position      [1300, 260]
              Direction     right
              Flipped       off
              LabelPosition south
              CommentOut    DisabledOpenCircuit
              Parameter {
                Variable      "Amplitude"
                Value         "100"
                Show          off
              }
              Parameter {
                Variable      "Bias"
                Value         "0"
                Show          off
              }
              Parameter {
                Variable      "Frequency"
                Value         "350"
                Show          off
              }
              Parameter {
                Variable      "Phase"
                Value         "0"
                Show          off
              }
              Parameter {
                Variable      "Units"
                Value         "3"
                Show          off
              }
            }
            Component {
              Type          CurrentSource
              Name          "I16"
              Show          on
              Position      [1395, 315]
              Direction     down
              Flipped       on
              LabelPosition east
              CommentOut    DisabledOpenCircuit
              Parameter {
                Variable      "DiscretizationBehavior"
                Value         "2"
                Show          off
              }
              Parameter {
                Variable      "StateSpaceInlining"
                Value         "1"
                Show          off
              }
            }
            Component {
              Type          SineGenerator
              Name          "Sine Wave16"
              Show          on
              Position      [1300, 315]
              Direction     right
              Flipped       off
              LabelPosition south
              CommentOut    DisabledOpenCircuit
              Parameter {
                Variable      "Amplitude"
                Value         "100"
                Show          off
              }
              Parameter {
                Variable      "Bias"
                Value         "0"
                Show          off
              }
              Parameter {
                Variable      "Frequency"
                Value         "350"
                Show          off
              }
              Parameter {
                Variable      "Phase"
                Value         "-120"
                Show          off
              }
              Parameter {
                Variable      "Units"
                Value         "3"
                Show          off
              }
            }
            Component {
              Type          CurrentSource
              Name          "I17"
              Show          on
              Position      [1430, 370]
              Direction     down
              Flipped       on
              LabelPosition east
              CommentOut    DisabledOpenCircuit
              Parameter {
                Variable      "DiscretizationBehavior"
                Value         "2"
                Show          off
              }
              Parameter {
                Variable      "StateSpaceInlining"
                Value         "1"
                Show          off
              }
            }
            Component {
              Type          SineGenerator
              Name          "Sine Wave17"
              Show          on
              Position      [1300, 370]
              Direction     right
              Flipped       off
              LabelPosition south
              CommentOut    DisabledOpenCircuit
              Parameter {
                Variable      "Amplitude"
                Value         "100"
                Show          off
              }
              Parameter {
                Variable      "Bias"
                Value         "0"
                Show          off
              }
              Parameter {
                Variable      "Frequency"
                Value         "350"
                Show          off
              }
              Parameter {
                Variable      "Phase"
                Value         "120"
                Show          off
              }
              Parameter {
                Variable      "Units"
                Value         "3"
                Show          off
              }
            }
            Component {
              Type          Ground
              Name          "Ground6"
              Show          off
              Position      [1360, 425]
              Direction     up
              Flipped       off
              LabelPosition east
              CommentOut    DisabledOpenCircuit
            }
            Component {
              Type          CurrentSource
              Name          "I18"
              Show          on
              Position      [180, 475]
              Direction     down
              Flipped       on
              LabelPosition east
              CommentOut    DisabledOpenCircuit
              Parameter {
                Variable      "DiscretizationBehavior"
                Value         "2"
                Show          off
              }
              Parameter {
                Variable      "StateSpaceInlining"
                Value         "1"
                Show          off
              }
            }
            Component {
              Type          SineGenerator
              Name          "Sine Wave18"
              Show          on
              Position      [120, 475]
              Direction     right
              Flipped       off
              LabelPosition south
              CommentOut    DisabledOpenCircuit
              Parameter {
                Variable      "Amplitude"
                Value         "300"
                Show          off
              }
              Parameter {
                Variable      "Bias"
                Value         "0"
                Show          off
              }
              Parameter {
                Variable      "Frequency"
                Value         "50"
                Show          off
              }
              Parameter {
                Variable      "Phase"
                Value         "0"
                Show          off
              }
              Parameter {
                Variable      "Units"
                Value         "3"
                Show          off
              }
            }
            Component {
              Type          CurrentSource
              Name          "I19"
              Show          on
              Position      [215, 530]
              Direction     down
              Flipped       on
              LabelPosition east
              CommentOut    DisabledOpenCircuit
              Parameter {
                Variable      "DiscretizationBehavior"
                Value         "2"
                Show          off
              }
              Parameter {
                Variable      "StateSpaceInlining"
                Value         "1"
                Show          off
              }
            }
            Component {
              Type          SineGenerator
              Name          "Sine Wave19"
              Show          on
              Position      [120, 530]
              Direction     right
              Flipped       off
              LabelPosition south
              CommentOut    DisabledOpenCircuit
              Parameter {
                Variable      "Amplitude"
                Value         "300"
                Show          off
              }
              Parameter {
                Variable      "Bias"
                Value         "0"
                Show          off
              }
              Parameter {
                Variable      "Frequency"
                Value         "50"
                Show          off
              }
              Parameter {
                Variable      "Phase"
                Value         "120"
                Show          off
              }
              Parameter {
                Variable      "Units"
                Value         "3"
                Show          off
              }
            }
            Component {
              Type          CurrentSource
              Name          "I20"
              Show          on
              Position      [250, 585]
              Direction     down
              Flipped       on
              LabelPosition east
              CommentOut    DisabledOpenCircuit
              Parameter {
                Variable      "DiscretizationBehavior"
                Value         "2"
                Show          off
              }
              Parameter {
                Variable      "StateSpaceInlining"
                Value         "1"
                Show          off
              }
            }
            Component {
              Type          SineGenerator
              Name          "Sine Wave20"
              Show          on
              Position      [120, 585]
              Direction     right
              Flipped       off
              LabelPosition south
              CommentOut    DisabledOpenCircuit
              Parameter {
                Variable      "Amplitude"
                Value         "300"
                Show          off
              }
              Parameter {
                Variable      "Bias"
                Value         "0"
                Show          off
              }
              Parameter {
                Variable      "Frequency"
                Value         "50"
                Show          off
              }
              Parameter {
                Variable      "Phase"
                Value         "-120"
                Show          off
              }
              Parameter {
                Variable      "Units"
                Value         "3"
                Show          off
              }
            }
            Component {
              Type          Ground
              Name          "Ground7"
              Show          off
              Position      [180, 640]
              Direction     up
              Flipped       off
              LabelPosition east
              CommentOut    DisabledOpenCircuit
            }
            Component {
              Type          Port
              Name          "C"
              Show          on
              Position      [35, 200]
              Direction     right
              Flipped       off
              LabelPosition south
              Parameter {
                Variable      "Index"
                Value         "1"
                Show          on
              }
              Parameter {
                Variable      "Width"
                Value         "-1"
                Show          off
              }
            }
            Component {
              Type          Port
              Name          "B"
              Show          on
              Position      [35, 170]
              Direction     right
              Flipped       off
              LabelPosition south
              Parameter {
                Variable      "Index"
                Value         "2"
                Show          on
              }
              Parameter {
                Variable      "Width"
                Value         "-1"
                Show          off
              }
            }
            Component {
              Type          Port
              Name          "A"
              Show          on
              Position      [35, 140]
              Direction     right
              Flipped       off
              LabelPosition south
              Parameter {
                Variable      "Index"
                Value         "3"
                Show          on
              }
              Parameter {
                Variable      "Width"
                Value         "-1"
                Show          off
              }
            }
            Connection {
              Type          Wire
              SrcComponent  "L1"
              SrcTerminal   2
              DstComponent  "R1"
              DstTerminal   2
            }
            Connection {
              Type          Wire
              SrcComponent  "L2"
              SrcTerminal   2
              DstComponent  "R2"
              DstTerminal   2
            }
            Connection {
              Type          Wire
              SrcComponent  "L3"
              SrcTerminal   2
              DstComponent  "R3"
              DstTerminal   2
            }
            Connection {
              Type          Wire
              SrcComponent  "L3"
              SrcTerminal   1
              Points        [155, 335; 105, 335]
              Branch {
                Points        [60, 335]
                DstComponent  "L1"
                DstTerminal   1
              }
              Branch {
                DstComponent  "L2"
                DstTerminal   1
              }
            }
            Connection {
              Type          Signal
              SrcComponent  "Sine Wave"
              SrcTerminal   1
              DstComponent  "I"
              DstTerminal   3
            }
            Connection {
              Type          Signal
              SrcComponent  "Sine Wave1"
              SrcTerminal   1
              DstComponent  "I1"
              DstTerminal   3
            }
            Connection {
              Type          Signal
              SrcComponent  "Sine Wave2"
              SrcTerminal   1
              DstComponent  "I2"
              DstTerminal   3
            }
            Connection {
              Type          Wire
              SrcComponent  "I"
              SrcTerminal   1
              Points        [295, 340]
              Branch {
                Points        [295, 400]
                Branch {
                  DstComponent  "Ground1"
                  DstTerminal   1
                }
                Branch {
                  Points        [365, 400]
                  DstComponent  "I2"
                  DstTerminal   1
                }
              }
              Branch {
                Points        [330, 340]
                DstComponent  "I1"
                DstTerminal   1
              }
            }
            Connection {
              Type          Wire
              SrcComponent  "R3"
              SrcTerminal   1
              Points        [155, 180]
              Branch {
                Points        [105, 180; 105, 140]
                DstComponent  "A"
                DstTerminal   1
              }
              Branch {
                Points        [180, 180]
                Branch {
                  Points        [295, 180]
                  Branch {
                    DstComponent  "I"
                    DstTerminal   2
                  }
                  Branch {
                    Points        [495, 180]
                    Branch {
                      DstComponent  "I3"
                      DstTerminal   2
                    }
                    Branch {
                      Points        [725, 180]
                      Branch {
                        DstComponent  "I6"
                        DstTerminal   2
                      }
                      Branch {
                        Points        [925, 180]
                        Branch {
                          Points        [1360, 180]
                          DstComponent  "I15"
                          DstTerminal   2
                        }
                        Branch {
                          DstComponent  "I9"
                          DstTerminal   2
                        }
                      }
                    }
                  }
                }
                Branch {
                  DstComponent  "I18"
                  DstTerminal   2
                }
              }
            }
            Connection {
              Type          Wire
              SrcComponent  "R2"
              SrcTerminal   1
              Points        [105, 190]
              Branch {
                Points        [80, 190; 80, 170]
                DstComponent  "B"
                DstTerminal   1
              }
              Branch {
                Points        [190, 190]
                Branch {
                  Points        [330, 190]
                  Branch {
                    DstComponent  "I1"
                    DstTerminal   2
                  }
                  Branch {
                    Points        [530, 190]
                    Branch {
                      DstComponent  "I4"
                      DstTerminal   2
                    }
                    Branch {
                      Points        [760, 190]
                      Branch {
                        DstComponent  "I7"
                        DstTerminal   2
                      }
                      Branch {
                        Points        [960, 190]
                        Branch {
                          Points        [1395, 190]
                          DstComponent  "I16"
                          DstTerminal   2
                        }
                        Branch {
                          DstComponent  "I10"
                          DstTerminal   2
                        }
                      }
                    }
                  }
                }
                Branch {
                  Points        [190, 450; 215, 450]
                  DstComponent  "I19"
                  DstTerminal   2
                }
              }
            }
            Connection {
              Type          Wire
              SrcComponent  "R1"
              SrcTerminal   1
              Points        [60, 200]
              Branch {
                DstComponent  "C"
                DstTerminal   1
              }
              Branch {
                Points        [200, 200]
                Branch {
                  Points        [365, 200]
                  Branch {
                    DstComponent  "I2"
                    DstTerminal   2
                  }
                  Branch {
                    Points        [565, 200]
                    Branch {
                      DstComponent  "I5"
                      DstTerminal   2
                    }
                    Branch {
                      Points        [795, 200]
                      Branch {
                        DstComponent  "I8"
                        DstTerminal   2
                      }
                      Branch {
                        Points        [995, 200]
                        Branch {
                          Points        [1430, 200]
                          DstComponent  "I17"
                          DstTerminal   2
                        }
                        Branch {
                          DstComponent  "I11"
                          DstTerminal   2
                        }
                      }
                    }
                  }
                }
                Branch {
                  Points        [200, 440; 250, 440]
                  DstComponent  "I20"
                  DstTerminal   2
                }
              }
            }
            Connection {
              Type          Signal
              SrcComponent  "Sine Wave3"
              SrcTerminal   1
              DstComponent  "I3"
              DstTerminal   3
            }
            Connection {
              Type          Signal
              SrcComponent  "Sine Wave4"
              SrcTerminal   1
              DstComponent  "I4"
              DstTerminal   3
            }
            Connection {
              Type          Signal
              SrcComponent  "Sine Wave5"
              SrcTerminal   1
              DstComponent  "I5"
              DstTerminal   3
            }
            Connection {
              Type          Wire
              SrcComponent  "I3"
              SrcTerminal   1
              Points        [495, 340]
              Branch {
                Points        [495, 400]
                Branch {
                  DstComponent  "Ground2"
                  DstTerminal   1
                }
                Branch {
                  Points        [565, 400]
                  DstComponent  "I5"
                  DstTerminal   1
                }
              }
              Branch {
                Points        [530, 340]
                DstComponent  "I4"
                DstTerminal   1
              }
            }
            Connection {
              Type          Signal
              SrcComponent  "Sine Wave6"
              SrcTerminal   1
              DstComponent  "I6"
              DstTerminal   3
            }
            Connection {
              Type          Signal
              SrcComponent  "Sine Wave7"
              SrcTerminal   1
              DstComponent  "I7"
              DstTerminal   3
            }
            Connection {
              Type          Signal
              SrcComponent  "Sine Wave8"
              SrcTerminal   1
              DstComponent  "I8"
              DstTerminal   3
            }
            Connection {
              Type          Wire
              SrcComponent  "I6"
              SrcTerminal   1
              Points        [725, 340]
              Branch {
                Points        [725, 400]
                Branch {
                  DstComponent  "Ground3"
                  DstTerminal   1
                }
                Branch {
                  Points        [795, 400]
                  DstComponent  "I8"
                  DstTerminal   1
                }
              }
              Branch {
                Points        [760, 340]
                DstComponent  "I7"
                DstTerminal   1
              }
            }
            Connection {
              Type          Signal
              SrcComponent  "Sine Wave9"
              SrcTerminal   1
              DstComponent  "I9"
              DstTerminal   3
            }
            Connection {
              Type          Signal
              SrcComponent  "Sine Wave10"
              SrcTerminal   1
              DstComponent  "I10"
              DstTerminal   3
            }
            Connection {
              Type          Signal
              SrcComponent  "Sine Wave11"
              SrcTerminal   1
              DstComponent  "I11"
              DstTerminal   3
            }
            Connection {
              Type          Wire
              SrcComponent  "I9"
              SrcTerminal   1
              Points        [925, 340]
              Branch {
                Points        [925, 400]
                Branch {
                  DstComponent  "Ground4"
                  DstTerminal   1
                }
                Branch {
                  Points        [995, 400]
                  DstComponent  "I11"
                  DstTerminal   1
                }
              }
              Branch {
                Points        [960, 340]
                DstComponent  "I10"
                DstTerminal   1
              }
            }
            Connection {
              Type          Signal
              SrcComponent  "Sine Wave15"
              SrcTerminal   1
              DstComponent  "I15"
              DstTerminal   3
            }
            Connection {
              Type          Signal
              SrcComponent  "Sine Wave16"
              SrcTerminal   1
              DstComponent  "I16"
              DstTerminal   3
            }
            Connection {
              Type          Signal
              SrcComponent  "Sine Wave17"
              SrcTerminal   1
              DstComponent  "I17"
              DstTerminal   3
            }
            Connection {
              Type          Wire
              SrcComponent  "I15"
              SrcTerminal   1
              Points        [1360, 340]
              Branch {
                Points        [1360, 400]
                Branch {
                  DstComponent  "Ground6"
                  DstTerminal   1
                }
                Branch {
                  Points        [1430, 400]
                  DstComponent  "I17"
                  DstTerminal   1
                }
              }
              Branch {
                Points        [1395, 340]
                DstComponent  "I16"
                DstTerminal   1
              }
            }
            Connection {
              Type          Signal
              SrcComponent  "Sine Wave18"
              SrcTerminal   1
              DstComponent  "I18"
              DstTerminal   3
            }
            Connection {
              Type          Signal
              SrcComponent  "Sine Wave19"
              SrcTerminal   1
              DstComponent  "I19"
              DstTerminal   3
            }
            Connection {
              Type          Signal
              SrcComponent  "Sine Wave20"
              SrcTerminal   1
              DstComponent  "I20"
              DstTerminal   3
            }
            Connection {
              Type          Wire
              SrcComponent  "I18"
              SrcTerminal   1
              Points        [180, 555]
              Branch {
                Points        [180, 615]
                Branch {
                  DstComponent  "Ground7"
                  DstTerminal   1
                }
                Branch {
                  Points        [250, 615]
                  DstComponent  "I20"
                  DstTerminal   1
                }
              }
              Branch {
                Points        [215, 555]
                DstComponent  "I19"
                DstTerminal   1
              }
            }
          }
        }
        Component {
          Type          From
          Name          "From4"
          Show          off
          Position      [1250, 695]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "qA1"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          From
          Name          "From5"
          Show          off
          Position      [1170, 765]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "qA1_bar"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          From
          Name          "From6"
          Show          off
          Position      [1250, 840]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "qB1"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          From
          Name          "From7"
          Show          off
          Position      [1170, 940]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "qB1_bar"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          From
          Name          "From8"
          Show          off
          Position      [1250, 1035]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "qC1"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          From
          Name          "From9"
          Show          off
          Position      [1170, 1120]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "qC1_bar"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          From
          Name          "From10"
          Show          off
          Position      [1250, 715]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "qA2"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          From
          Name          "From12"
          Show          off
          Position      [1170, 785]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "qA2_bar"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          From
          Name          "From13"
          Show          off
          Position      [1250, 860]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "qB2"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          From
          Name          "From15"
          Show          off
          Position      [1170, 960]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "qB2_bar"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          From
          Name          "From16"
          Show          off
          Position      [1250, 1055]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "qC2"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          From
          Name          "From18"
          Show          off
          Position      [1170, 1140]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "qC2_bar"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Scope
          Name          "Scope7"
          Show          on
          Position      [1015, 1670]
          Direction     up
          Flipped       off
          LabelPosition south
          Frame         [-15, -15; 15, 15]
          Location      [0, 24; 1920, 1013]
          State         "AAAA/wAAAAD9AAAAAgAAAAEAAAAAAAAAAPwCAAAAA/sAAAAQAFoAb"
"wBvAG0AQQByAGUAYQAAAAAA/////wAAAC8A////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwAAAA"
"AA/////wAAAGEA////+wAAAAwAVAByAGEAYwBlAHMAAAAAAP////8AAABhAP///wAAAAMAAAAAAAA"
"AAPwBAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQAAAAAAP////8AAABEAP///wAAB4AAAAO+"
"AAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP////8AA"
"AAAAAAAAA=="
          SavedViews    "AAAAAgAAAAA="
          HeaderState   "{\"DefaultSecSize\":0,\"FirstSecSize\":150,\"Labels\""
":[],\"VisualIdxs\":[]}"
          PlotPalettes  "AAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
          Axes          "1"
          TimeRange     "0.0"
          ScrollingMode "1"
          SingleTimeAxis "1"
          Open          "0"
          Ts            "-1"
          SampleLimit   "25000"
          XAxisLabel    "Time / s"
          ShowLegend    "1"
          Axis {
            Name          ""
            AutoScale     1
            MinValue      0
            MaxValue      1
            Signals       {}
            SignalTypes   [ ]
            Untangle      0
            KeepBaseline  off
            BaselineValue 0
          }
          Fourier {
            SingleXAxis       on
            AxisLabel         "Frequency / Hz"
            Scaling           0
            PhaseDisplay      0
            ShowFourierLegend off
            Axis {
              Name          ""
              AutoScale     1
              MinValue      0
              MaxValue      1
              Signals       {}
              Untangle      0
              KeepBaseline  off
              BaselineValue 0
            }
          }
        }
        Component {
          Type          DataType
          Name          "Data Type"
          Show          on
          Position      [1060, 1600]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "DataType"
            Value         "8"
            Show          off
          }
          Parameter {
            Variable      "DataTypeOverflowMode"
            Value         "1"
            Show          off
          }
        }
        Component {
          Type          Gain
          Name          "Gain"
          Show          on
          Position      [1165, 1600]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "K"
            Value         "1/65535"
            Show          off
          }
          Parameter {
            Variable      "Multiplication"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "OutputDataType"
            Value         "11"
            Show          off
          }
          Parameter {
            Variable      "DataTypeOverflowMode"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "GainDataType"
            Value         "11"
            Show          off
          }
        }
        Component {
          Type          SignalDemux
          Name          "Demux"
          Show          off
          Position      [1230, 1600]
          Direction     right
          Flipped       on
          LabelPosition south
          Frame         [-7, -45; 2, 45]
          Parameter {
            Variable      "Width"
            Value         "3"
            Show          off
          }
        }
        Component {
          Type          SignalMux
          Name          "Mux9"
          Show          off
          Position      [1345, 1590]
          Direction     right
          Flipped       off
          LabelPosition south
          Frame         [-2, -170; 7, 170]
          Parameter {
            Variable      "Width"
            Value         "12"
            Show          off
          }
        }
        Component {
          Type          SignalDemux
          Name          "Demux1"
          Show          off
          Position      [1685, 1590]
          Direction     right
          Flipped       on
          LabelPosition south
          Frame         [-7, -280; 2, 280]
          Parameter {
            Variable      "Width"
            Value         "12"
            Show          off
          }
        }
        Component {
          Type          Goto
          Name          "Goto"
          Show          off
          Position      [1780, 1315]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "qA1"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Goto
          Name          "Goto4"
          Show          off
          Position      [1780, 1365]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "qA2"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Sum
          Name          "Sum1"
          Show          off
          Position      [2015, 1395]
          Direction     up
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "IconShape"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "Inputs"
            Value         "+-"
            Show          off
          }
          Parameter {
            Variable      "DataType"
            Value         "11"
            Show          off
          }
          Parameter {
            Variable      "DataTypeOverflowMode"
            Value         "1"
            Show          off
          }
        }
        Component {
          Type          Constant
          Name          "Constant"
          Show          on
          Position      [1930, 1390]
          Direction     right
          Flipped       off
          LabelPosition south
          Frame         [-10, -10; 10, 10]
          Parameter {
            Variable      "Value"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "DataType"
            Value         "10"
            Show          off
          }
        }
        Component {
          Type          From
          Name          "From"
          Show          off
          Position      [1955, 1440]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "qA1"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Goto
          Name          "Goto9"
          Show          off
          Position      [2080, 1395]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "qA1_bar"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Sum
          Name          "Sum2"
          Show          off
          Position      [2015, 1495]
          Direction     up
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "IconShape"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "Inputs"
            Value         "+-"
            Show          off
          }
          Parameter {
            Variable      "DataType"
            Value         "11"
            Show          off
          }
          Parameter {
            Variable      "DataTypeOverflowMode"
            Value         "1"
            Show          off
          }
        }
        Component {
          Type          Constant
          Name          "Constant1"
          Show          on
          Position      [1930, 1490]
          Direction     right
          Flipped       off
          LabelPosition south
          Frame         [-10, -10; 10, 10]
          Parameter {
            Variable      "Value"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "DataType"
            Value         "10"
            Show          off
          }
        }
        Component {
          Type          From
          Name          "From1"
          Show          off
          Position      [1955, 1540]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "qA2"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Goto
          Name          "Goto10"
          Show          off
          Position      [2080, 1495]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "qA2_bar"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Sum
          Name          "Sum3"
          Show          off
          Position      [2015, 1605]
          Direction     up
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "IconShape"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "Inputs"
            Value         "+-"
            Show          off
          }
          Parameter {
            Variable      "DataType"
            Value         "11"
            Show          off
          }
          Parameter {
            Variable      "DataTypeOverflowMode"
            Value         "1"
            Show          off
          }
        }
        Component {
          Type          Constant
          Name          "Constant2"
          Show          on
          Position      [1930, 1600]
          Direction     right
          Flipped       off
          LabelPosition south
          Frame         [-10, -10; 10, 10]
          Parameter {
            Variable      "Value"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "DataType"
            Value         "10"
            Show          off
          }
        }
        Component {
          Type          From
          Name          "From2"
          Show          off
          Position      [1955, 1650]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "qB1"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Goto
          Name          "Goto14"
          Show          off
          Position      [2080, 1605]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "qB1_bar"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Sum
          Name          "Sum4"
          Show          off
          Position      [2015, 1720]
          Direction     up
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "IconShape"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "Inputs"
            Value         "+-"
            Show          off
          }
          Parameter {
            Variable      "DataType"
            Value         "11"
            Show          off
          }
          Parameter {
            Variable      "DataTypeOverflowMode"
            Value         "1"
            Show          off
          }
        }
        Component {
          Type          Constant
          Name          "Constant3"
          Show          on
          Position      [1930, 1715]
          Direction     right
          Flipped       off
          LabelPosition south
          Frame         [-10, -10; 10, 10]
          Parameter {
            Variable      "Value"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "DataType"
            Value         "10"
            Show          off
          }
        }
        Component {
          Type          From
          Name          "From3"
          Show          off
          Position      [1955, 1765]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "qB2"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Goto
          Name          "Goto15"
          Show          off
          Position      [2080, 1720]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "qB2_bar"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Sum
          Name          "Sum5"
          Show          off
          Position      [2015, 1830]
          Direction     up
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "IconShape"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "Inputs"
            Value         "+-"
            Show          off
          }
          Parameter {
            Variable      "DataType"
            Value         "11"
            Show          off
          }
          Parameter {
            Variable      "DataTypeOverflowMode"
            Value         "1"
            Show          off
          }
        }
        Component {
          Type          Constant
          Name          "Constant4"
          Show          on
          Position      [1930, 1825]
          Direction     right
          Flipped       off
          LabelPosition south
          Frame         [-10, -10; 10, 10]
          Parameter {
            Variable      "Value"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "DataType"
            Value         "10"
            Show          off
          }
        }
        Component {
          Type          From
          Name          "From11"
          Show          off
          Position      [1955, 1875]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "qC1"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Goto
          Name          "Goto20"
          Show          off
          Position      [2080, 1830]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "qC1_bar"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Sum
          Name          "Sum8"
          Show          off
          Position      [2015, 1945]
          Direction     up
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "IconShape"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "Inputs"
            Value         "+-"
            Show          off
          }
          Parameter {
            Variable      "DataType"
            Value         "11"
            Show          off
          }
          Parameter {
            Variable      "DataTypeOverflowMode"
            Value         "1"
            Show          off
          }
        }
        Component {
          Type          Constant
          Name          "Constant5"
          Show          on
          Position      [1930, 1940]
          Direction     right
          Flipped       off
          LabelPosition south
          Frame         [-10, -10; 10, 10]
          Parameter {
            Variable      "Value"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "DataType"
            Value         "10"
            Show          off
          }
        }
        Component {
          Type          From
          Name          "From14"
          Show          off
          Position      [1955, 1990]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "qC2"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Goto
          Name          "Goto21"
          Show          off
          Position      [2080, 1945]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "qC2_bar"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Scope
          Name          "Scope8"
          Show          on
          Position      [1165, 1520]
          Direction     up
          Flipped       off
          LabelPosition south
          Frame         [-15, -15; 15, 15]
          Location      [0, 24; 1920, 1013]
          State         "AAAA/wAAAAD9AAAAAgAAAAEAAAAAAAAAAPwCAAAAA/sAAAAQAFoAb"
"wBvAG0AQQByAGUAYQAAAAAA/////wAAAC8A////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwAAAA"
"AA/////wAAAGEA////+wAAAAwAVAByAGEAYwBlAHMAAAAAAP////8AAABhAP///wAAAAMAAAAAAAA"
"AAPwBAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQAAAAAAP////8AAABEAP///wAAB4AAAAO+"
"AAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP////8AA"
"AAAAAAAAA=="
          SavedViews    "AAAAAgAAAAA="
          HeaderState   "{\"DefaultSecSize\":0,\"FirstSecSize\":127,\"Labels\""
":[],\"VisualIdxs\":[]}"
          PlotPalettes  "AAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
          Axes          "1"
          TimeRange     "0.0"
          ScrollingMode "1"
          SingleTimeAxis "1"
          Open          "0"
          Ts            "-1"
          SampleLimit   "25000"
          XAxisLabel    "Time / s"
          ShowLegend    "1"
          Axis {
            Name          ""
            AutoScale     1
            MinValue      0
            MaxValue      1
            Signals       {}
            SignalTypes   [ ]
            Untangle      0
            KeepBaseline  off
            BaselineValue 0
          }
          Fourier {
            SingleXAxis       on
            AxisLabel         "Frequency / Hz"
            Scaling           0
            PhaseDisplay      0
            ShowFourierLegend off
            Axis {
              Name          ""
              AutoScale     1
              MinValue      0
              MaxValue      1
              Signals       {}
              Untangle      0
              KeepBaseline  off
              BaselineValue 0
            }
          }
        }
        Component {
          Type          Scope
          Name          "Scope10"
          Show          on
          Position      [1635, 1405]
          Direction     up
          Flipped       off
          LabelPosition south
          Frame         [-15, -15; 15, 15]
          Location      [0, 24; 1920, 1013]
          State         "AAAA/wAAAAD9AAAAAgAAAAEAAAAAAAAAAPwCAAAAA/sAAAAQAFoAb"
"wBvAG0AQQByAGUAYQAAAAAA/////wAAAC8A////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwAAAA"
"AA/////wAAAGEA////+wAAAAwAVAByAGEAYwBlAHMAAAAAAP////8AAABhAP///wAAAAMAAAeAAAA"
"ArfwBAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQBAAAAAAAAB4AAAABEAP///wAAB4AAAAML"
"AAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP////8AA"
"AAAAAAAAA=="
          SavedViews    "AAAAAgAAAAA="
          HeaderState   "{\"DefaultSecSize\":0,\"FirstSecSize\":154,\"Labels\""
":[],\"VisualIdxs\":[]}"
          PlotPalettes  "AAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
          Axes          "1"
          TimeRange     "0.0"
          ScrollingMode "1"
          SingleTimeAxis "1"
          Open          "0"
          Ts            "-1"
          SampleLimit   "25000"
          XAxisLabel    "Time / s"
          ShowLegend    "1"
          Axis {
            Name          ""
            AutoScale     1
            MinValue      0
            MaxValue      1
            Signals       {}
            SignalTypes   [ ]
            Untangle      0
            KeepBaseline  off
            BaselineValue 0
          }
          Fourier {
            SingleXAxis       on
            AxisLabel         "Frequency / Hz"
            Scaling           0
            PhaseDisplay      0
            ShowFourierLegend off
            Axis {
              Name          ""
              AutoScale     1
              MinValue      0
              MaxValue      1
              Signals       {}
              Untangle      0
              KeepBaseline  off
              BaselineValue 0
            }
          }
        }
        Component {
          Type          Scope
          Name          "Scope12"
          Show          on
          Position      [2080, 1340]
          Direction     up
          Flipped       off
          LabelPosition south
          Frame         [-15, -15; 15, 15]
          Location      [0, 24; 1920, 1013]
          State         "AAAA/wAAAAD9AAAAAgAAAAEAAAAAAAAAAPwCAAAAA/sAAAAQAFoAb"
"wBvAG0AQQByAGUAYQAAAAAA/////wAAAC8A////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwAAAA"
"AA/////wAAAGEA////+wAAAAwAVAByAGEAYwBlAHMAAAAAAP////8AAABhAP///wAAAAMAAAAAAAA"
"AAPwBAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQAAAAAAP////8AAABEAP///wAAB4AAAAO+"
"AAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP////8AA"
"AAAAAAAAA=="
          SavedViews    "AAAAAgAAAAA="
          HeaderState   "{\"DefaultSecSize\":0,\"FirstSecSize\":154,\"Labels\""
":[],\"VisualIdxs\":[]}"
          PlotPalettes  "AAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
          Axes          "1"
          TimeRange     "0.0"
          ScrollingMode "1"
          SingleTimeAxis "1"
          Open          "0"
          Ts            "-1"
          SampleLimit   "25000"
          XAxisLabel    "Time / s"
          ShowLegend    "1"
          Axis {
            Name          ""
            AutoScale     1
            MinValue      0
            MaxValue      1
            Signals       {}
            SignalTypes   [ ]
            Untangle      0
            KeepBaseline  off
            BaselineValue 0
          }
          Fourier {
            SingleXAxis       on
            AxisLabel         "Frequency / Hz"
            Scaling           0
            PhaseDisplay      0
            ShowFourierLegend off
            Axis {
              Name          ""
              AutoScale     1
              MinValue      0
              MaxValue      1
              Signals       {}
              Untangle      0
              KeepBaseline  off
              BaselineValue 0
            }
          }
        }
        Component {
          Type          Reference
          SrcComponent  "PLECSRTBoxLib/SPI Peripheral"
          Name          "SPI Peripheral1"
          Show          on
          Position      [920, 1600]
          Direction     up
          Flipped       off
          LabelPosition south
          Frame         [-30, -30; 30, 30]
          Parameter {
            Variable      "moduleID"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "fClock"
            Value         "5e6"
            Show          off
          }
          Parameter {
            Variable      "spiMode"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "wordSize"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "bitOrder"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "useClockOutput"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "numChannels"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "numWords"
            Value         "3"
            Show          off
          }
          Parameter {
            Variable      "offlineSimulation"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "sampleTime"
            Value         "Ts_plant"
            Show          off
          }
          Parameter {
            Variable      "clkInChannel"
            Value         "0"
            Show          off
          }
          Parameter {
            Variable      "csInChannel"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "dataInChannel"
            Value         "[2]"
            Show          off
          }
          Parameter {
            Variable      "clkOutChannel"
            Value         "0"
            Show          off
          }
          Parameter {
            Variable      "dataOutChannel"
            Value         "10"
            Show          off
          }
          Parameter {
            Variable      "TargetPortIndices"
            Value         "2 3 4 5 6 7 8 9 10"
            Show          off
          }
          Terminal {
            Type          Input
            Position      [-30, 0]
            Direction     left
          }
          Terminal {
            Type          Output
            Position      [34, 0]
            Direction     right
          }
          Terminal {
            Type          Input
            Position      [-30, 10]
            Direction     left
          }
          Terminal {
            Type          Input
            Position      [-30, 20]
            Direction     left
          }
          Terminal {
            Type          Input
            Position      [-30, 30]
            Direction     left
          }
          Terminal {
            Type          Output
            Position      [34, 10]
            Direction     right
          }
          Terminal {
            Type          Output
            Position      [34, 20]
            Direction     right
          }
          Terminal {
            Type          Output
            Position      [34, 30]
            Direction     right
          }
          Terminal {
            Type          Output
            Position      [34, 20]
            Direction     right
          }
        }
        Component {
          Type          Reference
          SrcComponent  "PLECSRTBoxLib/Analog Out1"
          Name          "Analog Out 0-3"
          Show          on
          Position      [2140, 195]
          Direction     up
          Flipped       off
          LabelPosition south
          Frame         [-25, -20; 25, 20]
          Parameter {
            Variable      "channel"
            Value         "[0:2]"
            Show          off
          }
          Parameter {
            Variable      "scale"
            Value         "3.3/(15e4)"
            Show          off
          }
          Parameter {
            Variable      "offset"
            Value         "3.3/2"
            Show          off
          }
          Parameter {
            Variable      "minOutput"
            Value         "0"
            Show          off
          }
          Parameter {
            Variable      "maxOutput"
            Value         "3.3"
            Show          off
          }
          Parameter {
            Variable      "TargetPortIndices"
            Value         "11"
            Show          off
          }
          Terminal {
            Type          Input
            Position      [-25, 0]
            Direction     left
          }
        }
        Component {
          Type          Reference
          SrcComponent  "PLECSRTBoxLib/Analog Out1"
          Name          "Analog Out 3-6"
          Show          on
          Position      [2140, 355]
          Direction     up
          Flipped       off
          LabelPosition south
          Frame         [-25, -20; 25, 20]
          Parameter {
            Variable      "channel"
            Value         "[3:5]"
            Show          off
          }
          Parameter {
            Variable      "scale"
            Value         "3.3/7000"
            Show          off
          }
          Parameter {
            Variable      "offset"
            Value         "3.3/2"
            Show          off
          }
          Parameter {
            Variable      "minOutput"
            Value         "0"
            Show          off
          }
          Parameter {
            Variable      "maxOutput"
            Value         "3.3"
            Show          off
          }
          Parameter {
            Variable      "TargetPortIndices"
            Value         "12"
            Show          off
          }
          Terminal {
            Type          Input
            Position      [-25, 0]
            Direction     left
          }
        }
        Component {
          Type          Reference
          SrcComponent  "PLECSRTBoxLib/Analog Out1"
          Name          "Analog Out 689"
          Show          on
          Position      [2450, 785]
          Direction     up
          Flipped       off
          LabelPosition south
          Frame         [-25, -20; 25, 20]
          Parameter {
            Variable      "channel"
            Value         "[6 8 9]"
            Show          off
          }
          Parameter {
            Variable      "scale"
            Value         "3.3/20000"
            Show          off
          }
          Parameter {
            Variable      "offset"
            Value         "3.3/2"
            Show          off
          }
          Parameter {
            Variable      "minOutput"
            Value         "0"
            Show          off
          }
          Parameter {
            Variable      "maxOutput"
            Value         "3.3"
            Show          off
          }
          Parameter {
            Variable      "TargetPortIndices"
            Value         "13"
            Show          off
          }
          Terminal {
            Type          Input
            Position      [-25, 0]
            Direction     left
          }
        }
        Component {
          Type          Reference
          SrcComponent  "PLECSRTBoxLib/Analog Out1"
          Name          "Analog Out 10-12"
          Show          on
          Position      [2980, 1045]
          Direction     up
          Flipped       off
          LabelPosition south
          Frame         [-25, -20; 25, 20]
          Parameter {
            Variable      "channel"
            Value         "[10:12]"
            Show          off
          }
          Parameter {
            Variable      "scale"
            Value         "3.3/70000"
            Show          off
          }
          Parameter {
            Variable      "offset"
            Value         "0"
            Show          off
          }
          Parameter {
            Variable      "minOutput"
            Value         "0"
            Show          off
          }
          Parameter {
            Variable      "maxOutput"
            Value         "3.3"
            Show          off
          }
          Parameter {
            Variable      "TargetPortIndices"
            Value         "14"
            Show          off
          }
          Terminal {
            Type          Input
            Position      [-25, 0]
            Direction     left
          }
        }
        Component {
          Type          TargetCode
          Name          "PWM Out1"
          Show          on
          Position      [1485, 1590]
          Direction     up
          Flipped       off
          LabelPosition south
          Frame         [-25, -20; 25, 20]
          TargetPortIndices "15"
          SampleTime    "0"
          EnforceBaseTask "1"
          CodeFcnLang   "2"
          CodeFcn       "if not string.find(Target.Family, \"PLECS RT Box\") t"
"hen\n"
"  return \"This block can only be used with a PLECS RT Box target.\"\n"
"end\n"
"\n"
"local block = Target.Coder.CreateTargetBlock(\"PWMGen\")\n"
"\n"
"if Block.Mask.sync == 1 then\n"
"  local pwmFrequency = Block.Mask.fc\n"
"  local ratio = pwmFrequency * Block.SampleTime[1]\n"
"  local ratioFrac = ratio - math.floor(ratio+0.0001)\n"
"\n"
"  if ratioFrac > 0.0001 then\n"
"    return 'If \"Synchronization with model step\" is enabled, the discretiza"
"tion step time (%g) must be an integer multiple of the PWM period (%g).' % \n"
"      { Block.SampleTime[1], 1/pwmFrequency }\n"
"  end\n"
"end\n"
"\n"
"local freq_pu = 1\n"
"local phase = Block.Mask.shft_pu\n"
"\n"
"return block:getDirectFeedthroughCode(true, freq_pu, phase)\n"
          MaskType      "PWM Out"
          MaskDescription "Generate a configurable PWM signal on a digital out"
"put."
          MaskHelp      "qthelp://com.plexim.rtbox.1.0/doc/component-reference"
"/pwmout_rtbox.html"
          MaskDisplay   "Icon:text(0, 0, 'PWM\\nOut')\n"
"local status, IconLib = pcall (require, 'IconLib' )\n"
"if not status then\n"
"\treturn\n"
"end\n"
"\n"
"IconLib.drawPatch()"
          MaskDisplayLang "2"
          MaskIconFrame on
          MaskIconOpaque off
          MaskIconRotates off
          MaskInit      "targetSettings = plecs('get', '.', 'CompiledCodeGenTa"
"rget');\n"
"\n"
"sys_clk = 0;\n"
"if isfield(targetSettings, 'Family') && ...\n"
"  strcmp(targetSettings.Family, 'PLECS RT Box') && ...\n"
"  isfield(targetSettings, 'Variables') && ...\n"
"  isfield(targetSettings.Variables, 'pwmClkPeriod'),\n"
"  sys_clk = targetSettings.Variables.pwmClkPeriod;\n"
"elseif isfield(targetSettings, 'OriginalTarget') && ...\n"
"  isfield(targetSettings.OriginalTarget, 'Family') && ...\n"
"  strcmp(targetSettings.OriginalTarget.Family, 'PLECS RT Box') && ...\n"
"  isfield(targetSettings.OriginalTarget, 'Variables') && ...\n"
"  isfield(targetSettings.OriginalTarget.Variables, 'pwmClkPeriod'),\n"
"  sys_clk = targetSettings.OriginalTarget.Variables.pwmClkPeriod;\n"
"end\n"
"\n"
"if sys_clk <= 0,\n"
"  codeGenSystem = plecs('get', '.', 'ParentCodeGenSystem');\n"
"  msg = sprintf('The target ''%s'' used by the Code Generation Subsystem @2 d"
"oes not support PWM Out blocks.\\n\\nPlease choose a ''PLECS RT Box'' @param:"
"CodeGenTarget:2: in the Code Generation Subsystem @1.', targetSettings.Name);"
"\n"
"  plecs('error', msg, codeGenSystem);\n"
"  return;\n"
"end\n"
"\n"
"if fc > 6.65e6\n"
"\tplecs('error', 'Parameter @param:fc: is higer than 6.65 MHz. This will resu"
"lt in resolution lower than 20 clock cycles per carrier period, please reduce"
" the carrier frequency.')\n"
"end\n"
"\n"
"if fc < 0.06\n"
"\tplecs('error', 'Parameter @param:fc: is lower than 0.06 Hz, please use \"Di"
"gital Out\" to generate low frequency PWM.')\n"
"end\n"
"\n"
"if any(shft_pu < 0) || any(shft_pu > 1)\n"
"\tplecs('error', 'Parameter @param:shft_pu: must be between 0 and 1.')\n"
"end\n"
"\n"
"if any(delay_sec > (1/fc))\n"
"\tplecs('error', ['Parameter @param:delay_sec: must not be larger than the ca"
"rrier period ' num2str(1/fc) 's.'])\n"
"end\n"
"\n"
"if any((safe_state ~= 0) & (safe_state ~= 1))\n"
"\tplecs('error', 'Parameter @param:safe_state: must be 0 or 1.')\n"
"end\n"
"\n"
"width = numel(channel);\n"
"if numel(limits) ~= 2,\n"
"  plecs('error', 'Parameter @param:limits: must be a vecor with two elements."
"');\n"
"end\n"
"\n"
"delay_sec = plVectorize(delay_sec, channel);\n"
"if any((polar ~= 0) & (polar ~= 1))\n"
"\tplecs('error', 'Parameter @param:polar: must be 0 or 1.');\n"
"end\n"
"if any((active_polarity ~= 0) & (active_polarity ~= 1))\n"
"\tplecs('error', 'Parameter @param:active_polarity: must be 0 or 1.');\n"
"end\n"
"shft_pu = plVectorize(shft_pu, channel);\n"
"polar = plVectorize(polar, channel);\n"
"active_polarity = plVectorize(active_polarity, channel);\n"
"safe_state = plVectorize(safe_state, channel);\n"
"\n"
"num_prd_ticks = round(1/ (fc * sys_clk));\n"
"num_bin_digits = floor(log(num_prd_ticks)/log(2)) + 1;\n"
"if num_bin_digits > 16,\n"
"   prscl = num_bin_digits - 16;\n"
"else\n"
"   prscl = 0;\n"
"end\n"
"prd = round(1/ (fc * sys_clk * 2^prscl));\n"
"if(type==1), \n"
"   gain = (prd-0.5) / (limits(2)-limits(1));\n"
"else\n"
"   gain = (prd-1)/2/ (limits(2)-limits(1));\n"
"end\n"
"\n"
"min = 0;\n"
"shft = round(shft_pu * prd);\n"
"\n"
"limit_delta = limits(2)-limits(1);\n"
"offset = -limits(1);\n"
"gain_offline = 1/type/limit_delta;\n"
"\n"
"type = type - 1;\n"
"update = update - 1;\n"
"sync = sync - 1;\n"
"\n"
"polar = bitxor(polar, active_polarity);\n"
"safe_state = bitxor(safe_state, not(active_polarity));\n"
"\n"
"pspMessage = sprintf('\\n\\nCannot find a Powerstage Protection block configu"
"red for \"Unit %i\" as specified by the parameter @param:pspUnit: of this PWM"
" Out block. Please specify an existing unit or select \"None\" to avoid this "
"warning.\\n\\nProtection will be disabled for this block.', pspUnit);\n"
          MaskDialogCallback "-- backwards compatibility\n"
"Dialog:set('behavior', 'Visible', false)\n"
"\n"
"Block:showTerminal('ADC', Dialog:get('trig')~='0')\n"
"if Dialog:get('trig')~='0' then\n"
"  Block:set('Frame', {-35, -20, 70, 40})\n"
"  Block:moveTerminal('In1', -35,0)\n"
"else\n"
"  Block:set('Frame', {-25, -20, 50, 40})\n"
"  Block:moveTerminal('In1', -25,0)\n"
"end"
          Parameter {
            Variable      "channel"
            Prompt        "Digital output channel(s)"
            Type          FreeText
            Constraints   "integer,nonEmpty,nonNegative,vector"
            Value         "[0 1 2 3 4 5 6 7 8 9 10 11]"
            Show          off
            Tunable       off
            TabName       "General"
          }
          Parameter {
            Variable      "type"
            Prompt        "Carrier type"
            Type          FixedText
            PossibleValues {"Sawtooth", "Symmetrical"}
            Value         "2"
            Show          off
            Tunable       off
            TabName       "General"
          }
          Parameter {
            Variable      "fc"
            Prompt        "Carrier frequency [Hz]"
            Type          FreeText
            Constraints   "finite,positive,scalar"
            Value         "5e3"
            Show          off
            Tunable       off
            TabName       "General"
          }
          Parameter {
            Variable      "shft_pu"
            Prompt        "Carrier phase shift [p.u.]"
            Type          FreeText
            Constraints   "finite,nonEmpty,vector"
            Value         "[0 0.25 0.5 0.75 0 0.25 0.5 0.75 0 0.25 0.5 0.75]"
            Show          off
            Tunable       off
            TabName       "General"
          }
          Parameter {
            Variable      "limits"
            Prompt        "Carrier limits"
            Type          FreeText
            Constraints   "finite,nonEmpty,vector"
            Value         "[0 1]"
            Show          off
            Tunable       off
            TabName       "General"
          }
          Parameter {
            Variable      "delay_sec"
            Prompt        "Turn-on delay [s]"
            Type          FreeText
            Constraints   "finite,nonNegative,scalar"
            Value         "0"
            Show          off
            Tunable       off
            TabName       "General"
          }
          Parameter {
            Variable      "polar"
            Prompt        "Polarity (output when input > carrier)"
            Type          FreeText
            Constraints   "integer,nonEmpty,nonNegative,vector"
            Value         "1"
            Show          off
            Tunable       off
            TabName       "General"
          }
          Parameter {
            Variable      "update"
            Prompt        "Update"
            Type          FixedText
            PossibleValues {"On carrier minimum", "Immediately", "On carrier m"
"aximum", "On carrier minimum/maximum"}
            Value         "4"
            Show          off
            Tunable       off
            TabName       "General"
          }
          Parameter {
            Variable      "sync"
            Prompt        "Synchronization with model step"
            Type          FixedText
            PossibleValues {"Disabled", "Enabled"}
            Value         "2"
            Show          off
            Tunable       off
            TabName       "General"
          }
          Parameter {
            Variable      "behavior"
            Prompt        "Offline behavior"
            Type          FixedText
            PossibleValues {"RT Box 1", "RT Box 2/3"}
            Value         "2"
            Show          off
            Tunable       off
            TabName       "General"
          }
          Parameter {
            Variable      "safe_state"
            Prompt        "Safe state"
            Type          FreeText
            Constraints   "integer,nonEmpty,nonNegative,vector"
            Value         "0"
            Show          off
            Tunable       off
            TabName       "Protection"
          }
          Parameter {
            Variable      "pspUnit"
            Prompt        "Powerstage protection unit"
            Type          FixedText
            PossibleValues {"None" = 0, "Unit 1" = 1, "Unit 2" = 2, "Unit 3" = 3, ""
"Unit 4" = 4}
            Value         "0"
            Show          off
            Tunable       off
            TabName       "Protection"
          }
          Parameter {
            Variable      "active_polarity"
            Prompt        "Active polarity for turn-on delay"
            Type          FreeText
            Constraints   "integer,nonEmpty,nonNegative,vector"
            Value         "1"
            Show          off
            Tunable       off
            TabName       "Advanced"
          }
          Parameter {
            Variable      "trig"
            Prompt        "ADC trigger output"
            Type          FixedText
            PossibleValues {"Disabled" = 0, "On carrier minimum" = 1, "On carr"
"ier maximum" = 2, "On carrier minimum/maximum" = 3}
            Value         "0"
            Show          off
            Tunable       off
            TabName       "Advanced"
          }
          Terminal {
            Type          Input
            Position      [-25, 0]
            Direction     left
          }
          Terminal {
            Type          EventOutput
            Position      [39, 0]
            Direction     right
          }
          Schematic {
            Location      [994, 277; 2242, 1189]
            ZoomFactor    1
            SliderPosition [0, 0]
            ShowBrowser   off
            BrowserWidth  100
            Component {
              Type          TargetOutput
              Name          "1"
              Show          on
              Position      [395, 125]
              Direction     right
              Flipped       off
              LabelPosition south
              Parameter {
                Variable      "Width"
                Value         "numel(channel)"
                Show          off
              }
            }
            Component {
              Type          Input
              Name          "In1"
              Show          off
              Position      [60, 80]
              Direction     right
              Flipped       off
              LabelPosition south
              Parameter {
                Variable      "Index"
                Value         "1"
                Show          on
              }
              Parameter {
                Variable      "InitialOutput"
                Value         "[]"
                Show          off
              }
              Parameter {
                Variable      "HasDirectFeedthrough"
                Value         "2"
                Show          off
              }
              Parameter {
                Variable      "DataType"
                Value         "11"
                Show          off
              }
              Parameter {
                Variable      "DataTypeOverflowMode"
                Value         "1"
                Show          off
              }
              Parameter {
                Variable      "Width"
                Value         "numel(channel)"
                Show          off
              }
            }
            Component {
              Type          Constant
              Name          "Constant4"
              Show          off
              Position      [60, 120]
              Direction     right
              Flipped       off
              LabelPosition south
              Frame         [-10, -10; 10, 10]
              Parameter {
                Variable      "Value"
                Value         "1"
                Show          off
              }
              Parameter {
                Variable      "DataType"
                Value         "10"
                Show          off
              }
            }
            Component {
              Type          Constant
              Name          "Constant5"
              Show          off
              Position      [60, 160]
              Direction     right
              Flipped       off
              LabelPosition south
              Frame         [-10, -10; 10, 10]
              Parameter {
                Variable      "Value"
                Value         "shft_pu"
                Show          off
              }
              Parameter {
                Variable      "DataType"
                Value         "10"
                Show          off
              }
            }
            Component {
              Type          Subsystem
              Name          "PWM"
              Show          on
              Position      [120, 125]
              Direction     up
              Flipped       off
              LabelPosition south
              Frame         [-20, -25; 20, 25]
              SampleTime    "-1"
              CodeGenDiscretizationMethod "2"
              CodeGenTarget "Generic"
              MaskIconFrame on
              MaskIconOpaque off
              MaskIconRotates on
              MaskInit      "width = numel(channel);\n"
              Parameter {
                Variable      "channel"
                Prompt        "channel"
                Type          FreeText
                Value         "channel"
                Show          off
                Tunable       off
                TabName       ""
              }
              Parameter {
                Variable      "type"
                Prompt        "type"
                Type          FreeText
                Value         "type"
                Show          off
                Tunable       off
                TabName       ""
              }
              Parameter {
                Variable      "fc"
                Prompt        "fc"
                Type          FreeText
                Value         "fc"
                Show          off
                Tunable       off
                TabName       ""
              }
              Parameter {
                Variable      "delay_sec"
                Prompt        "delay_sec"
                Type          FreeText
                Value         "delay_sec"
                Show          off
                Tunable       off
                TabName       ""
              }
              Parameter {
                Variable      "polar"
                Prompt        "polar"
                Type          FreeText
                Value         "polar"
                Show          off
                Tunable       off
                TabName       ""
              }
              Parameter {
                Variable      "update"
                Prompt        "update"
                Type          FreeText
                Value         "update"
                Show          off
                Tunable       off
                TabName       ""
              }
              Parameter {
                Variable      "gain_offline"
                Prompt        "gain_offline"
                Type          FreeText
                Value         "gain_offline"
                Show          off
                Tunable       off
                TabName       ""
              }
              Parameter {
                Variable      "offset"
                Prompt        "offset"
                Type          FreeText
                Value         "offset"
                Show          off
                Tunable       off
                TabName       ""
              }
              Parameter {
                Variable      "sync"
                Prompt        "sync"
                Type          FreeText
                Value         "sync"
                Show          off
                Tunable       off
                TabName       ""
              }
              Parameter {
                Variable      "sys_clk"
                Prompt        "sys_clk"
                Type          FreeText
                Value         "sys_clk"
                Show          off
                Tunable       off
                TabName       ""
              }
              Parameter {
                Variable      "prd"
                Prompt        "prd"
                Type          FreeText
                Value         "prd"
                Show          off
                Tunable       off
                TabName       ""
              }
              Parameter {
                Variable      "prscl"
                Prompt        "prscl"
                Type          FreeText
                Value         "prscl"
                Show          off
                Tunable       off
                TabName       ""
              }
              Parameter {
                Variable      "use_rel_phase"
                Prompt        "use_rel_phase"
                Type          FreeText
                Value         "0"
                Show          off
                Tunable       off
                TabName       ""
              }
              Parameter {
                Variable      "active_polarity"
                Prompt        "active_polarity"
                Type          FreeText
                Value         "active_polarity"
                Show          off
                Tunable       off
                TabName       ""
              }
              Parameter {
                Variable      "trig"
                Prompt        "ADC trigger output"
                Type          FreeText
                Value         "trig"
                Show          off
                Tunable       off
                TabName       ""
              }
              Terminal {
                Type          Output
                Position      [24, -5]
                Direction     right
              }
              Terminal {
                Type          Input
                Position      [-20, 5]
                Direction     left
              }
              Terminal {
                Type          Input
                Position      [-20, -5]
                Direction     left
              }
              Terminal {
                Type          Input
                Position      [-20, -15]
                Direction     left
              }
              Terminal {
                Type          Input
                Position      [-20, 15]
                Direction     left
              }
              Terminal {
                Type          Output
                Position      [24, 15]
                Direction     right
              }
              Schematic {
                Location      [1172, 504; 2172, 1096]
                ZoomFactor    1
                SliderPosition [0, 0]
                ShowBrowser   off
                BrowserWidth  100
                Component {
                  Type          Product
                  Name          "Divide"
                  Show          off
                  Position      [145, 155]
                  Direction     up
                  Flipped       on
                  LabelPosition north
                  Parameter {
                    Variable      "IconShape"
                    Value         "1"
                    Show          off
                  }
                  Parameter {
                    Variable      "Inputs"
                    Value         "*/"
                    Show          off
                  }
                  Parameter {
                    Variable      "DataType"
                    Value         "11"
                    Show          off
                  }
                  Parameter {
                    Variable      "DataTypeOverflowMode"
                    Value         "1"
                    Show          off
                  }
                }
                Component {
                  Type          Constant
                  Name          "Constant3"
                  Show          off
                  Position      [90, 170]
                  Direction     right
                  Flipped       off
                  LabelPosition south
                  Frame         [-10, -10; 10, 10]
                  Parameter {
                    Variable      "Value"
                    Value         "prd"
                    Show          off
                  }
                  Parameter {
                    Variable      "DataType"
                    Value         "10"
                    Show          off
                  }
                }
                Component {
                  Type          Sum
                  Name          "Sum"
                  Show          off
                  Position      [100, 110]
                  Direction     up
                  Flipped       on
                  LabelPosition north
                  Parameter {
                    Variable      "IconShape"
                    Value         "2"
                    Show          off
                  }
                  Parameter {
                    Variable      "Inputs"
                    Value         "|++"
                    Show          off
                  }
                  Parameter {
                    Variable      "DataType"
                    Value         "11"
                    Show          off
                  }
                  Parameter {
                    Variable      "DataTypeOverflowMode"
                    Value         "1"
                    Show          off
                  }
                }
                Component {
                  Type          Constant
                  Name          "Constant"
                  Show          off
                  Position      [80, 80]
                  Direction     left
                  Flipped       on
                  LabelPosition north
                  Frame         [-10, -10; 10, 10]
                  Parameter {
                    Variable      "Value"
                    Value         "offset"
                    Show          off
                  }
                  Parameter {
                    Variable      "DataType"
                    Value         "10"
                    Show          off
                  }
                }
                Component {
                  Type          Gain
                  Name          "Gain1"
                  Show          off
                  Position      [145, 110]
                  Direction     right
                  Flipped       off
                  LabelPosition south
                  Parameter {
                    Variable      "K"
                    Value         "gain_offline"
                    Show          off
                  }
                  Parameter {
                    Variable      "Multiplication"
                    Value         "1"
                    Show          off
                  }
                  Parameter {
                    Variable      "OutputDataType"
                    Value         "11"
                    Show          off
                  }
                  Parameter {
                    Variable      "DataTypeOverflowMode"
                    Value         "1"
                    Show          off
                  }
                  Parameter {
                    Variable      "GainDataType"
                    Value         "11"
                    Show          off
                  }
                }
                Component {
                  Type          Product
                  Name          "Product2"
                  Show          off
                  Position      [250, 115]
                  Direction     up
                  Flipped       on
                  LabelPosition north
                  Parameter {
                    Variable      "IconShape"
                    Value         "1"
                    Show          off
                  }
                  Parameter {
                    Variable      "Inputs"
                    Value         "2"
                    Show          off
                  }
                  Parameter {
                    Variable      "DataType"
                    Value         "11"
                    Show          off
                  }
                  Parameter {
                    Variable      "DataTypeOverflowMode"
                    Value         "1"
                    Show          off
                  }
                }
                Component {
                  Type          ConfigurableSubsystem
                  Name          "Configurable\nSubsystem"
                  Show          off
                  Position      [305, 115]
                  Direction     up
                  Flipped       on
                  LabelPosition north
                  Frame         [-20, -10; 20, 10]
                  SampleTime    "-1"
                  CodeGenDiscretizationMethod "2"
                  CodeGenTarget "Generic"
                  MaskIconFrame on
                  MaskIconOpaque off
                  MaskIconRotates on
                  Terminal {
                    Type          Input
                    Position      [-20, 0]
                    Direction     left
                  }
                  Terminal {
                    Type          Output
                    Position      [24, 0]
                    Direction     right
                  }
                  Terminal {
                    Type          Input
                    Position      [0, -10]
                    Direction     up
                  }
                  TerminalNames { "mi", "mo", "sync1" }
                  Location      [883, 1003; 1494, 1280]
                  ZoomFactor    1
                  SliderPosition [0, 0]
                  ShowBrowser   off
                  BrowserWidth  100
                  Configurations {
                    Name          "Edge triggered"
                    Schematic {
                      Component {
                        Type          Input
                        Name          "mi"
                        Show          on
                        Position      [60, 80]
                        Direction     right
                        Flipped       off
                        LabelPosition south
                        Parameter {
                          Variable      "Index"
                          Value         "1"
                          Show          on
                        }
                        Parameter {
                          Variable      "Width"
                          Value         "-1"
                          Show          off
                        }
                      }
                      Component {
                        Type          Output
                        Name          "mo"
                        Show          on
                        Position      [240, 75]
                        Direction     right
                        Flipped       off
                        LabelPosition south
                        Parameter {
                          Variable      "Index"
                          Value         "2"
                          Show          on
                        }
                        Parameter {
                          Variable      "Width"
                          Value         "-1"
                          Show          off
                        }
                      }
                      Component {
                        Type          Input
                        Name          "sync1"
                        Show          off
                        Position      [60, 40]
                        Direction     right
                        Flipped       off
                        LabelPosition south
                        Parameter {
                          Variable      "Index"
                          Value         "3"
                          Show          on
                        }
                        Parameter {
                          Variable      "Width"
                          Value         "-1"
                          Show          off
                        }
                      }
                      Component {
                        Type          CScript
                        Name          "Vectorised\nTrigger"
                        Show          on
                        Position      [165, 75]
                        Direction     up
                        Flipped       off
                        LabelPosition south
                        Parameter {
                          Variable      "DialogGeometry"
                          Value         "[803 947 1016 359]"
                          Show          off
                        }
                        Parameter {
                          Variable      "NumInputs"
                          Value         "width*2"
                          Show          off
                        }
                        Parameter {
                          Variable      "NumOutputs"
                          Value         "width"
                          Show          off
                        }
                        Parameter {
                          Variable      "NumContStates"
                          Value         "0"
                          Show          off
                        }
                        Parameter {
                          Variable      "NumDiscStates"
                          Value         "width"
                          Show          off
                        }
                        Parameter {
                          Variable      "NumZCSignals"
                          Value         "0"
                          Show          off
                        }
                        Parameter {
                          Variable      "DirectFeedthrough"
                          Value         "1"
                          Show          off
                        }
                        Parameter {
                          Variable      "Ts"
                          Value         "0"
                          Show          off
                        }
                        Parameter {
                          Variable      "TerminalBasedSampleTimes"
                          Value         "1"
                          Show          off
                        }
                        Parameter {
                          Variable      "Parameters"
                          Value         "width"
                          Show          off
                        }
                        Parameter {
                          Variable      "LangStandard"
                          Value         "2"
                          Show          off
                        }
                        Parameter {
                          Variable      "GnuExtensions"
                          Value         "1"
                          Show          off
                        }
                        Parameter {
                          Variable      "RuntimeCheck"
                          Value         "2"
                          Show          off
                        }
                        Parameter {
                          Variable      "HighlightLevel"
                          Value         "0"
                          Show          off
                        }
                        Parameter {
                          Variable      "Declarations"
                          Value         "#include <stdlib.h>\n"
"#include <math.h>\n"
"#include <string.h>\n"
"#include <limits.h>\n"
"#include <float.h>\n"
"\n"
"static int num_channel;\n"
"static int first_step;"
                          Show          off
                        }
                        Parameter {
                          Variable      "StartFcn"
                          Value         "num_channel = ParamRealData(0,0);\n"
"first_step = 1;"
                          Show          off
                        }
                        Parameter {
                          Variable      "OutputFcn"
                          Value         "if(IsMajorStep)\n"
"{\n"
"\tfor(int id = 0; id < num_channel; id++)\n"
"\t{\n"
"\t\tif((Input(id) == 1 && DiscState(id) == 0) || first_step)\n"
"\t\t{\n"
"\t\t\tOutput(id) = Input(num_channel+id);\n"
"\t\t}\n"
"\t}\n"
"}"
                          Show          off
                        }
                        Parameter {
                          Variable      "UpdateFcn"
                          Value         "for(int id = 0; id < num_channel; id+"
"+)\n"
"{\n"
"\tDiscState(id) = Input(id);\n"
"}\n"
"first_step = 0;"
                          Show          off
                        }
                        Parameter {
                          Variable      "DerivativeFcn"
                          Value         ""
                          Show          off
                        }
                        Parameter {
                          Variable      "TerminateFcn"
                          Value         ""
                          Show          off
                        }
                        Parameter {
                          Variable      "StoreCustomStateFcn"
                          Value         ""
                          Show          off
                        }
                        Parameter {
                          Variable      "RestoreCustomStateFcn"
                          Value         ""
                          Show          off
                        }
                      }
                      Component {
                        Type          SignalMux
                        Name          "Mux"
                        Show          off
                        Position      [110, 75]
                        Direction     right
                        Flipped       off
                        LabelPosition south
                        Frame         [-2, -10; 7, 10]
                        Parameter {
                          Variable      "Width"
                          Value         "[width width]"
                          Show          off
                        }
                      }
                      Connection {
                        Type          Signal
                        SrcComponent  "mi"
                        SrcTerminal   1
                        DstComponent  "Mux"
                        DstTerminal   3
                      }
                      Connection {
                        Type          Signal
                        SrcComponent  "Mux"
                        SrcTerminal   1
                        DstComponent  "Vectorised\nTrigger"
                        DstTerminal   1
                      }
                      Connection {
                        Type          Signal
                        SrcComponent  "Vectorised\nTrigger"
                        SrcTerminal   2
                        DstComponent  "mo"
                        DstTerminal   1
                      }
                      Connection {
                        Type          Signal
                        SrcComponent  "sync1"
                        SrcTerminal   1
                        Points        [90, 40; 90, 70]
                        DstComponent  "Mux"
                        DstTerminal   2
                      }
                    }
                    Name          "Natural"
                    Schematic {
                      Component {
                        Type          Input
                        Name          "mi"
                        Show          on
                        Position      [60, 80]
                        Direction     right
                        Flipped       off
                        LabelPosition south
                        Parameter {
                          Variable      "Index"
                          Value         "1"
                          Show          on
                        }
                        Parameter {
                          Variable      "Width"
                          Value         "-1"
                          Show          off
                        }
                      }
                      Component {
                        Type          Output
                        Name          "mo"
                        Show          on
                        Position      [240, 80]
                        Direction     right
                        Flipped       off
                        LabelPosition south
                        Parameter {
                          Variable      "Index"
                          Value         "2"
                          Show          on
                        }
                        Parameter {
                          Variable      "Width"
                          Value         "-1"
                          Show          off
                        }
                      }
                      Component {
                        Type          Input
                        Name          "sync1"
                        Show          off
                        Position      [60, 40]
                        Direction     right
                        Flipped       off
                        LabelPosition south
                        Parameter {
                          Variable      "Index"
                          Value         "3"
                          Show          on
                        }
                        Parameter {
                          Variable      "Width"
                          Value         "-1"
                          Show          off
                        }
                      }
                      Connection {
                        Type          Signal
                        SrcComponent  "mi"
                        SrcTerminal   1
                        DstComponent  "mo"
                        DstTerminal   1
                      }
                    }
                  }
                  Parameter {
                    Variable      "Configuration"
                    Value         "(update==1)+1"
                    Show          off
                  }
                }
                Component {
                  Type          Output
                  Name          "sw"
                  Show          on
                  Position      [710, 180]
                  Direction     right
                  Flipped       off
                  LabelPosition south
                  Parameter {
                    Variable      "Index"
                    Value         "1"
                    Show          on
                  }
                  Parameter {
                    Variable      "Width"
                    Value         "-1"
                    Show          off
                  }
                }
                Component {
                  Type          Input
                  Name          "ph'"
                  Show          on
                  Position      [40, 190]
                  Direction     right
                  Flipped       off
                  LabelPosition south
                  Parameter {
                    Variable      "Index"
                    Value         "2"
                    Show          on
                  }
                  Parameter {
                    Variable      "Width"
                    Value         "-1"
                    Show          off
                  }
                }
                Component {
                  Type          Input
                  Name          "fc'"
                  Show          on
                  Position      [40, 150]
                  Direction     right
                  Flipped       off
                  LabelPosition south
                  Parameter {
                    Variable      "Index"
                    Value         "3"
                    Show          on
                  }
                  Parameter {
                    Variable      "Width"
                    Value         "-1"
                    Show          off
                  }
                }
                Component {
                  Type          Input
                  Name          "m"
                  Show          on
                  Position      [40, 110]
                  Direction     right
                  Flipped       off
                  LabelPosition south
                  Parameter {
                    Variable      "Index"
                    Value         "4"
                    Show          on
                  }
                  Parameter {
                    Variable      "Width"
                    Value         "-1"
                    Show          off
                  }
                }
                Component {
                  Type          Comparator
                  Name          "Comparator"
                  Show          off
                  Position      [370, 175]
                  Direction     right
                  Flipped       off
                  LabelPosition south
                }
                Component {
                  Type          Reference
                  SrcComponent  "Components/Control/Delays/Turn-on Delay"
                  Name          "Turn-on Delay1"
                  Show          off
                  Position      [540, 175]
                  Direction     up
                  Flipped       on
                  LabelPosition north
                  Frame         [-15, -15; 15, 15]
                  Parameter {
                    Variable      "DeadTimeSource"
                    Value         "2"
                    Show          off
                  }
                  Parameter {
                    Variable      "T_d"
                    Value         "delay_sec"
                    Show          off
                  }
                  Parameter {
                    Variable      "Rounding"
                    Value         "3"
                    Show          off
                  }
                  Terminal {
                    Type          Input
                    Position      [-15, -5]
                    Direction     left
                  }
                  Terminal {
                    Type          Output
                    Position      [19, 0]
                    Direction     right
                  }
                  Terminal {
                    Type          Input
                    Position      [-15, 5]
                    Direction     left
                  }
                }
                Component {
                  Type          Constant
                  Name          "Constant1"
                  Show          off
                  Position      [505, 215]
                  Direction     right
                  Flipped       on
                  LabelPosition south
                  Frame         [-20, -10; 20, 10]
                  Parameter {
                    Variable      "Value"
                    Value         "polar"
                    Show          off
                  }
                  Parameter {
                    Variable      "DataType"
                    Value         "10"
                    Show          off
                  }
                }
                Component {
                  Type          SignalSwitch
                  Name          "Switch"
                  Show          off
                  Position      [475, 180]
                  Direction     left
                  Flipped       on
                  LabelPosition north
                  Parameter {
                    Variable      "Criteria"
                    Value         "2"
                    Show          off
                  }
                  Parameter {
                    Variable      "Threshold"
                    Value         "0"
                    Show          off
                  }
                }
                Component {
                  Type          Subsystem
                  Name          "init"
                  Show          on
                  Position      [90, 150]
                  Direction     up
                  Flipped       off
                  LabelPosition none
                  Frame         [-20, -10; 20, 10]
                  SampleTime    "-1"
                  CodeGenDiscretizationMethod "2"
                  CodeGenTarget "Generic"
                  MaskIconFrame on
                  MaskIconOpaque off
                  MaskIconRotates on
                  Terminal {
                    Type          Output
                    Position      [24, 0]
                    Direction     right
                  }
                  Terminal {
                    Type          Input
                    Position      [-20, 0]
                    Direction     left
                  }
                  Schematic {
                    Location      [1092, 117; 1495, 305]
                    ZoomFactor    1
                    SliderPosition [0, 0]
                    ShowBrowser   off
                    BrowserWidth  100
                    Component {
                      Type          Output
                      Name          "o"
                      Show          on
                      Position      [225, 75]
                      Direction     right
                      Flipped       off
                      LabelPosition south
                      Parameter {
                        Variable      "Index"
                        Value         "1"
                        Show          on
                      }
                      Parameter {
                        Variable      "Width"
                        Value         "-1"
                        Show          off
                      }
                    }
                    Component {
                      Type          Input
                      Name          "i"
                      Show          on
                      Position      [60, 80]
                      Direction     right
                      Flipped       off
                      LabelPosition south
                      Parameter {
                        Variable      "Index"
                        Value         "2"
                        Show          on
                      }
                      Parameter {
                        Variable      "Width"
                        Value         "-1"
                        Show          off
                      }
                    }
                    Component {
                      Type          CScript
                      Name          "C-Script"
                      Show          on
                      Position      [130, 80]
                      Direction     up
                      Flipped       off
                      LabelPosition south
                      Parameter {
                        Variable      "DialogGeometry"
                        Value         "[1274 393 576 370]"
                        Show          off
                      }
                      Parameter {
                        Variable      "NumInputs"
                        Value         "1"
                        Show          off
                      }
                      Parameter {
                        Variable      "NumOutputs"
                        Value         "2"
                        Show          off
                      }
                      Parameter {
                        Variable      "NumContStates"
                        Value         "0"
                        Show          off
                      }
                      Parameter {
                        Variable      "NumDiscStates"
                        Value         "0"
                        Show          off
                      }
                      Parameter {
                        Variable      "NumZCSignals"
                        Value         "0"
                        Show          off
                      }
                      Parameter {
                        Variable      "DirectFeedthrough"
                        Value         "1"
                        Show          off
                      }
                      Parameter {
                        Variable      "Ts"
                        Value         "0"
                        Show          off
                      }
                      Parameter {
                        Variable      "TerminalBasedSampleTimes"
                        Value         "1"
                        Show          off
                      }
                      Parameter {
                        Variable      "Parameters"
                        Value         ""
                        Show          off
                      }
                      Parameter {
                        Variable      "LangStandard"
                        Value         "2"
                        Show          off
                      }
                      Parameter {
                        Variable      "GnuExtensions"
                        Value         "1"
                        Show          off
                      }
                      Parameter {
                        Variable      "RuntimeCheck"
                        Value         "2"
                        Show          off
                      }
                      Parameter {
                        Variable      "HighlightLevel"
                        Value         "0"
                        Show          off
                      }
                      Parameter {
                        Variable      "Declarations"
                        Value         "static int nonzero_received;"
                        Show          off
                      }
                      Parameter {
                        Variable      "StartFcn"
                        Value         "nonzero_received = 0;"
                        Show          off
                      }
                      Parameter {
                        Variable      "OutputFcn"
                        Value         "if(IsMajorStep)\n"
"{\n"
"\tif(Input(0)!=0. && nonzero_received==0)\n"
"\t{\n"
"\t\tnonzero_received = 1;\n"
"\t}\n"
"\tif(Input(0)==0. && nonzero_received==1)\n"
"\t{\n"
"\t\tOutput(1) = 1; //Error \n"
"\t}\n"
"}\n"
"if(nonzero_received)\n"
"{\n"
"\tOutput(0) = Input(0);\n"
"}\n"
"else\n"
"{\n"
"\tOutput(0) = 1.;\n"
"}"
                        Show          off
                      }
                      Parameter {
                        Variable      "UpdateFcn"
                        Value         ""
                        Show          off
                      }
                      Parameter {
                        Variable      "DerivativeFcn"
                        Value         ""
                        Show          off
                      }
                      Parameter {
                        Variable      "TerminateFcn"
                        Value         ""
                        Show          off
                      }
                      Parameter {
                        Variable      "StoreCustomStateFcn"
                        Value         ""
                        Show          off
                      }
                      Parameter {
                        Variable      "RestoreCustomStateFcn"
                        Value         ""
                        Show          off
                      }
                    }
                    Component {
                      Type          Reference
                      SrcComponent  "Components/Assertions/Assert Upper Limit"
                      Name          "Assert Upper Limit"
                      Show          off
                      Position      [225, 120]
                      Direction     up
                      Flipped       off
                      LabelPosition south
                      Frame         [-15, -15; 15, 15]
                      Parameter {
                        Variable      "upper_limit"
                        Value         "0"
                        Show          off
                      }
                      Parameter {
                        Variable      "include_limit"
                        Value         "1"
                        Show          off
                      }
                      Parameter {
                        Variable      "action"
                        Value         "2"
                        Show          off
                      }
                      Parameter {
                        Variable      "message"
                        Value         "Signal exceeds upper limit."
                        Show          off
                        Evaluate      off
                      }
                      Terminal {
                        Type          Input
                        Position      [-15, 0]
                        Direction     left
                      }
                    }
                    Component {
                      Type          SignalDemux
                      Name          "Demux"
                      Show          off
                      Position      [185, 80]
                      Direction     right
                      Flipped       on
                      LabelPosition south
                      Frame         [-7, -10; 2, 10]
                      Parameter {
                        Variable      "Width"
                        Value         "2"
                        Show          off
                      }
                    }
                    Connection {
                      Type          Signal
                      SrcComponent  "i"
                      SrcTerminal   1
                      DstComponent  "C-Script"
                      DstTerminal   1
                    }
                    Connection {
                      Type          Signal
                      SrcComponent  "C-Script"
                      SrcTerminal   2
                      DstComponent  "Demux"
                      DstTerminal   1
                    }
                    Connection {
                      Type          Signal
                      SrcComponent  "Demux"
                      SrcTerminal   2
                      DstComponent  "o"
                      DstTerminal   1
                    }
                    Connection {
                      Type          Signal
                      SrcComponent  "Demux"
                      SrcTerminal   3
                      Points        [195, 85]
                      DstComponent  "Assert Upper Limit"
                      DstTerminal   1
                    }
                  }
                }
                Component {
                  Type          ConfigurableSubsystem
                  Name          "Carrier"
                  Show          on
                  Position      [270, 180]
                  Direction     up
                  Flipped       off
                  LabelPosition south
                  Frame         [-25, -20; 25, 20]
                  SampleTime    "-1"
                  CodeGenDiscretizationMethod "2"
                  CodeGenTarget "Generic"
                  MaskIconFrame on
                  MaskIconOpaque off
                  MaskIconRotates on
                  MaskInit      "num_channel_1 = num_channel - 1;"
                  Parameter {
                    Variable      "num_channel"
                    Prompt        "Number of channels"
                    Type          FreeText
                    Value         "width"
                    Show          off
                    Tunable       off
                    TabName       ""
                  }
                  Parameter {
                    Variable      "clk_cntr"
                    Prompt        "Counter clock [s]"
                    Type          FreeText
                    Value         "sys_clk*2^prscl"
                    Show          off
                    Tunable       off
                    TabName       ""
                  }
                  Parameter {
                    Variable      "update"
                    Prompt        "Update"
                    Type          FreeText
                    Value         "update+1"
                    Show          off
                    Tunable       off
                    TabName       ""
                  }
                  Parameter {
                    Variable      "prd_init"
                    Prompt        "Nominal period"
                    Type          FreeText
                    Value         "prd"
                    Show          off
                    Tunable       off
                    TabName       ""
                  }
                  Parameter {
                    Variable      "use_rel_phase"
                    Prompt        "Phases relative to primary"
                    Type          FreeText
                    Value         "use_rel_phase"
                    Show          off
                    Tunable       off
                    TabName       ""
                  }
                  Parameter {
                    Variable      "trig"
                    Prompt        "ADC trigger output"
                    Type          FreeText
                    Value         "trig"
                    Show          off
                    Tunable       off
                    TabName       ""
                  }
                  Terminal {
                    Type          Input
                    Position      [-25, -10]
                    Direction     left
                  }
                  Terminal {
                    Type          Output
                    Position      [29, 0]
                    Direction     right
                  }
                  Terminal {
                    Type          Output
                    Position      [29, -10]
                    Direction     right
                  }
                  Terminal {
                    Type          Input
                    Position      [-25, 10]
                    Direction     left
                  }
                  Terminal {
                    Type          Output
                    Position      [29, 10]
                    Direction     right
                  }
                  TerminalNames { "prd", "cntr", "sync", "ph", "adc" }
                  Location      [731, 258; 1132, 535]
                  ZoomFactor    1
                  SliderPosition [0, 0]
                  ShowBrowser   off
                  BrowserWidth  100
                  Configurations {
                    Name          "Sawtooth"
                    Schematic {
                      Component {
                        Type          Input
                        Name          "prd"
                        Show          on
                        Position      [60, 60]
                        Direction     right
                        Flipped       off
                        LabelPosition south
                        Parameter {
                          Variable      "Index"
                          Value         "1"
                          Show          on
                        }
                        Parameter {
                          Variable      "Width"
                          Value         "-1"
                          Show          off
                        }
                      }
                      Component {
                        Type          Output
                        Name          "cntr"
                        Show          on
                        Position      [340, 65]
                        Direction     right
                        Flipped       off
                        LabelPosition south
                        Parameter {
                          Variable      "Index"
                          Value         "2"
                          Show          on
                        }
                        Parameter {
                          Variable      "Width"
                          Value         "-1"
                          Show          off
                        }
                      }
                      Component {
                        Type          Output
                        Name          "sync"
                        Show          on
                        Position      [340, 95]
                        Direction     right
                        Flipped       off
                        LabelPosition south
                        Parameter {
                          Variable      "Index"
                          Value         "3"
                          Show          on
                        }
                        Parameter {
                          Variable      "Width"
                          Value         "-1"
                          Show          off
                        }
                      }
                      Component {
                        Type          Input
                        Name          "ph"
                        Show          on
                        Position      [60, 100]
                        Direction     right
                        Flipped       off
                        LabelPosition south
                        Parameter {
                          Variable      "Index"
                          Value         "4"
                          Show          on
                        }
                        Parameter {
                          Variable      "Width"
                          Value         "-1"
                          Show          off
                        }
                      }
                      Component {
                        Type          CScript
                        Name          "Carrier"
                        Show          on
                        Position      [210, 95]
                        Direction     up
                        Flipped       off
                        LabelPosition south
                        Parameter {
                          Variable      "DialogGeometry"
                          Value         "[1257 53 994 1310]"
                          Show          off
                        }
                        Parameter {
                          Variable      "NumInputs"
                          Value         "[1 num_channel]"
                          Show          off
                        }
                        Parameter {
                          Variable      "NumOutputs"
                          Value         "[num_channel num_channel num_channel]"
                          Show          off
                        }
                        Parameter {
                          Variable      "NumContStates"
                          Value         "0"
                          Show          off
                        }
                        Parameter {
                          Variable      "NumDiscStates"
                          Value         "0"
                          Show          off
                        }
                        Parameter {
                          Variable      "NumZCSignals"
                          Value         "0"
                          Show          off
                        }
                        Parameter {
                          Variable      "DirectFeedthrough"
                          Value         "1"
                          Show          off
                        }
                        Parameter {
                          Variable      "Ts"
                          Value         "[0,0; -2,clk_cntr]"
                          Show          off
                        }
                        Parameter {
                          Variable      "TerminalBasedSampleTimes"
                          Value         "1"
                          Show          off
                        }
                        Parameter {
                          Variable      "Parameters"
                          Value         "clk_cntr, update,use_rel_phase,trig"
                          Show          off
                        }
                        Parameter {
                          Variable      "LangStandard"
                          Value         "2"
                          Show          off
                        }
                        Parameter {
                          Variable      "GnuExtensions"
                          Value         "1"
                          Show          off
                        }
                        Parameter {
                          Variable      "RuntimeCheck"
                          Value         "2"
                          Show          off
                        }
                        Parameter {
                          Variable      "HighlightLevel"
                          Value         "0"
                          Show          off
                        }
                        Parameter {
                          Variable      "Declarations"
                          Value         "#include <float.h>\n"
"#include <stdlib.h>\n"
"#include <stdint.h>\n"
"\n"
"#define clk_cntr ParamRealData(0,0)\n"
"#define use_rel_phase ParamRealData(2,0)\n"
"\n"
"#define num_channel NumInputSignals(1)\n"
"\n"
"static double cntr_max_buf;\n"
"typedef struct\n"
"{\n"
"\tdouble cntr;\n"
"\tint64_t tick;\n"
"\tdouble dirc;\n"
"} samplehit;\n"
"\n"
"typedef enum \n"
"{\n"
"   UPD_MIN = 1,\n"
"   UPD_IMMEDIATE,\n"
"   UPD_MAX,\n"
"   UPD_MIN_MAX\n"
"} TUpdate;\n"
"\n"
"typedef enum\n"
"{\n"
"   TRIG_DISABLED = 0,\n"
"   TRIG_MIN,\n"
"   TRIG_MAX,\n"
"   TRIG_MIN_MAX\n"
"} TAdcTrigger;\n"
"\n"
"static samplehit *samplehit_pre_buf = NULL;\n"
"static samplehit *samplehit_1st_buf = NULL;\n"
"static samplehit *samplehit_2nd_buf = NULL;\n"
"static samplehit *samplehit_3rd_buf = NULL;\n"
"static TUpdate update_option;\n"
"static TAdcTrigger adcTrigger;\n"
"static int first_step = 0;\n"
"\n"
"void update_samplehit(int id_channel, double cntr_max, double ph, double clk,"
" int64_t currentTick, \n"
"\tsamplehit* buf_pre, samplehit* buf_1st, samplehit* buf_2nd, samplehit* buf_"
"3rd)\n"
"{\n"
"\tdouble phase_shift = ph*cntr_max;\n"
"\t// check if phase difference to carrier minimum is within one tick\n"
"\tif ((int)(phase_shift+0.5) == (int)(cntr_max+0.5) || (int)(phase_shift+0.5)"
" == 0) \n"
"\t   phase_shift = 0;\n"
"\t\n"
"\tif (phase_shift == 0)\n"
"\t{\n"
"\t\t(buf_pre+id_channel)->cntr = 0;\n"
"\t\t(buf_pre+id_channel)->tick = currentTick + 0.;\n"
"\t\t(buf_pre+id_channel)->dirc = 1.;\n"
"\t\t(buf_1st+id_channel)->cntr = 0.;\n"
"\t\t(buf_1st+id_channel)->tick = currentTick + cntr_max + phase_shift + 0.5;"
"\n"
"\t\t(buf_1st+id_channel)->dirc = 1.;\n"
"\t\t(buf_2nd+id_channel)->cntr = 0.;\n"
"\t\t(buf_2nd+id_channel)->tick = currentTick + 2*cntr_max + phase_shift + 0.5"
";\n"
"\t\t(buf_2nd+id_channel)->dirc = 1.;\n"
"\t\t(buf_3rd+id_channel)->cntr = 0.;\n"
"\t\t(buf_3rd+id_channel)->tick = currentTick + 3*cntr_max + phase_shift + 0.5"
";\n"
"\t\t(buf_3rd+id_channel)->dirc = 1.;\n"
"\t}\n"
"\telse\n"
"\t{\n"
"\t\t(buf_pre+id_channel)->cntr = cntr_max - phase_shift;\n"
"\t\t(buf_pre+id_channel)->tick = currentTick + 0.;\n"
"\t\t(buf_pre+id_channel)->dirc = 1.;\n"
"\t\t(buf_1st+id_channel)->cntr = 0.;\n"
"\t\t(buf_1st+id_channel)->tick = currentTick + phase_shift + 0.5;\n"
"\t\t(buf_1st+id_channel)->dirc = 1.;\n"
"\t\t(buf_2nd+id_channel)->cntr = 0.;\n"
"\t\t(buf_2nd+id_channel)->tick = currentTick + 1*cntr_max + phase_shift + 0.5"
";\n"
"\t\t(buf_2nd+id_channel)->dirc = 1.;\n"
"\t\t(buf_3rd+id_channel)->cntr = 0.;\n"
"\t\t(buf_3rd+id_channel)->tick = currentTick + 2*cntr_max + phase_shift + 0.5"
";\n"
"\t\t(buf_3rd+id_channel)->dirc = 1.;\n"
"\t}\n"
"}\n"
                          Show          off
                        }
                        Parameter {
                          Variable      "StartFcn"
                          Value         "NextSampleHit = DBL_MAX;\n"
"samplehit_pre_buf = (samplehit*) malloc(num_channel*sizeof(samplehit));\n"
"samplehit_1st_buf = (samplehit*) malloc(num_channel*sizeof(samplehit));\n"
"samplehit_2nd_buf = (samplehit*) malloc(num_channel*sizeof(samplehit));\n"
"samplehit_3rd_buf = (samplehit*) malloc(num_channel*sizeof(samplehit));\n"
"update_option = ParamRealData(1,0);\n"
"adcTrigger = ParamRealData(3,0);\n"
"first_step = 1;"
                          Show          off
                        }
                        Parameter {
                          Variable      "OutputFcn"
                          Value         "if(IsMajorStep)\n"
"{\n"
"   static double last_phase0 = 0;\n"
"   int64_t tick = CurrentTime / clk_cntr + 0.5;\n"
"\tif (first_step)\n"
"\t{\n"
"\t\tcntr_max_buf = InputSignal(0,0);\n"
"\t   double phase0 = InputSignal(1, 0);\n"
"\t\tfor (int channel = 0; channel < num_channel; channel++)\n"
"\t\t{\n"
"\t\t   double phase;\n"
"\t\t   if (channel == 0)\n"
"\t\t      phase = phase0;\n"
"\t\t   else if (use_rel_phase)\n"
"\t\t      phase = InputSignal(1, channel) + phase0;\n"
"\t\t   else\n"
"\t\t   \tphase = InputSignal(1, channel);\n"
"\t      if (phase < 0) phase += 1.0;\n"
"\t      if (phase > 1.0) phase -= 1.0;\n"
"\t\t\tupdate_samplehit(channel, cntr_max_buf, phase, clk_cntr, tick, \n"
"\t\t\t\tsamplehit_pre_buf, samplehit_1st_buf, samplehit_2nd_buf, samplehit_3r"
"d_buf);\n"
"   \t}\n"
"      last_phase0 = phase0;\n"
"\t}\n"
"\telse if(IsSampleHit(1))\n"
"\t{\t\t\t \t\t\n"
"\t\tcntr_max_buf = InputSignal(0,0);\n"
"\t   int64_t tick = CurrentTime / clk_cntr + 0.5;\n"
"\t   // printf(\"Time %e, tick %lld\\n\", CurrentTime, tick);\n"
"\t\tif(samplehit_1st_buf[0].tick <= tick && samplehit_1st_buf[0].dirc == 1.)"
"\n"
"\t\t{\n"
"\t\t   double phase0 = InputSignal(1, 0);\n"
"\t\t\tfor (int channel = 0; channel < num_channel; channel++)\n"
"\t\t\t{\n"
"\t\t\t   double phase;\n"
"\t\t\t   if (channel == 0)\n"
"\t\t\t   \tphase = phase0 - last_phase0;\n"
"\t\t\t   else if (use_rel_phase)\n"
"\t\t\t      phase = InputSignal(1, channel) + phase0 - last_phase0;\n"
" \t\t\t\telse\n"
"\t\t   \t\tphase = InputSignal(1, channel) - last_phase0;\n"
"\t\t      if (phase < 0) phase += 1.0;\n"
"\t\t      if (phase > 1.0) phase -= 1.0;\n"
"\t\t\t\tupdate_samplehit(channel, cntr_max_buf, phase, clk_cntr, tick, \n"
"\t\t\t\t\tsamplehit_pre_buf, samplehit_1st_buf, samplehit_2nd_buf, samplehit_"
"3rd_buf);\n"
"\t   \t}\n"
"\t      last_phase0 = phase0;\t   \t\n"
"\t   }\n"
"\t   else\n"
"\t   {\n"
"\t\t\tfor (int id_channel = 0; id_channel < num_channel; id_channel++)\n"
"\t\t\t{\t\t\t\n"
"\t\t   \t// printf(\"  1st: %lld\\n\", samplehit_1st_buf[id_channel].time);\n"
"\t\t\t\tif(samplehit_1st_buf[id_channel].tick <= tick)\n"
"\t\t\t\t{\n"
"\t\t\t\t\tsamplehit_pre_buf[id_channel].cntr = samplehit_1st_buf[id_channel]."
"cntr;\n"
"\t\t\t\t\tsamplehit_pre_buf[id_channel].tick = samplehit_1st_buf[id_channel]."
"tick;\n"
"\t\t\t\t\tsamplehit_pre_buf[id_channel].dirc = samplehit_1st_buf[id_channel]."
"dirc;\n"
"\t\t\t\t\tsamplehit_1st_buf[id_channel].cntr = samplehit_2nd_buf[id_channel]."
"cntr;\n"
"\t\t\t\t\tsamplehit_1st_buf[id_channel].tick = samplehit_2nd_buf[id_channel]."
"tick;\n"
"\t\t\t\t\tsamplehit_1st_buf[id_channel].dirc = samplehit_2nd_buf[id_channel]."
"dirc;\t\n"
"\t\t\t\t\tsamplehit_2nd_buf[id_channel].cntr = samplehit_3rd_buf[id_channel]."
"cntr;\n"
"\t\t\t\t\tsamplehit_2nd_buf[id_channel].tick = samplehit_3rd_buf[id_channel]."
"tick;\n"
"\t\t\t\t\tsamplehit_2nd_buf[id_channel].dirc = samplehit_3rd_buf[id_channel]."
"dirc;\t\n"
"\t\t\t\t}\t\t\t\t\n"
"\t\t\t}\t\t\t\n"
"  \t\t}\n"
"  \t}\n"
"  \tif (IsSampleHit(1) || first_step)\n"
"  \t{\n"
"  \t\t// Configure the closest sample hit in the future\n"
"   \tint64_t next_event = tick + 2*cntr_max_buf+0.5;\n"
"   \tfor (int id_channel = 0; id_channel < num_channel; id_channel++)\n"
"\t\t{\t\t\n"
"  \t\t\tif(samplehit_1st_buf[id_channel].tick < next_event && samplehit_1st_b"
"uf[id_channel].tick > tick)\n"
"  \t\t\t{\n"
"  \t\t\t\tnext_event = samplehit_1st_buf[id_channel].tick;\n"
"  \t\t\t}\n"
"  \t\t}\n"
"  \t\tNextSampleHit = next_event*clk_cntr;\n"
"  \t\t// printf(\"  Next: %e\\n\", NextSampleHit);\n"
"  \t}\n"
"}\n"
"\n"
"// Interpolate the carrier output at minor steps and output the synchrnoisati"
"on impulse\n"
"for (int id_channel = 0; id_channel < num_channel; id_channel++)\n"
"{\t\n"
"   double output;\n"
"\toutput = samplehit_pre_buf[id_channel].cntr +  \n"
"\t\t\t\t(CurrentTime/clk_cntr - samplehit_pre_buf[id_channel].tick);\n"
"\tif (output > cntr_max_buf)\n"
"\t   output = cntr_max_buf;\n"
"\tif (output < 0.0)\n"
"\t   output = 0.0;\n"
"\tOutputSignal(0,id_channel) = output;\n"
"\tint int_output = output+0.5;\n"
"\tif(update_option != UPD_IMMEDIATE)\n"
"\t{\n"
"\t\tif(int_output == 0. || int_output == (int)(cntr_max_buf+0.5))\n"
"\t\t{\n"
"\t\t\tOutputSignal(1,id_channel) = 1.;\t\t\t\t\t\t\t\n"
"\t\t}\n"
"\t\telse\n"
"\t\t{\n"
"\t\t\tOutputSignal(1,id_channel) = 0.;\n"
"\t\t}\n"
"\t}\n"
"\tif(adcTrigger != TRIG_DISABLED)\n"
"\t{\n"
"\t\tif(int_output == 0. || int_output == (int)(cntr_max_buf+0.5))\n"
"\t\t{\n"
"\t\t\tOutputSignal(2,id_channel) = 1.;\t\t\t\t\t\t\t\n"
"\t\t}\n"
"\t\telse\n"
"\t\t{\n"
"\t\t\tOutputSignal(2,id_channel) = 0.;\n"
"\t\t}\n"
"\t}\n"
"}\n"
"\n"
"\n"
                          Show          off
                        }
                        Parameter {
                          Variable      "UpdateFcn"
                          Value         "first_step = 0;\n"
                          Show          off
                        }
                        Parameter {
                          Variable      "DerivativeFcn"
                          Value         ""
                          Show          off
                        }
                        Parameter {
                          Variable      "TerminateFcn"
                          Value         "free(samplehit_pre_buf);\n"
"free(samplehit_1st_buf);\n"
"free(samplehit_2nd_buf);\n"
"free(samplehit_3rd_buf);\n"
                          Show          off
                        }
                        Parameter {
                          Variable      "StoreCustomStateFcn"
                          Value         ""
                          Show          off
                        }
                        Parameter {
                          Variable      "RestoreCustomStateFcn"
                          Value         ""
                          Show          off
                        }
                      }
                      Component {
                        Type          Output
                        Name          "adc"
                        Show          on
                        Position      [340, 125]
                        Direction     right
                        Flipped       off
                        LabelPosition south
                        Parameter {
                          Variable      "Index"
                          Value         "5"
                          Show          on
                        }
                        Parameter {
                          Variable      "Width"
                          Value         "-1"
                          Show          off
                        }
                      }
                      Connection {
                        Type          Signal
                        SrcComponent  "prd"
                        SrcTerminal   1
                        Points        [140, 60; 140, 90]
                        DstComponent  "Carrier"
                        DstTerminal   1
                      }
                      Connection {
                        Type          Signal
                        SrcComponent  "ph"
                        SrcTerminal   1
                        DstComponent  "Carrier"
                        DstTerminal   2
                      }
                      Connection {
                        Type          Signal
                        SrcComponent  "Carrier"
                        SrcTerminal   4
                        DstComponent  "sync"
                        DstTerminal   1
                      }
                      Connection {
                        Type          Signal
                        SrcComponent  "Carrier"
                        SrcTerminal   3
                        Points        [275, 85; 275, 65]
                        DstComponent  "cntr"
                        DstTerminal   1
                      }
                      Connection {
                        Type          Signal
                        SrcComponent  "Carrier"
                        SrcTerminal   5
                        Points        [275, 105; 275, 125]
                        DstComponent  "adc"
                        DstTerminal   1
                      }
                    }
                    Name          "Symmetrical"
                    Schematic {
                      Component {
                        Type          Input
                        Name          "prd"
                        Show          on
                        Position      [60, 60]
                        Direction     right
                        Flipped       off
                        LabelPosition south
                        Parameter {
                          Variable      "Index"
                          Value         "1"
                          Show          on
                        }
                        Parameter {
                          Variable      "Width"
                          Value         "-1"
                          Show          off
                        }
                      }
                      Component {
                        Type          Output
                        Name          "cntr"
                        Show          on
                        Position      [340, 65]
                        Direction     right
                        Flipped       off
                        LabelPosition south
                        Parameter {
                          Variable      "Index"
                          Value         "2"
                          Show          on
                        }
                        Parameter {
                          Variable      "Width"
                          Value         "-1"
                          Show          off
                        }
                      }
                      Component {
                        Type          Output
                        Name          "sync"
                        Show          on
                        Position      [340, 95]
                        Direction     right
                        Flipped       off
                        LabelPosition south
                        Parameter {
                          Variable      "Index"
                          Value         "3"
                          Show          on
                        }
                        Parameter {
                          Variable      "Width"
                          Value         "-1"
                          Show          off
                        }
                      }
                      Component {
                        Type          Input
                        Name          "ph"
                        Show          on
                        Position      [60, 100]
                        Direction     right
                        Flipped       off
                        LabelPosition south
                        Parameter {
                          Variable      "Index"
                          Value         "4"
                          Show          on
                        }
                        Parameter {
                          Variable      "Width"
                          Value         "-1"
                          Show          off
                        }
                      }
                      Component {
                        Type          Gain
                        Name          "Gain"
                        Show          off
                        Position      [110, 60]
                        Direction     right
                        Flipped       off
                        LabelPosition south
                        Parameter {
                          Variable      "K"
                          Value         "0.5"
                          Show          off
                        }
                        Parameter {
                          Variable      "Multiplication"
                          Value         "1"
                          Show          off
                        }
                        Parameter {
                          Variable      "OutputDataType"
                          Value         "11"
                          Show          off
                        }
                        Parameter {
                          Variable      "DataTypeOverflowMode"
                          Value         "1"
                          Show          off
                        }
                        Parameter {
                          Variable      "GainDataType"
                          Value         "11"
                          Show          off
                        }
                      }
                      Component {
                        Type          CScript
                        Name          "Carrier"
                        Show          on
                        Position      [210, 95]
                        Direction     up
                        Flipped       off
                        LabelPosition south
                        Parameter {
                          Variable      "DialogGeometry"
                          Value         "[2834 53 1287 1304]"
                          Show          off
                        }
                        Parameter {
                          Variable      "NumInputs"
                          Value         "[1 num_channel]"
                          Show          off
                        }
                        Parameter {
                          Variable      "NumOutputs"
                          Value         "[num_channel num_channel num_channel]"
                          Show          off
                        }
                        Parameter {
                          Variable      "NumContStates"
                          Value         "0"
                          Show          off
                        }
                        Parameter {
                          Variable      "NumDiscStates"
                          Value         "0"
                          Show          off
                        }
                        Parameter {
                          Variable      "NumZCSignals"
                          Value         "0"
                          Show          off
                        }
                        Parameter {
                          Variable      "DirectFeedthrough"
                          Value         "1"
                          Show          off
                        }
                        Parameter {
                          Variable      "Ts"
                          Value         "[0,0; -2,clk_cntr]"
                          Show          off
                        }
                        Parameter {
                          Variable      "TerminalBasedSampleTimes"
                          Value         "1"
                          Show          off
                        }
                        Parameter {
                          Variable      "Parameters"
                          Value         "clk_cntr, update,use_rel_phase,trig"
                          Show          off
                        }
                        Parameter {
                          Variable      "LangStandard"
                          Value         "2"
                          Show          off
                        }
                        Parameter {
                          Variable      "GnuExtensions"
                          Value         "1"
                          Show          off
                        }
                        Parameter {
                          Variable      "RuntimeCheck"
                          Value         "2"
                          Show          off
                        }
                        Parameter {
                          Variable      "HighlightLevel"
                          Value         "0"
                          Show          off
                        }
                        Parameter {
                          Variable      "Declarations"
                          Value         "#include <float.h>\n"
"#include <stdlib.h>\n"
"#include <stdint.h>\n"
"#include <stdio.h>\n"
"\n"
"#define clk_cntr ParamRealData(0,0)\n"
"#define use_rel_phase ParamRealData(2,0)\n"
"\n"
"#define num_channel NumInputSignals(1)\n"
"\n"
"static double cntr_max_buf;\n"
"typedef struct\n"
"{\n"
"\tdouble cntr;\n"
"\tint64_t tick;\n"
"\tdouble dirc;\n"
"} samplehit;\n"
"\n"
"typedef enum \n"
"{\n"
"   UPD_MIN = 1,\n"
"   UPD_IMMEDIATE,\n"
"   UPD_MAX,\n"
"   UPD_MIN_MAX\n"
"} TUpdate;\n"
"\n"
"typedef enum\n"
"{\n"
"   TRIG_DISABLED = 0,\n"
"   TRIG_MIN,\n"
"   TRIG_MAX,\n"
"   TRIG_MIN_MAX\n"
"} TAdcTrigger;\n"
"\n"
"static samplehit *samplehit_pre_buf = NULL;\n"
"static samplehit *samplehit_1st_buf = NULL;\n"
"static samplehit *samplehit_2nd_buf = NULL;\n"
"static samplehit *samplehit_3rd_buf = NULL;\n"
"static TUpdate update_option;\n"
"static TAdcTrigger adcTrigger;\n"
"static int first_step = 0;\n"
"\n"
"void update_samplehit(int id_channel, double cntr_max, double ph, double clk,"
" int64_t currentTick, \n"
"\tsamplehit* buf_pre, samplehit* buf_1st, samplehit* buf_2nd, samplehit* buf_"
"3rd)\n"
"{\n"
"\tdouble phase_shift = 2*ph*cntr_max;\n"
"\t// check if phase difference to carrier minimum is within one tick\n"
"\tif ((int)(phase_shift+0.5) == (int)(2*cntr_max+0.5) || (int)(phase_shift+0."
"5) == 0) \n"
"\t   phase_shift = 0;\n"
"\t// printf(\"   ph: %f, ph_shift: %f, max %f\\n\", ph, phase_shift, cntr_max"
");\n"
"\tif(phase_shift > 0 && phase_shift <= cntr_max)\n"
"\t{\n"
"\t   //printf(\"   Falling\\n\");\n"
"\t\t(buf_pre+id_channel)->cntr = phase_shift;\n"
"\t\t(buf_pre+id_channel)->tick = currentTick + 0.;\n"
"\t\t(buf_pre+id_channel)->dirc = -1.;\n"
"\t\t(buf_1st+id_channel)->cntr = 0.;\n"
"\t\t(buf_1st+id_channel)->tick = currentTick + phase_shift+0.5;\n"
"\t\t(buf_1st+id_channel)->dirc = 1.;\n"
"\t\t(buf_2nd+id_channel)->cntr = cntr_max;\n"
"\t\t(buf_2nd+id_channel)->tick = currentTick + phase_shift+cntr_max+0.5;\n"
"\t\t(buf_2nd+id_channel)->dirc = -1.;\n"
"\t\t(buf_3rd+id_channel)->cntr = 0.;\n"
"\t\t(buf_3rd+id_channel)->tick = currentTick + phase_shift+2*cntr_max+0.5;\n"
"\t\t(buf_3rd+id_channel)->dirc = 1.;\n"
"\n"
"\t}\n"
"\telse if(phase_shift == 0.)\n"
"\t{\n"
"\t   //printf(\"   Zero\\n\");\n"
"\t\t(buf_pre+id_channel)->cntr = phase_shift;\n"
"\t\t(buf_pre+id_channel)->tick = currentTick + 0.;\n"
"\t\t(buf_pre+id_channel)->dirc = 1.;\n"
"\t\t(buf_1st+id_channel)->cntr = cntr_max;\n"
"\t\t(buf_1st+id_channel)->tick = currentTick + cntr_max+0.5;\n"
"\t\t(buf_1st+id_channel)->dirc = -1.;\n"
"\t\t(buf_2nd+id_channel)->cntr = 0.;\n"
"\t\t(buf_2nd+id_channel)->tick = currentTick + 2*cntr_max+0.5;\n"
"\t\t(buf_2nd+id_channel)->dirc = 1.;\n"
"\t\t(buf_3rd+id_channel)->cntr = cntr_max;\n"
"\t\t(buf_3rd+id_channel)->tick = currentTick + 3*cntr_max+0.5;\n"
"\t\t(buf_3rd+id_channel)->dirc = -1.;\n"
"\t}\n"
"\telse\n"
"\t{\n"
"\t   //printf(\"   Rising\\n\");\n"
"\t\t(buf_pre+id_channel)->cntr = 2*cntr_max - phase_shift;\n"
"\t\t(buf_pre+id_channel)->tick = currentTick + 0.;\n"
"\t\t(buf_pre+id_channel)->dirc = 1.;\n"
"\t\t(buf_1st+id_channel)->cntr = cntr_max;\n"
"\t\t(buf_1st+id_channel)->tick = currentTick - cntr_max + phase_shift+0.5;\n"
"\t\t(buf_1st+id_channel)->dirc = -1.;\n"
"\t\t(buf_2nd+id_channel)->cntr = 0.;\n"
"\t\t(buf_2nd+id_channel)->tick = currentTick + phase_shift+0.5;\n"
"\t\t(buf_2nd+id_channel)->dirc = 1.;\n"
"\t\t(buf_3rd+id_channel)->cntr = cntr_max;\n"
"\t\t(buf_3rd+id_channel)->tick = currentTick + cntr_max + phase_shift+0.5;\n"
"\t\t(buf_3rd+id_channel)->dirc = -1.;\n"
"\t}\n"
"}\n"
                          Show          off
                        }
                        Parameter {
                          Variable      "StartFcn"
                          Value         "NextSampleHit = DBL_MAX;\n"
"samplehit_pre_buf = (samplehit*) malloc(num_channel*sizeof(samplehit));\n"
"samplehit_1st_buf = (samplehit*) malloc(num_channel*sizeof(samplehit));\n"
"samplehit_2nd_buf = (samplehit*) malloc(num_channel*sizeof(samplehit));\n"
"samplehit_3rd_buf = (samplehit*) malloc(num_channel*sizeof(samplehit));\n"
"update_option = ParamRealData(1,0);\n"
"adcTrigger = ParamRealData(3,0);\n"
"first_step = 1;"
                          Show          off
                        }
                        Parameter {
                          Variable      "OutputFcn"
                          Value         "if(IsMajorStep)\n"
"{\t\n"
"   static double last_phase0 = 0;\n"
"   int64_t tick = CurrentTime / clk_cntr + 0.5;\n"
"\tif (first_step)\n"
"\t{\n"
"\t\tcntr_max_buf = InputSignal(0,0);\n"
"\t   double phase0 = InputSignal(1, 0);\n"
"\t\tfor (int channel = 0; channel < num_channel; channel++)\n"
"\t\t{\n"
"\t\t   double phase;\n"
"\t\t   if (channel == 0)\n"
"\t\t      phase = phase0;\n"
"\t\t   else if (use_rel_phase)\n"
"\t\t      phase = InputSignal(1, channel) + phase0;\n"
"\t\t   else\n"
"\t\t   \tphase = InputSignal(1, channel);\n"
"\t      if (phase < 0) phase += 1.0;\n"
"\t      if (phase > 1.0) phase -= 1.0;\n"
"\t\t\tupdate_samplehit(channel, cntr_max_buf, phase, clk_cntr, tick, \n"
"\t\t\t\tsamplehit_pre_buf, samplehit_1st_buf, samplehit_2nd_buf, samplehit_3r"
"d_buf);\n"
"   \t}\n"
"      last_phase0 = phase0;\n"
"\t}\n"
"\telse if(IsSampleHit(1))\n"
"\t{\n"
"\t\tcntr_max_buf = InputSignal(0,0);\n"
"\t   int64_t tick = CurrentTime / clk_cntr + 0.5;\n"
"\t   // printf(\"Time %e, tick %lld\\n\", CurrentTime, tick);\n"
"\t\tif(samplehit_1st_buf[0].tick <= tick && samplehit_1st_buf[0].dirc == 1.)"
"\n"
"\t\t{\n"
"\t\t   double phase0 = InputSignal(1, 0);\n"
"\t\t\tfor (int channel = 0; channel < num_channel; channel++)\n"
"\t\t\t{\n"
"\t\t\t   double phase;\n"
"\t\t\t   if (channel == 0)\n"
"\t\t\t   \tphase = phase0 - last_phase0;\n"
"\t\t\t   else if (use_rel_phase)\n"
"\t\t\t      phase = InputSignal(1, channel) + phase0 - last_phase0;\n"
" \t\t\t\telse\n"
"\t\t   \t\tphase = InputSignal(1, channel) - last_phase0;\n"
"\t\t      if (phase < 0) phase += 1.0;\n"
"\t\t      if (phase > 1.0) phase -= 1.0;\n"
"\t\t\t\tupdate_samplehit(channel, cntr_max_buf, phase, clk_cntr, tick, \n"
"\t\t\t\t\tsamplehit_pre_buf, samplehit_1st_buf, samplehit_2nd_buf, samplehit_"
"3rd_buf);\n"
"\t   \t}\n"
"\t      last_phase0 = phase0;\n"
"\t   }\n"
"\t   else\n"
"\t   {\n"
"\t\t\tfor (int id_channel = 0; id_channel < num_channel; id_channel++)\n"
"\t\t\t{\t\t\t\n"
"\t\t   \t// printf(\"  1st: %lld\\n\", samplehit_1st_buf[id_channel].time);\n"
"\t\t\t\tif(samplehit_1st_buf[id_channel].tick <= tick)\n"
"\t\t\t\t{\n"
"\t\t\t\t\tsamplehit_pre_buf[id_channel].cntr = samplehit_1st_buf[id_channel]."
"cntr;\n"
"\t\t\t\t\tsamplehit_pre_buf[id_channel].tick = samplehit_1st_buf[id_channel]."
"tick;\n"
"\t\t\t\t\tsamplehit_pre_buf[id_channel].dirc = samplehit_1st_buf[id_channel]."
"dirc;\n"
"\t\t\t\t\tsamplehit_1st_buf[id_channel].cntr = samplehit_2nd_buf[id_channel]."
"cntr;\n"
"\t\t\t\t\tsamplehit_1st_buf[id_channel].tick = samplehit_2nd_buf[id_channel]."
"tick;\n"
"\t\t\t\t\tsamplehit_1st_buf[id_channel].dirc = samplehit_2nd_buf[id_channel]."
"dirc;\t\n"
"\t\t\t\t\tsamplehit_2nd_buf[id_channel].cntr = samplehit_3rd_buf[id_channel]."
"cntr;\n"
"\t\t\t\t\tsamplehit_2nd_buf[id_channel].tick = samplehit_3rd_buf[id_channel]."
"tick;\n"
"\t\t\t\t\tsamplehit_2nd_buf[id_channel].dirc = samplehit_3rd_buf[id_channel]."
"dirc;\t\n"
"\t\t\t\t}\t\t\t\t\n"
"\t\t\t}\t\t\t\n"
"  \t\t}\n"
"  \t}\n"
"  \tif (IsSampleHit(1) || first_step)\n"
"  \t{  \t\n"
"  \t\t// Configure the closest sample hit in the future\n"
"   \tint64_t next_event = tick + 2*cntr_max_buf+0.5;\n"
"   \tfor (int id_channel = 0; id_channel < num_channel; id_channel++)\n"
"\t\t{\t\t\n"
"  \t\t\tif(samplehit_1st_buf[id_channel].tick < next_event && samplehit_1st_b"
"uf[id_channel].tick > tick)\n"
"  \t\t\t{\n"
"  \t\t\t\tnext_event = samplehit_1st_buf[id_channel].tick;\n"
"  \t\t\t}\n"
"  \t\t}\n"
"  \t\tNextSampleHit = next_event*clk_cntr;\n"
"  \t\t// printf(\"  Next: %e\\n\", NextSampleHit);\n"
"  \t}\n"
"}\n"
"\n"
"// Interpolate the carrier output at minor steps and output the synchrnoisati"
"on impulse\n"
"for (int id_channel = 0; id_channel < num_channel; id_channel++)\n"
"{\t\n"
"   double output;\n"
"\toutput = samplehit_pre_buf[id_channel].cntr +  \n"
"\t\t\t\t(CurrentTime/clk_cntr - samplehit_pre_buf[id_channel].tick)\n"
"\t\t\t\t/(samplehit_1st_buf[id_channel].tick - samplehit_pre_buf[id_channel]."
"tick)\n"
"\t\t\t\t*(samplehit_1st_buf[id_channel].cntr-samplehit_pre_buf[id_channel].cn"
"tr);\n"
"\tif (output > cntr_max_buf)\n"
"\t   output = cntr_max_buf;\n"
"\tif (output < 0.0)\n"
"\t   output = 0.0;\n"
"\tOutputSignal(0,id_channel) = output;\n"
"\tint int_output = output+0.5;\n"
"\tswitch(update_option)\n"
"\t{\n"
"\t\tcase UPD_MIN:\n"
"\t\t\tif(int_output == 0)\n"
"\t\t\t{\n"
"\t\t\t\tOutputSignal(1,id_channel) = 1.;\t\t\t\t\t\t\t\n"
"\t\t\t}\n"
"\t\t\telse\n"
"\t\t\t{\n"
"\t\t\t\tOutputSignal(1,id_channel) = 0.;\n"
"\t\t\t}\n"
"\t\t\tbreak;\n"
"\t\tcase UPD_MAX:\n"
"\t\t\tif(int_output == (int)(cntr_max_buf+0.5))\n"
"\t\t\t{\n"
"\t\t\t\tOutputSignal(1,id_channel) = 1.;\n"
"\t\t\t}\n"
"\t\t\telse\n"
"\t\t\t{\n"
"\t\t\t\tOutputSignal(1,id_channel) = 0.;\n"
"\t\t\t}\n"
"\t\t\tbreak;\n"
"\t\tcase UPD_MIN_MAX:\n"
"\t\t\tif(int_output == (int)(cntr_max_buf+0.5) || int_output == 0)\n"
"\t\t\t{\n"
"\t\t\t\tOutputSignal(1,id_channel) = 1.;\n"
"\t\t\t}\n"
"\t\t\telse\n"
"\t\t\t{\n"
"\t\t\t\tOutputSignal(1,id_channel) = 0.;\n"
"\t\t\t}\n"
"\t\t\tbreak;\n"
"\t\tdefault:\n"
"\t\t\tbreak;\n"
"\t}\n"
"\n"
"\tswitch(adcTrigger)\n"
"\t{\n"
"\t\tcase TRIG_MIN:\n"
"\t\t\tif(int_output == 0)\n"
"\t\t\t{\n"
"\t\t\t\tOutputSignal(2,id_channel) = 1.;\t\t\t\t\t\t\t\n"
"\t\t\t}\n"
"\t\t\telse\n"
"\t\t\t{\n"
"\t\t\t\tOutputSignal(2,id_channel) = 0.;\n"
"\t\t\t}\n"
"\t\t\tbreak;\n"
"\t\tcase TRIG_MAX:\n"
"\t\t\tif(int_output == (int)(cntr_max_buf+0.5))\n"
"\t\t\t{\n"
"\t\t\t\tOutputSignal(2,id_channel) = 1.;\n"
"\t\t\t}\n"
"\t\t\telse\n"
"\t\t\t{\n"
"\t\t\t\tOutputSignal(2,id_channel) = 0.;\n"
"\t\t\t}\n"
"\t\t\tbreak;\n"
"\t\tcase TRIG_MIN_MAX:\n"
"\t\t\tif(int_output == (int)(cntr_max_buf+0.5) || int_output == 0)\n"
"\t\t\t{\n"
"\t\t\t\tOutputSignal(2,id_channel) = 1.;\n"
"\t\t\t}\n"
"\t\t\telse\n"
"\t\t\t{\n"
"\t\t\t\tOutputSignal(2,id_channel) = 0.;\n"
"\t\t\t}\n"
"\t\t\tbreak;\n"
"\t\tdefault:\n"
"\t\t\tbreak;\n"
"\t}\n"
"}\n"
"\n"
"\n"
                          Show          off
                        }
                        Parameter {
                          Variable      "UpdateFcn"
                          Value         "first_step = 0;\n"
                          Show          off
                        }
                        Parameter {
                          Variable      "DerivativeFcn"
                          Value         ""
                          Show          off
                        }
                        Parameter {
                          Variable      "TerminateFcn"
                          Value         "free(samplehit_pre_buf);\n"
"free(samplehit_1st_buf);\n"
"free(samplehit_2nd_buf);\n"
"free(samplehit_3rd_buf);\n"
                          Show          off
                        }
                        Parameter {
                          Variable      "StoreCustomStateFcn"
                          Value         ""
                          Show          off
                        }
                        Parameter {
                          Variable      "RestoreCustomStateFcn"
                          Value         ""
                          Show          off
                        }
                      }
                      Component {
                        Type          Output
                        Name          "adc"
                        Show          on
                        Position      [340, 125]
                        Direction     right
                        Flipped       off
                        LabelPosition south
                        Parameter {
                          Variable      "Index"
                          Value         "5"
                          Show          on
                        }
                        Parameter {
                          Variable      "Width"
                          Value         "-1"
                          Show          off
                        }
                      }
                      Connection {
                        Type          Signal
                        SrcComponent  "prd"
                        SrcTerminal   1
                        DstComponent  "Gain"
                        DstTerminal   1
                      }
                      Connection {
                        Type          Signal
                        SrcComponent  "Carrier"
                        SrcTerminal   4
                        DstComponent  "sync"
                        DstTerminal   1
                      }
                      Connection {
                        Type          Signal
                        SrcComponent  "Carrier"
                        SrcTerminal   3
                        Points        [280, 85; 280, 65]
                        DstComponent  "cntr"
                        DstTerminal   1
                      }
                      Connection {
                        Type          Signal
                        SrcComponent  "ph"
                        SrcTerminal   1
                        DstComponent  "Carrier"
                        DstTerminal   2
                      }
                      Connection {
                        Type          Signal
                        SrcComponent  "Gain"
                        SrcTerminal   2
                        Points        [140, 60; 140, 90]
                        DstComponent  "Carrier"
                        DstTerminal   1
                      }
                      Connection {
                        Type          Signal
                        SrcComponent  "Carrier"
                        SrcTerminal   5
                        Points        [280, 105; 280, 125]
                        DstComponent  "adc"
                        DstTerminal   1
                      }
                    }
                  }
                  Parameter {
                    Variable      "Configuration"
                    Value         "type+1"
                    Show          off
                  }
                }
                Component {
                  Type          Constant
                  Name          "Constant2"
                  Show          off
                  Position      [705, 215]
                  Direction     right
                  Flipped       on
                  LabelPosition south
                  Frame         [-45, -10; 45, 10]
                  Parameter {
                    Variable      "Value"
                    Value         "active_polarity"
                    Show          off
                  }
                  Parameter {
                    Variable      "DataType"
                    Value         "10"
                    Show          off
                  }
                }
                Component {
                  Type          SignalSwitch
                  Name          "Switch1"
                  Show          off
                  Position      [650, 180]
                  Direction     left
                  Flipped       on
                  LabelPosition north
                  Parameter {
                    Variable      "Criteria"
                    Value         "2"
                    Show          off
                  }
                  Parameter {
                    Variable      "Threshold"
                    Value         "0"
                    Show          off
                  }
                }
                Component {
                  Type          LogicalOperator
                  Name          "Logical\nOperator"
                  Show          off
                  Position      [420, 190]
                  Direction     up
                  Flipped       off
                  LabelPosition south
                  Parameter {
                    Variable      "Operator"
                    Value         "6"
                    Show          off
                  }
                  Parameter {
                    Variable      "Inputs"
                    Value         "2"
                    Show          off
                  }
                }
                Component {
                  Type          LogicalOperator
                  Name          "Logical\nOperator1"
                  Show          off
                  Position      [595, 175]
                  Direction     up
                  Flipped       off
                  LabelPosition south
                  Parameter {
                    Variable      "Operator"
                    Value         "6"
                    Show          off
                  }
                  Parameter {
                    Variable      "Inputs"
                    Value         "2"
                    Show          off
                  }
                }
                Component {
                  Type          Saturation
                  Name          "Saturation"
                  Show          off
                  Position      [195, 155]
                  Direction     right
                  Flipped       off
                  LabelPosition south
                  Parameter {
                    Variable      "UpperLimit"
                    Value         "65535"
                    Show          off
                  }
                  Parameter {
                    Variable      "LowerLimit"
                    Value         "20"
                    Show          off
                  }
                }
                Component {
                  Type          Input
                  Name          "d'"
                  Show          on
                  Position      [40, 45]
                  Direction     right
                  Flipped       off
                  LabelPosition south
                  Parameter {
                    Variable      "Index"
                    Value         "5"
                    Show          on
                  }
                  Parameter {
                    Variable      "Width"
                    Value         "-1"
                    Show          off
                  }
                }
                Component {
                  Type          Output
                  Name          "adc"
                  Show          on
                  Position      [710, 260]
                  Direction     right
                  Flipped       off
                  LabelPosition south
                  Parameter {
                    Variable      "Index"
                    Value         "6"
                    Show          on
                  }
                  Parameter {
                    Variable      "Width"
                    Value         "-1"
                    Show          off
                  }
                }
                Connection {
                  Type          Signal
                  SrcComponent  "Constant3"
                  SrcTerminal   1
                  Points        [110, 170; 110, 160]
                  DstComponent  "Divide"
                  DstTerminal   2
                }
                Connection {
                  Type          Signal
                  SrcComponent  "Sum"
                  SrcTerminal   1
                  DstComponent  "Gain1"
                  DstTerminal   1
                }
                Connection {
                  Type          Signal
                  SrcComponent  "Constant"
                  SrcTerminal   1
                  Points        [100, 80]
                  DstComponent  "Sum"
                  DstTerminal   3
                }
                Connection {
                  Type          Signal
                  SrcComponent  "Gain1"
                  SrcTerminal   2
                  DstComponent  "Product2"
                  DstTerminal   3
                }
                Connection {
                  Type          Signal
                  SrcComponent  "Product2"
                  SrcTerminal   1
                  DstComponent  "Configurable\nSubsystem"
                  DstTerminal   1
                }
                Connection {
                  Type          Signal
                  SrcComponent  "m"
                  SrcTerminal   1
                  DstComponent  "Sum"
                  DstTerminal   2
                }
                Connection {
                  Type          Signal
                  SrcComponent  "Constant1"
                  SrcTerminal   1
                  Points        [475, 215]
                  DstComponent  "Switch"
                  DstTerminal   4
                }
                Connection {
                  Type          Signal
                  SrcComponent  "Switch"
                  SrcTerminal   1
                  DstComponent  "Turn-on Delay1"
                  DstTerminal   1
                }
                Connection {
                  Type          Signal
                  SrcComponent  "Comparator"
                  SrcTerminal   3
                  Points        [390, 175]
                  Branch {
                    DstComponent  "Switch"
                    DstTerminal   3
                  }
                  Branch {
                    DstComponent  "Logical\nOperator"
                    DstTerminal   2
                  }
                }
                Connection {
                  Type          Signal
                  SrcComponent  "fc'"
                  SrcTerminal   1
                  DstComponent  "init"
                  DstTerminal   2
                }
                Connection {
                  Type          Signal
                  SrcComponent  "init"
                  SrcTerminal   1
                  DstComponent  "Divide"
                  DstTerminal   3
                }
                Connection {
                  Type          Signal
                  SrcComponent  "Carrier"
                  SrcTerminal   3
                  Points        [305, 170]
                  DstComponent  "Configurable\nSubsystem"
                  DstTerminal   3
                }
                Connection {
                  Type          Signal
                  SrcComponent  "Configurable\nSubsystem"
                  SrcTerminal   2
                  Points        [335, 115; 335, 170]
                  DstComponent  "Comparator"
                  DstTerminal   1
                }
                Connection {
                  Type          Signal
                  SrcComponent  "ph'"
                  SrcTerminal   1
                  DstComponent  "Carrier"
                  DstTerminal   4
                }
                Connection {
                  Type          Signal
                  SrcComponent  "Carrier"
                  SrcTerminal   2
                  DstComponent  "Comparator"
                  DstTerminal   2
                }
                Connection {
                  Type          Signal
                  SrcComponent  "Constant2"
                  SrcTerminal   1
                  Points        [650, 215]
                  DstComponent  "Switch1"
                  DstTerminal   4
                }
                Connection {
                  Type          Signal
                  SrcComponent  "Switch1"
                  SrcTerminal   1
                  DstComponent  "sw"
                  DstTerminal   1
                }
                Connection {
                  Type          Signal
                  SrcComponent  "Logical\nOperator"
                  SrcTerminal   1
                  Points        [445, 190]
                  DstComponent  "Switch"
                  DstTerminal   2
                }
                Connection {
                  Type          Signal
                  SrcComponent  "Divide"
                  SrcTerminal   1
                  DstComponent  "Saturation"
                  DstTerminal   1
                }
                Connection {
                  Type          Signal
                  SrcComponent  "Saturation"
                  SrcTerminal   2
                  Points        [220, 155]
                  Branch {
                    DstComponent  "Product2"
                    DstTerminal   2
                  }
                  Branch {
                    Points        [220, 170]
                    DstComponent  "Carrier"
                    DstTerminal   1
                  }
                }
                Connection {
                  Type          Signal
                  SrcComponent  "Logical\nOperator1"
                  SrcTerminal   1
                  DstComponent  "Switch1"
                  DstTerminal   3
                }
                Connection {
                  Type          Signal
                  SrcComponent  "Turn-on Delay1"
                  SrcTerminal   2
                  Points        [565, 175]
                  Branch {
                    DstComponent  "Logical\nOperator1"
                    DstTerminal   2
                  }
                  Branch {
                    Points        [565, 195; 620, 195]
                    DstComponent  "Switch1"
                    DstTerminal   2
                  }
                }
                Connection {
                  Type          Signal
                  SrcComponent  "d'"
                  SrcTerminal   1
                  Points        [505, 45; 505, 170]
                  DstComponent  "Turn-on Delay1"
                  DstTerminal   3
                }
                Connection {
                  Type          Signal
                  SrcComponent  "Carrier"
                  SrcTerminal   5
                  Points        [310, 190; 310, 260]
                  DstComponent  "adc"
                  DstTerminal   1
                }
              }
            }
            Component {
              Type          EventOutput
              Name          "ADC"
              Show          on
              Position      [395, 205]
              Direction     right
              Flipped       off
              LabelPosition south
              Parameter {
                Variable      "Index"
                Value         "2"
                Show          on
              }
              Parameter {
                Variable      "Width"
                Value         "numel(channel)"
                Show          off
              }
            }
            Component {
              Type          Constant
              Name          "Constant6"
              Show          off
              Position      [60, 200]
              Direction     right
              Flipped       off
              LabelPosition south
              Frame         [-10, -10; 10, 10]
              Parameter {
                Variable      "Value"
                Value         "delay_sec"
                Show          off
              }
              Parameter {
                Variable      "DataType"
                Value         "10"
                Show          off
              }
            }
            Component {
              Type          ConfigurableSubsystem
              Name          "Powerstage Protection\nStatus"
              Show          on
              Position      [255, 75]
              Direction     up
              Flipped       off
              LabelPosition south
              Frame         [-25, -15; 25, 15]
              SampleTime    "-1"
              CodeGenDiscretizationMethod "2"
              CodeGenTarget "Generic"
              MaskDisplayLang "2"
              MaskIconFrame on
              MaskIconOpaque off
              MaskIconRotates on
              Terminal {
                Type          Output
                Position      [29, 0]
                Direction     right
              }
              TerminalNames { "Out" }
              Location      [468, 133; 909, 406]
              ZoomFactor    1
              SliderPosition [0, 0]
              ShowBrowser   off
              BrowserWidth  100
              Configurations {
                Name          "None"
                Schematic {
                  Component {
                    Type          Output
                    Name          "Out"
                    Show          on
                    Position      [300, 80]
                    Direction     right
                    Flipped       off
                    LabelPosition south
                    Parameter {
                      Variable      "Index"
                      Value         "1"
                      Show          on
                    }
                    Parameter {
                      Variable      "Width"
                      Value         "-1"
                      Show          off
                    }
                  }
                  Component {
                    Type          Constant
                    Name          "Constant"
                    Show          on
                    Position      [145, 80]
                    Direction     right
                    Flipped       off
                    LabelPosition south
                    Frame         [-10, -10; 10, 10]
                    Parameter {
                      Variable      "Value"
                      Value         "1"
                      Show          off
                    }
                    Parameter {
                      Variable      "DataType"
                      Value         "10"
                      Show          off
                    }
                  }
                  Connection {
                    Type          Signal
                    SrcComponent  "Constant"
                    SrcTerminal   1
                    DstComponent  "Out"
                    DstTerminal   1
                  }
                }
                Name          "Unit 1"
                Schematic {
                  Component {
                    Type          Output
                    Name          "Out"
                    Show          on
                    Position      [300, 80]
                    Direction     right
                    Flipped       off
                    LabelPosition south
                    Parameter {
                      Variable      "Index"
                      Value         "1"
                      Show          on
                    }
                    Parameter {
                      Variable      "Width"
                      Value         "-1"
                      Show          off
                    }
                  }
                  Component {
                    Type          From
                    Name          "From"
                    Show          off
                    Position      [150, 80]
                    Direction     right
                    Flipped       off
                    LabelPosition south
                    Parameter {
                      Variable      "Tag"
                      Value         "PowerStageProtectionUnit1"
                      Show          off
                    }
                    Parameter {
                      Variable      "Visibility"
                      Value         "4"
                      Show          off
                    }
                    Parameter {
                      Variable      "NoMatchingCounterpartAction"
                      Value         "2"
                      Show          off
                    }
                    Parameter {
                      Variable      "CustomMessage"
                      Value         "pspMessage"
                      Show          off
                      Evaluate      on
                    }
                    Parameter {
                      Variable      "HighlightLevel"
                      Value         "2"
                      Show          off
                    }
                  }
                  Component {
                    Type          LogicalOperator
                    Name          "Logical\nOperator"
                    Show          off
                    Position      [220, 80]
                    Direction     up
                    Flipped       off
                    LabelPosition south
                    Parameter {
                      Variable      "Operator"
                      Value         "6"
                      Show          off
                    }
                    Parameter {
                      Variable      "Inputs"
                      Value         "2"
                      Show          off
                    }
                  }
                  Connection {
                    Type          Signal
                    SrcComponent  "From"
                    SrcTerminal   1
                    DstComponent  "Logical\nOperator"
                    DstTerminal   2
                  }
                  Connection {
                    Type          Signal
                    SrcComponent  "Logical\nOperator"
                    SrcTerminal   1
                    DstComponent  "Out"
                    DstTerminal   1
                  }
                }
                Name          "Unit 2"
                Schematic {
                  Component {
                    Type          Output
                    Name          "Out"
                    Show          on
                    Position      [300, 80]
                    Direction     right
                    Flipped       off
                    LabelPosition south
                    Parameter {
                      Variable      "Index"
                      Value         "1"
                      Show          on
                    }
                    Parameter {
                      Variable      "Width"
                      Value         "-1"
                      Show          off
                    }
                  }
                  Component {
                    Type          From
                    Name          "From"
                    Show          off
                    Position      [150, 80]
                    Direction     right
                    Flipped       off
                    LabelPosition south
                    Parameter {
                      Variable      "Tag"
                      Value         "PowerStageProtectionUnit2"
                      Show          off
                    }
                    Parameter {
                      Variable      "Visibility"
                      Value         "4"
                      Show          off
                    }
                    Parameter {
                      Variable      "NoMatchingCounterpartAction"
                      Value         "2"
                      Show          off
                    }
                    Parameter {
                      Variable      "CustomMessage"
                      Value         "pspMessage"
                      Show          off
                      Evaluate      on
                    }
                    Parameter {
                      Variable      "HighlightLevel"
                      Value         "2"
                      Show          off
                    }
                  }
                  Component {
                    Type          LogicalOperator
                    Name          "Logical\nOperator"
                    Show          off
                    Position      [220, 80]
                    Direction     up
                    Flipped       off
                    LabelPosition south
                    Parameter {
                      Variable      "Operator"
                      Value         "6"
                      Show          off
                    }
                    Parameter {
                      Variable      "Inputs"
                      Value         "2"
                      Show          off
                    }
                  }
                  Connection {
                    Type          Signal
                    SrcComponent  "From"
                    SrcTerminal   1
                    DstComponent  "Logical\nOperator"
                    DstTerminal   2
                  }
                  Connection {
                    Type          Signal
                    SrcComponent  "Logical\nOperator"
                    SrcTerminal   1
                    DstComponent  "Out"
                    DstTerminal   1
                  }
                }
                Name          "Unit 3"
                Schematic {
                  Component {
                    Type          Output
                    Name          "Out"
                    Show          on
                    Position      [300, 80]
                    Direction     right
                    Flipped       off
                    LabelPosition south
                    Parameter {
                      Variable      "Index"
                      Value         "1"
                      Show          on
                    }
                    Parameter {
                      Variable      "Width"
                      Value         "-1"
                      Show          off
                    }
                  }
                  Component {
                    Type          From
                    Name          "From"
                    Show          off
                    Position      [150, 80]
                    Direction     right
                    Flipped       off
                    LabelPosition south
                    Parameter {
                      Variable      "Tag"
                      Value         "PowerStageProtectionUnit3"
                      Show          off
                    }
                    Parameter {
                      Variable      "Visibility"
                      Value         "4"
                      Show          off
                    }
                    Parameter {
                      Variable      "NoMatchingCounterpartAction"
                      Value         "2"
                      Show          off
                    }
                    Parameter {
                      Variable      "CustomMessage"
                      Value         "pspMessage"
                      Show          off
                      Evaluate      on
                    }
                    Parameter {
                      Variable      "HighlightLevel"
                      Value         "2"
                      Show          off
                    }
                  }
                  Component {
                    Type          LogicalOperator
                    Name          "Logical\nOperator"
                    Show          off
                    Position      [220, 80]
                    Direction     up
                    Flipped       off
                    LabelPosition south
                    Parameter {
                      Variable      "Operator"
                      Value         "6"
                      Show          off
                    }
                    Parameter {
                      Variable      "Inputs"
                      Value         "2"
                      Show          off
                    }
                  }
                  Connection {
                    Type          Signal
                    SrcComponent  "From"
                    SrcTerminal   1
                    DstComponent  "Logical\nOperator"
                    DstTerminal   2
                  }
                  Connection {
                    Type          Signal
                    SrcComponent  "Logical\nOperator"
                    SrcTerminal   1
                    DstComponent  "Out"
                    DstTerminal   1
                  }
                }
                Name          "Unit 4"
                Schematic {
                  Component {
                    Type          Output
                    Name          "Out"
                    Show          on
                    Position      [300, 80]
                    Direction     right
                    Flipped       off
                    LabelPosition south
                    Parameter {
                      Variable      "Index"
                      Value         "1"
                      Show          on
                    }
                    Parameter {
                      Variable      "Width"
                      Value         "-1"
                      Show          off
                    }
                  }
                  Component {
                    Type          From
                    Name          "From"
                    Show          off
                    Position      [150, 80]
                    Direction     right
                    Flipped       off
                    LabelPosition south
                    Parameter {
                      Variable      "Tag"
                      Value         "PowerStageProtectionUnit4"
                      Show          off
                    }
                    Parameter {
                      Variable      "Visibility"
                      Value         "4"
                      Show          off
                    }
                    Parameter {
                      Variable      "NoMatchingCounterpartAction"
                      Value         "2"
                      Show          off
                    }
                    Parameter {
                      Variable      "CustomMessage"
                      Value         "pspMessage"
                      Show          off
                      Evaluate      on
                    }
                    Parameter {
                      Variable      "HighlightLevel"
                      Value         "2"
                      Show          off
                    }
                  }
                  Component {
                    Type          LogicalOperator
                    Name          "Logical\nOperator"
                    Show          off
                    Position      [220, 80]
                    Direction     up
                    Flipped       off
                    LabelPosition south
                    Parameter {
                      Variable      "Operator"
                      Value         "6"
                      Show          off
                    }
                    Parameter {
                      Variable      "Inputs"
                      Value         "2"
                      Show          off
                    }
                  }
                  Connection {
                    Type          Signal
                    SrcComponent  "From"
                    SrcTerminal   1
                    DstComponent  "Logical\nOperator"
                    DstTerminal   2
                  }
                  Connection {
                    Type          Signal
                    SrcComponent  "Logical\nOperator"
                    SrcTerminal   1
                    DstComponent  "Out"
                    DstTerminal   1
                  }
                }
              }
              Parameter {
                Variable      "Configuration"
                Value         "pspUnit+1"
                Show          off
              }
            }
            Component {
              Type          SignalSwitch
              Name          "Switch"
              Show          off
              Position      [335, 125]
              Direction     right
              Flipped       off
              LabelPosition south
              Parameter {
                Variable      "Criteria"
                Value         "3"
                Show          off
              }
              Parameter {
                Variable      "Threshold"
                Value         "0"
                Show          off
              }
            }
            Component {
              Type          Constant
              Name          "Constant"
              Show          off
              Position      [255, 145]
              Direction     right
              Flipped       off
              LabelPosition south
              Frame         [-35, -10; 35, 10]
              Parameter {
                Variable      "Value"
                Value         "safe_state"
                Show          off
              }
              Parameter {
                Variable      "DataType"
                Value         "10"
                Show          off
              }
            }
            Component {
              Type          SignalSwitch
              Name          "Switch1"
              Show          off
              Position      [335, 205]
              Direction     right
              Flipped       off
              LabelPosition south
              Parameter {
                Variable      "Criteria"
                Value         "3"
                Show          off
              }
              Parameter {
                Variable      "Threshold"
                Value         "0"
                Show          off
              }
            }
            Component {
              Type          Constant
              Name          "Constant1"
              Show          off
              Position      [255, 225]
              Direction     right
              Flipped       off
              LabelPosition south
              Frame         [-35, -10; 35, 10]
              Parameter {
                Variable      "Value"
                Value         "0"
                Show          off
              }
              Parameter {
                Variable      "DataType"
                Value         "10"
                Show          off
              }
            }
            Connection {
              Type          Signal
              SrcComponent  "Constant4"
              SrcTerminal   1
              DstComponent  "PWM"
              DstTerminal   3
            }
            Connection {
              Type          Signal
              SrcComponent  "In1"
              SrcTerminal   1
              Points        [85, 80]
              DstComponent  "PWM"
              DstTerminal   4
            }
            Connection {
              Type          Signal
              SrcComponent  "Constant5"
              SrcTerminal   1
              Points        [80, 160; 80, 130]
              DstComponent  "PWM"
              DstTerminal   2
            }
            Connection {
              Type          Signal
              SrcComponent  "Constant6"
              SrcTerminal   1
              Points        [85, 200]
              DstComponent  "PWM"
              DstTerminal   5
            }
            Connection {
              Type          Signal
              SrcComponent  "Constant"
              SrcTerminal   1
              Points        [305, 145]
              DstComponent  "Switch"
              DstTerminal   3
            }
            Connection {
              Type          Signal
              SrcComponent  "PWM"
              SrcTerminal   1
              DstComponent  "Switch"
              DstTerminal   2
            }
            Connection {
              Type          Signal
              SrcComponent  "Switch"
              SrcTerminal   1
              DstComponent  "1"
              DstTerminal   1
            }
            Connection {
              Type          Signal
              SrcComponent  "Switch1"
              SrcTerminal   1
              DstComponent  "ADC"
              DstTerminal   1
            }
            Connection {
              Type          Signal
              SrcComponent  "PWM"
              SrcTerminal   6
              Points        [185, 140; 185, 200]
              DstComponent  "Switch1"
              DstTerminal   2
            }
            Connection {
              Type          Signal
              SrcComponent  "Constant1"
              SrcTerminal   1
              Points        [300, 225; 300, 210]
              DstComponent  "Switch1"
              DstTerminal   3
            }
            Connection {
              Type          Signal
              SrcComponent  "Powerstage Protection\nStatus"
              SrcTerminal   1
              Points        [285, 55; 335, 55]
              Branch {
                DstComponent  "Switch"
                DstTerminal   4
              }
              Branch {
                Points        [455, 55; 455, 165; 335, 165]
                DstComponent  "Switch1"
                DstTerminal   4
              }
            }
          }
        }
        Component {
          Type          TargetCode
          Name          "PWM Capture1"
          Show          on
          Position      [1600, 1590]
          Direction     up
          Flipped       off
          LabelPosition south
          Frame         [-25, -20; 25, 20]
          TargetPortIndices "16"
          SampleTime    "0"
          EnforceBaseTask "4"
          CodeFcnLang   "2"
          CodeFcn       "if not string.find(Target.Family, \"PLECS RT Box\") t"
"hen\n"
"  return \"This block can only be used with a PLECS RT Box target.\"\n"
"end\n"
"\n"
"local block = Target.Coder.CreateTargetBlock(\"PWMCapture\")\n"
"return block:getDirectFeedthroughCode()\n"
          MaskType      "PWM Capture"
          MaskDescription "Averages a digital input over one model step.\n"
"\n"
"The output signal corresponds to the percentage of time during which a digita"
"l input signal was active over the last model step period."
          MaskHelp      "qthelp://com.plexim.rtbox.1.0/doc/component-reference"
"/pwmcap_rtbox.html"
          MaskDisplay   "Icon:text('PWM\\nCapture')\n"
"local status, IconLib = pcall (require, 'IconLib' )\n"
"if not status then\n"
"\treturn\n"
"end\n"
"\n"
"IconLib.drawPatch()"
          MaskDisplayLang "2"
          MaskIconFrame on
          MaskIconOpaque off
          MaskIconRotates off
          MaskInit      "polarity = plVectorize(polarity,channel);\n"
"polarity = double(polarity > 0);% vector of 1 and 0\n"
"\n"
"currentCircuit = plecs('get', '', 'CurrentCircuit');\n"
"aggregationMode = plecs('get', currentCircuit, 'AggregationMode');\n"
"target = plecs('get', '.', 'CompiledCodeGenTarget');\n"
"if isempty(target) || ~isfield(target, 'Family') || ...\n"
"   (~strcmp(target.Family, 'PLECS RT Box') && ~strcmp(target.Name, 'Generic')"
"),\n"
"  error('A PWM Capture block can only be used in a model or subsystem for whi"
"ch code generation has been enabled.');\n"
"end\n"
"Ts = target.Variables.SAMPLE_TIME;\n"
"% If multi-tasking is configured use the task sample time.\n"
"task = plecs('get', '.', 'CompiledTask');\n"
"if isfield(task, 'SampleTime'),\n"
"   Ts = task.SampleTime(1);\n"
"end\n"
"if ~(Ts > 0),\n"
"  plTspTarget('logSAMPLE_TIME_error')\n"
"end\n"
"\n"
"if offlineBehavior == 1,\n"
"  averagingConfig = 2;\n"
"else\n"
"  averagingConfig = 1;\n"
"end\n"
"\n"
"if offlineBehavior == 2 && ~any(strcmp(aggregationMode, {'CodeGen', 'ExtMode'"
"})),\n"
"  outputDataType = 1; % bool\n"
"else\n"
"  outputDataType = 8; % float\n"
"end\n"
          MaskDialogCallback "-- backwards compatibility\n"
"Dialog:set(\"Ts\", \"Visible\", false)\n"
"if Dialog:get(\"Ts\") == \"0\" then\n"
"  Dialog:set(\"offlineBehavior\", \"Value\", \"2\")\n"
"  Dialog:set(\"Ts\", \"Value\", \"\", \"Visible\", false)\n"
"end\n"
          Parameter {
            Variable      "channel"
            Prompt        "Digital input channel(s)"
            Type          FreeText
            Constraints   "integer,nonEmpty,nonNegative,vector"
            Value         "[3 4 5 6 7 8 9 10 11 12 13 14]"
            Show          off
            Tunable       off
            TabName       ""
          }
          Parameter {
            Variable      "polarity"
            Prompt        "Channel(s) active polarity"
            Type          FreeText
            Constraints   "integer,nonEmpty,nonNegative,vector"
            Value         "1"
            Show          off
            Tunable       off
            TabName       ""
          }
          Parameter {
            Variable      "inputType"
            Prompt        "Input characteristic"
            Type          FixedText
            PossibleValues {"high impedance", "pull-down", "pull-up"}
            Value         "1"
            Show          off
            Tunable       off
            TabName       ""
          }
          Parameter {
            Variable      "Ts"
            Prompt        "Averaging interval (offline only)"
            Type          FreeText
            Constraints   "finite,nonNegative,scalar"
            Value         "Ts_plant"
            Show          off
            Tunable       off
            TabName       ""
          }
          Parameter {
            Variable      "offlineBehavior"
            Prompt        "Offline behavior"
            Type          FixedText
            PossibleValues {"Sub-cycle average", "Nanostep"}
            Value         "1"
            Show          off
            Tunable       off
            TabName       ""
          }
          Terminal {
            Type          Output
            Position      [29, 0]
            Direction     right
          }
          Schematic {
            Location      [1580, 225; 2466, 1246]
            ZoomFactor    1
            SliderPosition [0, 0]
            ShowBrowser   off
            BrowserWidth  100
            Component {
              Type          TargetInput
              Name          "1"
              Show          on
              Position      [50, 110]
              Direction     right
              Flipped       off
              LabelPosition south
              Parameter {
                Variable      "Width"
                Value         "numel(channel)"
                Show          off
              }
            }
            Component {
              Type          Output
              Name          "Out1"
              Show          off
              Position      [325, 110]
              Direction     right
              Flipped       off
              LabelPosition south
              Parameter {
                Variable      "Index"
                Value         "1"
                Show          on
              }
              Parameter {
                Variable      "DataType"
                Value         "outputDataType"
                Show          off
              }
              Parameter {
                Variable      "DataTypeOverflowMode"
                Value         "1"
                Show          off
              }
              Parameter {
                Variable      "Width"
                Value         "numel(channel)"
                Show          off
              }
            }
            Component {
              Type          ConfigurableSubsystem
              Name          "Averaging"
              Show          on
              Position      [200, 110]
              Direction     up
              Flipped       off
              LabelPosition south
              Frame         [-25, -15; 25, 15]
              SampleTime    "-1"
              CodeGenDiscretizationMethod "2"
              CodeGenTarget "Generic"
              MaskDisplayLang "2"
              MaskIconFrame on
              MaskIconOpaque off
              MaskIconRotates on
              Terminal {
                Type          Input
                Position      [-25, 0]
                Direction     left
              }
              Terminal {
                Type          Output
                Position      [29, 0]
                Direction     right
              }
              TerminalNames { "In1", "Out1" }
              Location      [468, 133; 909, 410]
              ZoomFactor    1
              SliderPosition [0, 0]
              ShowBrowser   off
              BrowserWidth  100
              Configurations {
                Name          "Direct"
                Schematic {
                  Component {
                    Type          Input
                    Name          "In1"
                    Show          on
                    Position      [95, 70]
                    Direction     right
                    Flipped       off
                    LabelPosition south
                    Parameter {
                      Variable      "Index"
                      Value         "1"
                      Show          on
                    }
                    Parameter {
                      Variable      "Width"
                      Value         "-1"
                      Show          off
                    }
                  }
                  Component {
                    Type          Output
                    Name          "Out1"
                    Show          on
                    Position      [395, 75]
                    Direction     right
                    Flipped       off
                    LabelPosition south
                    Parameter {
                      Variable      "Index"
                      Value         "2"
                      Show          on
                    }
                    Parameter {
                      Variable      "Width"
                      Value         "-1"
                      Show          off
                    }
                  }
                  Component {
                    Type          Constant
                    Name          "Constant"
                    Show          off
                    Position      [250, 30]
                    Direction     right
                    Flipped       off
                    LabelPosition south
                    Frame         [-10, -10; 10, 10]
                    Parameter {
                      Variable      "Value"
                      Value         "polarity"
                      Show          on
                    }
                    Parameter {
                      Variable      "DataType"
                      Value         "10"
                      Show          off
                    }
                  }
                  Component {
                    Type          SignalSwitch
                    Name          "Switch"
                    Show          off
                    Position      [320, 75]
                    Direction     right
                    Flipped       off
                    LabelPosition south
                    Parameter {
                      Variable      "Criteria"
                      Value         "3"
                      Show          off
                    }
                    Parameter {
                      Variable      "Threshold"
                      Value         "0"
                      Show          off
                    }
                  }
                  Component {
                    Type          Constant
                    Name          "Constant1"
                    Show          off
                    Position      [195, 115]
                    Direction     right
                    Flipped       off
                    LabelPosition south
                    Frame         [-10, -10; 10, 10]
                    Parameter {
                      Variable      "Value"
                      Value         "1"
                      Show          off
                    }
                    Parameter {
                      Variable      "DataType"
                      Value         "10"
                      Show          off
                    }
                  }
                  Component {
                    Type          Sum
                    Name          "Sum"
                    Show          off
                    Position      [250, 90]
                    Direction     up
                    Flipped       off
                    LabelPosition south
                    Parameter {
                      Variable      "IconShape"
                      Value         "2"
                      Show          off
                    }
                    Parameter {
                      Variable      "Inputs"
                      Value         "|-+"
                      Show          off
                    }
                    Parameter {
                      Variable      "DataType"
                      Value         "10"
                      Show          off
                    }
                    Parameter {
                      Variable      "DataTypeOverflowMode"
                      Value         "1"
                      Show          off
                    }
                  }
                  Component {
                    Type          Saturation
                    Name          "Saturation"
                    Show          off
                    Position      [165, 70]
                    Direction     right
                    Flipped       off
                    LabelPosition south
                    Parameter {
                      Variable      "UpperLimit"
                      Value         "1"
                      Show          off
                    }
                    Parameter {
                      Variable      "LowerLimit"
                      Value         "0"
                      Show          off
                    }
                  }
                  Connection {
                    Type          Signal
                    SrcComponent  "Constant"
                    SrcTerminal   1
                    Points        [320, 30]
                    DstComponent  "Switch"
                    DstTerminal   4
                  }
                  Connection {
                    Type          Signal
                    SrcComponent  "Switch"
                    SrcTerminal   1
                    DstComponent  "Out1"
                    DstTerminal   1
                  }
                  Connection {
                    Type          Signal
                    SrcComponent  "Constant1"
                    SrcTerminal   1
                    DstComponent  "Sum"
                    DstTerminal   3
                  }
                  Connection {
                    Type          Signal
                    SrcComponent  "Sum"
                    SrcTerminal   1
                    Points        [280, 90; 280, 80]
                    DstComponent  "Switch"
                    DstTerminal   3
                  }
                  Connection {
                    Type          Signal
                    SrcComponent  "In1"
                    SrcTerminal   1
                    DstComponent  "Saturation"
                    DstTerminal   1
                  }
                  Connection {
                    Type          Signal
                    SrcComponent  "Saturation"
                    SrcTerminal   2
                    Points        [210, 70]
                    Branch {
                      DstComponent  "Switch"
                      DstTerminal   2
                    }
                    Branch {
                      Points        [210, 90]
                      DstComponent  "Sum"
                      DstTerminal   2
                    }
                  }
                }
                Name          "Averaged"
                Schematic {
                  Component {
                    Type          Input
                    Name          "In1"
                    Show          on
                    Position      [140, 80]
                    Direction     right
                    Flipped       off
                    LabelPosition south
                    Parameter {
                      Variable      "Index"
                      Value         "1"
                      Show          on
                    }
                    Parameter {
                      Variable      "Width"
                      Value         "-1"
                      Show          off
                    }
                  }
                  Component {
                    Type          Output
                    Name          "Out1"
                    Show          on
                    Position      [415, 80]
                    Direction     right
                    Flipped       off
                    LabelPosition south
                    Parameter {
                      Variable      "Index"
                      Value         "2"
                      Show          on
                    }
                    Parameter {
                      Variable      "Width"
                      Value         "-1"
                      Show          off
                    }
                  }
                  Component {
                    Type          PeriodicAverage
                    Name          "Periodic Average"
                    Show          off
                    Position      [310, 80]
                    Direction     up
                    Flipped       off
                    LabelPosition south
                    Parameter {
                      Variable      "T_average"
                      Value         "Ts"
                      Show          off
                    }
                  }
                  Component {
                    Type          ConstantRelationalOperator
                    Name          "Compare to\nConstant"
                    Show          off
                    Position      [255, 80]
                    Direction     right
                    Flipped       off
                    LabelPosition south
                    Frame         [-20, -10; 20, 10]
                    Parameter {
                      Variable      "Operator"
                      Value         "2"
                      Show          off
                    }
                    Parameter {
                      Variable      "Threshold"
                      Value         "polarity"
                      Show          off
                    }
                  }
                  Component {
                    Type          LogicalOperator
                    Name          "Logical\nOperator"
                    Show          off
                    Position      [200, 80]
                    Direction     up
                    Flipped       off
                    LabelPosition south
                    Parameter {
                      Variable      "Operator"
                      Value         "6"
                      Show          off
                    }
                    Parameter {
                      Variable      "Inputs"
                      Value         "1"
                      Show          off
                    }
                  }
                  Component {
                    Type          Saturation
                    Name          "Saturation"
                    Show          off
                    Position      [365, 80]
                    Direction     right
                    Flipped       off
                    LabelPosition south
                    Parameter {
                      Variable      "UpperLimit"
                      Value         "1"
                      Show          off
                    }
                    Parameter {
                      Variable      "LowerLimit"
                      Value         "0"
                      Show          off
                    }
                  }
                  Connection {
                    Type          Signal
                    SrcComponent  "Logical\nOperator"
                    SrcTerminal   1
                    DstComponent  "Compare to\nConstant"
                    DstTerminal   1
                  }
                  Connection {
                    Type          Signal
                    SrcComponent  "Compare to\nConstant"
                    SrcTerminal   2
                    DstComponent  "Periodic Average"
                    DstTerminal   2
                  }
                  Connection {
                    Type          Signal
                    SrcComponent  "Periodic Average"
                    SrcTerminal   1
                    DstComponent  "Saturation"
                    DstTerminal   1
                  }
                  Connection {
                    Type          Signal
                    SrcComponent  "In1"
                    SrcTerminal   1
                    DstComponent  "Logical\nOperator"
                    DstTerminal   2
                  }
                  Connection {
                    Type          Signal
                    SrcComponent  "Saturation"
                    SrcTerminal   2
                    DstComponent  "Out1"
                    DstTerminal   1
                  }
                }
              }
              Parameter {
                Variable      "Configuration"
                Value         "averagingConfig"
                Show          off
              }
            }
            Connection {
              Type          Signal
              SrcComponent  "1"
              SrcTerminal   1
              DstComponent  "Averaging"
              DstTerminal   1
            }
            Connection {
              Type          Signal
              SrcComponent  "Averaging"
              SrcTerminal   2
              DstComponent  "Out1"
              DstTerminal   1
            }
          }
        }
        Component {
          Type          Goto
          Name          "Goto5"
          Show          off
          Position      [1780, 1515]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "qB1"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Goto
          Name          "Goto6"
          Show          off
          Position      [1780, 1565]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "qB2"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Goto
          Name          "Goto7"
          Show          off
          Position      [1780, 1715]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "qC1"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Goto
          Name          "Goto8"
          Show          off
          Position      [1780, 1765]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "qC2"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Goto
          Name          "Goto11"
          Show          off
          Position      [1780, 1415]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "qA3"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Goto
          Name          "Goto12"
          Show          off
          Position      [1780, 1465]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "qA4"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Goto
          Name          "Goto13"
          Show          off
          Position      [1780, 1615]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "qB3"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Goto
          Name          "Goto16"
          Show          off
          Position      [1780, 1665]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "qB4"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Goto
          Name          "Goto17"
          Show          off
          Position      [1780, 1815]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "qC3"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Goto
          Name          "Goto22"
          Show          off
          Position      [1780, 1865]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "qC4"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Sum
          Name          "Sum6"
          Show          off
          Position      [2315, 1400]
          Direction     up
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "IconShape"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "Inputs"
            Value         "+-"
            Show          off
          }
          Parameter {
            Variable      "DataType"
            Value         "11"
            Show          off
          }
          Parameter {
            Variable      "DataTypeOverflowMode"
            Value         "1"
            Show          off
          }
        }
        Component {
          Type          Constant
          Name          "Constant6"
          Show          on
          Position      [2230, 1395]
          Direction     right
          Flipped       off
          LabelPosition south
          Frame         [-10, -10; 10, 10]
          Parameter {
            Variable      "Value"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "DataType"
            Value         "10"
            Show          off
          }
        }
        Component {
          Type          From
          Name          "From19"
          Show          off
          Position      [2255, 1445]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "qA3"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Goto
          Name          "Goto25"
          Show          off
          Position      [2380, 1400]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "qA3_bar"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Sum
          Name          "Sum7"
          Show          off
          Position      [2315, 1500]
          Direction     up
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "IconShape"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "Inputs"
            Value         "+-"
            Show          off
          }
          Parameter {
            Variable      "DataType"
            Value         "11"
            Show          off
          }
          Parameter {
            Variable      "DataTypeOverflowMode"
            Value         "1"
            Show          off
          }
        }
        Component {
          Type          Constant
          Name          "Constant7"
          Show          on
          Position      [2230, 1495]
          Direction     right
          Flipped       off
          LabelPosition south
          Frame         [-10, -10; 10, 10]
          Parameter {
            Variable      "Value"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "DataType"
            Value         "10"
            Show          off
          }
        }
        Component {
          Type          From
          Name          "From20"
          Show          off
          Position      [2255, 1545]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "qA4"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Goto
          Name          "Goto26"
          Show          off
          Position      [2380, 1500]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "qA4_bar"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Sum
          Name          "Sum12"
          Show          off
          Position      [2315, 1610]
          Direction     up
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "IconShape"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "Inputs"
            Value         "+-"
            Show          off
          }
          Parameter {
            Variable      "DataType"
            Value         "11"
            Show          off
          }
          Parameter {
            Variable      "DataTypeOverflowMode"
            Value         "1"
            Show          off
          }
        }
        Component {
          Type          Constant
          Name          "Constant8"
          Show          on
          Position      [2230, 1605]
          Direction     right
          Flipped       off
          LabelPosition south
          Frame         [-10, -10; 10, 10]
          Parameter {
            Variable      "Value"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "DataType"
            Value         "10"
            Show          off
          }
        }
        Component {
          Type          From
          Name          "From23"
          Show          off
          Position      [2255, 1655]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "qB3"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Goto
          Name          "Goto27"
          Show          off
          Position      [2380, 1610]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "qB3_bar"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Sum
          Name          "Sum13"
          Show          off
          Position      [2315, 1725]
          Direction     up
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "IconShape"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "Inputs"
            Value         "+-"
            Show          off
          }
          Parameter {
            Variable      "DataType"
            Value         "11"
            Show          off
          }
          Parameter {
            Variable      "DataTypeOverflowMode"
            Value         "1"
            Show          off
          }
        }
        Component {
          Type          Constant
          Name          "Constant9"
          Show          on
          Position      [2230, 1720]
          Direction     right
          Flipped       off
          LabelPosition south
          Frame         [-10, -10; 10, 10]
          Parameter {
            Variable      "Value"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "DataType"
            Value         "10"
            Show          off
          }
        }
        Component {
          Type          From
          Name          "From24"
          Show          off
          Position      [2255, 1770]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "qB4"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Goto
          Name          "Goto30"
          Show          off
          Position      [2380, 1725]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "qB4_bar"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Sum
          Name          "Sum14"
          Show          off
          Position      [2315, 1835]
          Direction     up
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "IconShape"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "Inputs"
            Value         "+-"
            Show          off
          }
          Parameter {
            Variable      "DataType"
            Value         "11"
            Show          off
          }
          Parameter {
            Variable      "DataTypeOverflowMode"
            Value         "1"
            Show          off
          }
        }
        Component {
          Type          Constant
          Name          "Constant10"
          Show          on
          Position      [2230, 1830]
          Direction     right
          Flipped       off
          LabelPosition south
          Frame         [-10, -10; 10, 10]
          Parameter {
            Variable      "Value"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "DataType"
            Value         "10"
            Show          off
          }
        }
        Component {
          Type          From
          Name          "From25"
          Show          off
          Position      [2255, 1880]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "qC3"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Goto
          Name          "Goto31"
          Show          off
          Position      [2380, 1835]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "qC3_bar"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Sum
          Name          "Sum15"
          Show          off
          Position      [2315, 1950]
          Direction     up
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "IconShape"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "Inputs"
            Value         "+-"
            Show          off
          }
          Parameter {
            Variable      "DataType"
            Value         "11"
            Show          off
          }
          Parameter {
            Variable      "DataTypeOverflowMode"
            Value         "1"
            Show          off
          }
        }
        Component {
          Type          Constant
          Name          "Constant11"
          Show          on
          Position      [2230, 1945]
          Direction     right
          Flipped       off
          LabelPosition south
          Frame         [-10, -10; 10, 10]
          Parameter {
            Variable      "Value"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "DataType"
            Value         "10"
            Show          off
          }
        }
        Component {
          Type          From
          Name          "From26"
          Show          off
          Position      [2255, 1995]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "qC4"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Goto
          Name          "Goto32"
          Show          off
          Position      [2380, 1950]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "qC4_bar"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Scope
          Name          "Scope13"
          Show          on
          Position      [2380, 1345]
          Direction     up
          Flipped       off
          LabelPosition south
          Frame         [-15, -15; 15, 15]
          Location      [0, 24; 1920, 1013]
          State         "AAAA/wAAAAD9AAAAAgAAAAEAAAAAAAAAAPwCAAAAA/sAAAAQAFoAb"
"wBvAG0AQQByAGUAYQAAAAAA/////wAAAC8A////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwAAAA"
"AA/////wAAAGEA////+wAAAAwAVAByAGEAYwBlAHMAAAAAAP////8AAABhAP///wAAAAMAAAAAAAA"
"AAPwBAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQAAAAAAP////8AAABEAP///wAAB4AAAAO+"
"AAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP////8AA"
"AAAAAAAAA=="
          SavedViews    "AAAAAgAAAAA="
          HeaderState   "{\"DefaultSecSize\":0,\"FirstSecSize\":154,\"Labels\""
":[],\"VisualIdxs\":[]}"
          PlotPalettes  "AAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
          Axes          "1"
          TimeRange     "0.0"
          ScrollingMode "1"
          SingleTimeAxis "1"
          Open          "0"
          Ts            "-1"
          SampleLimit   "25000"
          XAxisLabel    "Time / s"
          ShowLegend    "1"
          Axis {
            Name          ""
            AutoScale     1
            MinValue      0
            MaxValue      1
            Signals       {}
            SignalTypes   [ ]
            Untangle      0
            KeepBaseline  off
            BaselineValue 0
          }
          Fourier {
            SingleXAxis       on
            AxisLabel         "Frequency / Hz"
            Scaling           0
            PhaseDisplay      0
            ShowFourierLegend off
            Axis {
              Name          ""
              AutoScale     1
              MinValue      0
              MaxValue      1
              Signals       {}
              Untangle      0
              KeepBaseline  off
              BaselineValue 0
            }
          }
        }
        Component {
          Type          From
          Name          "From27"
          Show          off
          Position      [1250, 735]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "qA3"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          From
          Name          "From28"
          Show          off
          Position      [1250, 755]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "qA4"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          From
          Name          "From29"
          Show          off
          Position      [1170, 805]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "qA3_bar"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          From
          Name          "From30"
          Show          off
          Position      [1170, 825]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "qA4_bar"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          From
          Name          "From31"
          Show          off
          Position      [1250, 880]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "qB3"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          From
          Name          "From32"
          Show          off
          Position      [1250, 900]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "qB4"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          From
          Name          "From33"
          Show          off
          Position      [1170, 980]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "qB3_bar"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          From
          Name          "From34"
          Show          off
          Position      [1170, 1000]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "qB4_bar"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          From
          Name          "From35"
          Show          off
          Position      [1250, 1075]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "qC3"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          From
          Name          "From36"
          Show          off
          Position      [1250, 1095]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "qC4"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          From
          Name          "From37"
          Show          off
          Position      [1170, 1160]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "qC3_bar"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          From
          Name          "From38"
          Show          off
          Position      [1170, 1180]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "qC4_bar"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Reference
          SrcComponent  "Components/Electrical/Power Modules/MFB1"
          Name          "MFB3"
          Show          on
          Position      [1885, 1120]
          Direction     up
          Flipped       off
          LabelPosition west
          Frame         [-60, -60; 60, 60]
          Parameter {
            Variable      "semiSymbol"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "N"
            Value         "4"
            Show          off
          }
          Parameter {
            Variable      "assert"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "switchModel"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
          Parameter {
            Variable      "combineRevDiode"
            Value         "1"
            Show          off
          }
          Parameter {
            Variable      "thermalIgbtDiode"
            Value         ""
            Show          off
          }
          Parameter {
            Variable      "thermalIgbt"
            Value         ""
            Show          off
          }
          Parameter {
            Variable      "thermalMosfetDiode"
            Value         ""
            Show          off
          }
          Parameter {
            Variable      "thermalMosfet"
            Value         ""
            Show          off
          }
          Parameter {
            Variable      "thermalRevDiode"
            Value         ""
            Show          off
          }
          Parameter {
            Variable      "Configuration"
            Value         "2"
            Show          off
          }
          Terminal {
            Type          Input
            Position      [-60, -30]
            Direction     left
          }
          Terminal {
            Type          Port
            Position      [65, -5]
            Direction     right
          }
          Terminal {
            Type          Port
            Position      [65, 5]
            Direction     right
          }
          Terminal {
            Type          Port
            Position      [-65, -55]
            Direction     left
          }
          Terminal {
            Type          Input
            Position      [-60, 30]
            Direction     left
          }
          Terminal {
            Type          Port
            Position      [-65, 55]
            Direction     left
          }
          Terminal {
            Type          Input
            Position      [20, -30]
            Direction     left
          }
          Terminal {
            Type          Input
            Position      [20, 30]
            Direction     left
          }
        }
        Component {
          Type          Goto
          Name          "Goto33"
          Show          off
          Position      [2745, 790]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "Vab3"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Goto
          Name          "Goto34"
          Show          off
          Position      [2745, 810]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "Vab4"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Goto
          Name          "Goto35"
          Show          off
          Position      [2745, 930]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "Vbc3"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Goto
          Name          "Goto36"
          Show          off
          Position      [2745, 950]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "Vbc4"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Goto
          Name          "Goto37"
          Show          off
          Position      [2745, 1075]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "Vca3"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Component {
          Type          Goto
          Name          "Goto38"
          Show          off
          Position      [2745, 1095]
          Direction     right
          Flipped       off
          LabelPosition south
          Parameter {
            Variable      "Tag"
            Value         "Vca4"
            Show          off
          }
          Parameter {
            Variable      "Visibility"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "NoMatchingCounterpartAction"
            Value         "2"
            Show          off
          }
          Parameter {
            Variable      "CustomMessage"
            Value         ""
            Show          off
            Evaluate      on
          }
          Parameter {
            Variable      "HighlightLevel"
            Value         "0"
            Show          off
          }
        }
        Connection {
          Type          Wire
          SrcComponent  "V_3ph"
          SrcTerminal   2
          DstComponent  "R5"
          DstTerminal   2
        }
        Connection {
          Type          Wire
          SrcComponent  "V_3ph"
          SrcTerminal   1
          Points        [1870, 405; 1870, 400]
          DstComponent  "R4"
          DstTerminal   2
        }
        Connection {
          Type          Wire
          SrcComponent  "V_3ph"
          SrcTerminal   3
          Points        [1870, 425; 1870, 430]
          DstComponent  "R6"
          DstTerminal   2
        }
        Connection {
          Type          Signal
          SrcComponent  "3ph Meter1"
          SrcTerminal   8
          DstComponent  base64 "U1ZH55S15rWB"
          DstTerminal   1
        }
        Connection {
          Type          Wire
          SrcComponent  "Ground8"
          SrcTerminal   1
          DstComponent  "3ph Meter2"
          DstTerminal   9
        }
        Connection {
          Type          Signal
          SrcComponent  "3ph Meter2"
          SrcTerminal   7
          Points        [1970, 350]
          DstComponent  base64 "5a+55q+U"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "3ph Meter2"
          SrcTerminal   8
          Points        [1980, 360]
          DstComponent  base64 "5a+55q+U"
          DstTerminal   2
        }
        Connection {
          Type          Wire
          SrcComponent  "3ph Meter2"
          SrcTerminal   1
          Points        [1945, 405; 1945, 400]
          DstComponent  "R4"
          DstTerminal   1
        }
        Connection {
          Type          Wire
          SrcComponent  "3ph Meter2"
          SrcTerminal   2
          DstComponent  "R5"
          DstTerminal   1
        }
        Connection {
          Type          Wire
          SrcComponent  "3ph Meter2"
          SrcTerminal   3
          Points        [1945, 425; 1945, 430]
          DstComponent  "R6"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "3ph Meter"
          SrcTerminal   7
          Points        [2085, 245]
          Branch {
            DstComponent  base64 "55S15Y6L"
            DstTerminal   1
          }
          Branch {
            Points        [2085, 195]
            DstComponent  "Analog Out 0-3"
            DstTerminal   1
          }
        }
        Connection {
          Type          Signal
          SrcComponent  "3ph Meter"
          SrcTerminal   8
          Points        [2095, 355]
          Branch {
            Points        [2095, 295]
            DstComponent  base64 "55S15rWB"
            DstTerminal   1
          }
          Branch {
            DstComponent  "Analog Out 3-6"
            DstTerminal   1
          }
        }
        Connection {
          Type          Wire
          SrcComponent  "Am1"
          SrcTerminal   2
          DstComponent  "L4"
          DstTerminal   2
        }
        Connection {
          Type          Wire
          SrcComponent  "Am2"
          SrcTerminal   2
          DstComponent  "L5"
          DstTerminal   2
        }
        Connection {
          Type          Wire
          SrcComponent  "Am3"
          SrcTerminal   2
          DstComponent  "L6"
          DstTerminal   2
        }
        Connection {
          Type          Signal
          SrcComponent  "Vm1"
          SrcTerminal   3
          Points        [2130, 855]
          DstComponent  "Mux1"
          DstTerminal   2
        }
        Connection {
          Type          Signal
          SrcComponent  "Vm2"
          SrcTerminal   3
          Points        [2215, 865]
          DstComponent  "Mux1"
          DstTerminal   3
        }
        Connection {
          Type          Signal
          SrcComponent  "Vm3"
          SrcTerminal   3
          Points        [2045, 875]
          DstComponent  "Mux1"
          DstTerminal   4
        }
        Connection {
          Type          Signal
          SrcComponent  "Mux"
          SrcTerminal   1
          Points        [2390, 825]
          Branch {
            Points        [2390, 785]
            DstComponent  "Analog Out 689"
            DstTerminal   1
          }
          Branch {
            Points        [2390, 855]
            DstComponent  "Scope"
            DstTerminal   1
          }
        }
        Connection {
          Type          Signal
          SrcComponent  "Mux1"
          SrcTerminal   1
          DstComponent  "Scope"
          DstTerminal   2
        }
        Connection {
          Type          Wire
          SrcComponent  "MFB1"
          SrcTerminal   4
          Points        [1760, 805]
          Branch {
            DstComponent  "C1"
            DstTerminal   1
          }
          Branch {
            Points        [1665, 805]
            Branch {
              Points        [1490, 805]
              DstComponent  "Vmab"
              DstTerminal   1
            }
            Branch {
              DstComponent  "R8"
              DstTerminal   1
            }
          }
        }
        Connection {
          Type          Wire
          SrcComponent  "C1"
          SrcTerminal   2
          Points        [1760, 915]
          Branch {
            Points        [1665, 915]
            Branch {
              Points        [1490, 915]
              DstComponent  "Vmab"
              DstTerminal   2
            }
            Branch {
              DstComponent  "V_dc2"
              DstTerminal   2
            }
          }
          Branch {
            DstComponent  "MFB1"
            DstTerminal   6
          }
        }
        Connection {
          Type          Wire
          SrcComponent  "MFB2"
          SrcTerminal   4
          Points        [1760, 935]
          Branch {
            DstComponent  "C2"
            DstTerminal   1
          }
          Branch {
            Points        [1665, 935]
            Branch {
              Points        [1490, 935]
              DstComponent  "Vmbc"
              DstTerminal   1
            }
            Branch {
              DstComponent  "R9"
              DstTerminal   1
            }
          }
        }
        Connection {
          Type          Wire
          SrcComponent  "C2"
          SrcTerminal   2
          Points        [1760, 1045]
          Branch {
            Points        [1665, 1045]
            Branch {
              Points        [1490, 1045]
              DstComponent  "Vmbc"
              DstTerminal   2
            }
            Branch {
              DstComponent  "V_dc3"
              DstTerminal   2
            }
          }
          Branch {
            DstComponent  "MFB2"
            DstTerminal   6
          }
        }
        Connection {
          Type          Wire
          SrcComponent  "MFB3"
          SrcTerminal   4
          Points        [1760, 1065]
          Branch {
            DstComponent  "C3"
            DstTerminal   1
          }
          Branch {
            Points        [1665, 1065]
            Branch {
              Points        [1490, 1065]
              DstComponent  "Vmca"
              DstTerminal   1
            }
            Branch {
              DstComponent  "R10"
              DstTerminal   1
            }
          }
        }
        Connection {
          Type          Wire
          SrcComponent  "C3"
          SrcTerminal   2
          Points        [1760, 1175]
          Branch {
            Points        [1665, 1175]
            Branch {
              Points        [1490, 1175]
              DstComponent  "Vmca"
              DstTerminal   2
            }
            Branch {
              DstComponent  "V_dc4"
              DstTerminal   2
            }
          }
          Branch {
            DstComponent  "MFB3"
            DstTerminal   6
          }
        }
        Connection {
          Type          Wire
          SrcComponent  "MFB1"
          SrcTerminal   3
          Points        [2090, 865]
          Branch {
            Points        [2090, 685]
            Branch {
              DstComponent  "Am2"
              DstTerminal   1
            }
            Branch {
              Points        [2090, 590; 2060, 590]
              DstComponent  "3ph Meter1"
              DstTerminal   5
            }
          }
          Branch {
            Points        [2115, 865]
            DstComponent  "Vm1"
            DstTerminal   2
          }
        }
        Connection {
          Type          Wire
          SrcComponent  "MFB2"
          SrcTerminal   3
          Points        [2175, 995]
          Branch {
            Points        [2175, 685]
            Branch {
              DstComponent  "Am3"
              DstTerminal   1
            }
            Branch {
              Points        [2175, 585; 2070, 585]
              DstComponent  "3ph Meter1"
              DstTerminal   4
            }
          }
          Branch {
            Points        [2200, 995]
            DstComponent  "Vm2"
            DstTerminal   2
          }
        }
        Connection {
          Type          Wire
          SrcComponent  "MFB3"
          SrcTerminal   3
          Points        [2000, 1125]
          Branch {
            Points        [2000, 685; 2050, 685]
            Branch {
              DstComponent  "Am1"
              DstTerminal   1
            }
            Branch {
              DstComponent  "3ph Meter1"
              DstTerminal   6
            }
          }
          Branch {
            Points        [2000, 1170]
            DstComponent  "Vm3"
            DstTerminal   2
          }
        }
        Connection {
          Type          Signal
          SrcComponent  "Am3"
          SrcTerminal   3
          Points        [2260, 705; 2260, 835]
          DstComponent  "Mux"
          DstTerminal   4
        }
        Connection {
          Type          Signal
          SrcComponent  "Am2"
          SrcTerminal   3
          Points        [2265, 705; 2265, 825]
          DstComponent  "Mux"
          DstTerminal   3
        }
        Connection {
          Type          Signal
          SrcComponent  "Am1"
          SrcTerminal   3
          Points        [2270, 705; 2270, 815]
          DstComponent  "Mux"
          DstTerminal   2
        }
        Connection {
          Type          Wire
          SrcComponent  "MFB1"
          SrcTerminal   2
          Points        [2050, 855; 2050, 810]
          Branch {
            DstComponent  "L4"
            DstTerminal   1
          }
          Branch {
            Points        [2115, 810]
            DstComponent  "Vm1"
            DstTerminal   1
          }
        }
        Connection {
          Type          Wire
          SrcComponent  "L5"
          SrcTerminal   1
          Points        [2135, 950]
          Branch {
            Points        [2135, 985]
            DstComponent  "MFB2"
            DstTerminal   2
          }
          Branch {
            DstComponent  "Vm2"
            DstTerminal   1
          }
        }
        Connection {
          Type          Wire
          SrcComponent  "MFB3"
          SrcTerminal   2
          Points        [2030, 1115]
          Branch {
            Points        [2220, 1115]
            DstComponent  "L6"
            DstTerminal   1
          }
          Branch {
            DstComponent  "Vm3"
            DstTerminal   1
          }
        }
        Connection {
          Type          Signal
          SrcComponent  "Vmbc"
          SrcTerminal   3
          DstComponent  "Goto2"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "Vmca"
          SrcTerminal   3
          DstComponent  "Goto3"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "From17"
          SrcTerminal   1
          Points        [2665, 795; 2665, 780]
          DstComponent  "Demux3"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "From21"
          SrcTerminal   1
          DstComponent  "Demux5"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "Sum9"
          SrcTerminal   1
          Points        [2785, 850; 2785, 970]
          DstComponent  "Mux8"
          DstTerminal   2
        }
        Connection {
          Type          Signal
          SrcComponent  "Sum10"
          SrcTerminal   1
          Points        [2780, 990; 2780, 980]
          DstComponent  "Mux8"
          DstTerminal   3
        }
        Connection {
          Type          Signal
          SrcComponent  "Sum11"
          SrcTerminal   1
          Points        [2785, 1135; 2785, 990]
          DstComponent  "Mux8"
          DstTerminal   4
        }
        Connection {
          Type          Signal
          SrcComponent  "Mux8"
          SrcTerminal   1
          Points        [2915, 980]
          Branch {
            DstComponent  "Scope4"
            DstTerminal   1
          }
          Branch {
            Points        [2915, 1045]
            DstComponent  "Analog Out 10-12"
            DstTerminal   1
          }
        }
        Connection {
          Type          Signal
          SrcComponent  "Vmab"
          SrcTerminal   3
          Points        [1465, 860]
          Branch {
            DstComponent  "Goto1"
            DstTerminal   1
          }
          Branch {
            Points        [1465, 715]
            DstComponent  "Scope1"
            DstTerminal   1
          }
        }
        Connection {
          Type          Wire
          SrcComponent  "3ph Meter"
          SrcTerminal   1
          Points        [2050, 405]
          Branch {
            DstComponent  "3ph Meter2"
            DstTerminal   4
          }
          Branch {
            DstComponent  "3ph Meter1"
            DstTerminal   3
          }
        }
        Connection {
          Type          Wire
          SrcComponent  "3ph Meter"
          SrcTerminal   2
          Points        [2060, 415]
          Branch {
            DstComponent  "3ph Meter2"
            DstTerminal   5
          }
          Branch {
            DstComponent  "3ph Meter1"
            DstTerminal   2
          }
        }
        Connection {
          Type          Wire
          SrcComponent  "3ph Meter"
          SrcTerminal   3
          Points        [2070, 425]
          Branch {
            DstComponent  "3ph Meter2"
            DstTerminal   6
          }
          Branch {
            DstComponent  "3ph Meter1"
            DstTerminal   1
          }
        }
        Connection {
          Type          Wire
          SrcComponent  "V_dc2"
          SrcTerminal   1
          DstComponent  "R8"
          DstTerminal   2
        }
        Connection {
          Type          Wire
          SrcComponent  "V_dc3"
          SrcTerminal   1
          DstComponent  "R9"
          DstTerminal   2
        }
        Connection {
          Type          Wire
          SrcComponent  "V_dc4"
          SrcTerminal   1
          DstComponent  "R10"
          DstTerminal   2
        }
        Connection {
          Type          Wire
          SrcComponent  "Ground9"
          SrcTerminal   1
          Points        [1805, 415]
          DstComponent  "V_3ph"
          DstTerminal   4
        }
        Connection {
          Type          Signal
          SrcComponent  "Delay2"
          SrcTerminal   2
          Points        [2660, 630; 2660, 655]
          DstComponent  "Logical\nOperator2"
          DstTerminal   2
        }
        Connection {
          Type          Signal
          SrcComponent  "Logical\nOperator2"
          SrcTerminal   1
          Points        [2730, 655; 2730, 630]
          Branch {
            DstComponent  "LED Blinking"
            DstTerminal   1
          }
          Branch {
            DstComponent  "Delay2"
            DstTerminal   1
          }
        }
        Connection {
          Type          Signal
          SrcComponent  "Mux2"
          SrcTerminal   1
          Points        [1455, 725; 1455, 830; 1605, 830]
          Branch {
            Points        [1790, 830]
            Branch {
              DstComponent  "MFB1"
              DstTerminal   1
            }
            Branch {
              Points        [1790, 865; 1890, 865]
              DstComponent  "MFB1"
              DstTerminal   8
            }
          }
          Branch {
            Points        [1605, 765]
            DstComponent  "Scope2"
            DstTerminal   1
          }
        }
        Connection {
          Type          Signal
          SrcComponent  "Mux3"
          SrcTerminal   1
          Points        [1485, 795; 1485, 880; 1615, 880]
          Branch {
            Points        [1615, 890; 1780, 890]
            Branch {
              DstComponent  "MFB1"
              DstTerminal   5
            }
            Branch {
              Points        [1780, 850; 1890, 850]
              DstComponent  "MFB1"
              DstTerminal   7
            }
          }
          Branch {
            Points        [1615, 775]
            DstComponent  "Scope2"
            DstTerminal   2
          }
        }
        Connection {
          Type          Signal
          SrcComponent  "Mux4"
          SrcTerminal   1
          Points        [1355, 870; 1355, 920; 1405, 920]
          Branch {
            Points        [1405, 960; 1795, 960]
            Branch {
              DstComponent  "MFB2"
              DstTerminal   1
            }
            Branch {
              Points        [1795, 995; 1890, 995]
              DstComponent  "MFB2"
              DstTerminal   8
            }
          }
          Branch {
            Points        [1420, 920; 1420, 930]
            DstComponent  "Scope3"
            DstTerminal   1
          }
        }
        Connection {
          Type          Signal
          SrcComponent  "Mux5"
          SrcTerminal   1
          Points        [1400, 970]
          Branch {
            Points        [1400, 1020; 1785, 1020]
            Branch {
              DstComponent  "MFB2"
              DstTerminal   5
            }
            Branch {
              Points        [1785, 980; 1890, 980]
              DstComponent  "MFB2"
              DstTerminal   7
            }
          }
          Branch {
            Points        [1400, 930; 1415, 930; 1415, 940]
            DstComponent  "Scope3"
            DstTerminal   2
          }
        }
        Connection {
          Type          Signal
          SrcComponent  "Mux7"
          SrcTerminal   1
          Points        [1375, 1150]
          Branch {
            Points        [1785, 1150]
            Branch {
              DstComponent  "MFB3"
              DstTerminal   5
            }
            Branch {
              Points        [1785, 1110; 1890, 1110]
              DstComponent  "MFB3"
              DstTerminal   7
            }
          }
          Branch {
            Points        [1375, 1050]
            DstComponent  "Scope5"
            DstTerminal   2
          }
        }
        Connection {
          Type          Wire
          SrcComponent  "3ph Meter"
          SrcTerminal   4
          DstComponent  "load"
          DstTerminal   3
        }
        Connection {
          Type          Wire
          SrcComponent  "3ph Meter"
          SrcTerminal   5
          DstComponent  "load"
          DstTerminal   2
        }
        Connection {
          Type          Wire
          SrcComponent  "3ph Meter"
          SrcTerminal   6
          DstComponent  "load"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "SPI Peripheral1"
          SrcTerminal   9
          Points        [970, 1620; 970, 1670]
          DstComponent  "Scope7"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "SPI Peripheral1"
          SrcTerminal   2
          DstComponent  "Data Type"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "Gain"
          SrcTerminal   2
          DstComponent  "Demux"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "Demux1"
          SrcTerminal   3
          DstComponent  "Goto4"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "Constant"
          SrcTerminal   1
          DstComponent  "Sum1"
          DstTerminal   2
        }
        Connection {
          Type          Signal
          SrcComponent  "From"
          SrcTerminal   1
          Points        [1985, 1440]
          DstComponent  "Sum1"
          DstTerminal   3
        }
        Connection {
          Type          Signal
          SrcComponent  "Constant1"
          SrcTerminal   1
          DstComponent  "Sum2"
          DstTerminal   2
        }
        Connection {
          Type          Signal
          SrcComponent  "From1"
          SrcTerminal   1
          Points        [1985, 1540]
          DstComponent  "Sum2"
          DstTerminal   3
        }
        Connection {
          Type          Signal
          SrcComponent  "Sum2"
          SrcTerminal   1
          DstComponent  "Goto10"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "Constant2"
          SrcTerminal   1
          DstComponent  "Sum3"
          DstTerminal   2
        }
        Connection {
          Type          Signal
          SrcComponent  "From2"
          SrcTerminal   1
          Points        [1985, 1650]
          DstComponent  "Sum3"
          DstTerminal   3
        }
        Connection {
          Type          Signal
          SrcComponent  "Sum3"
          SrcTerminal   1
          DstComponent  "Goto14"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "Constant3"
          SrcTerminal   1
          DstComponent  "Sum4"
          DstTerminal   2
        }
        Connection {
          Type          Signal
          SrcComponent  "From3"
          SrcTerminal   1
          Points        [1985, 1765]
          DstComponent  "Sum4"
          DstTerminal   3
        }
        Connection {
          Type          Signal
          SrcComponent  "Sum4"
          SrcTerminal   1
          DstComponent  "Goto15"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "Constant4"
          SrcTerminal   1
          DstComponent  "Sum5"
          DstTerminal   2
        }
        Connection {
          Type          Signal
          SrcComponent  "From11"
          SrcTerminal   1
          Points        [1985, 1875]
          DstComponent  "Sum5"
          DstTerminal   3
        }
        Connection {
          Type          Signal
          SrcComponent  "Sum5"
          SrcTerminal   1
          DstComponent  "Goto20"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "Constant5"
          SrcTerminal   1
          DstComponent  "Sum8"
          DstTerminal   2
        }
        Connection {
          Type          Signal
          SrcComponent  "From14"
          SrcTerminal   1
          Points        [1985, 1990]
          DstComponent  "Sum8"
          DstTerminal   3
        }
        Connection {
          Type          Signal
          SrcComponent  "Sum8"
          SrcTerminal   1
          DstComponent  "Goto21"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "Data Type"
          SrcTerminal   2
          Points        [1115, 1600]
          Branch {
            DstComponent  "Gain"
            DstTerminal   1
          }
          Branch {
            Points        [1115, 1520]
            DstComponent  "Scope8"
            DstTerminal   1
          }
        }
        Connection {
          Type          Signal
          SrcComponent  "PWM Capture1"
          SrcTerminal   1
          Points        [1640, 1590]
          Branch {
            DstComponent  "Demux1"
            DstTerminal   1
          }
          Branch {
            Points        [1640, 1500; 1605, 1500]
            DstComponent  "Scope10"
            DstTerminal   1
          }
        }
        Connection {
          Type          Signal
          SrcComponent  "Sum1"
          SrcTerminal   1
          Points        [2045, 1395]
          Branch {
            DstComponent  "Goto9"
            DstTerminal   1
          }
          Branch {
            Points        [2045, 1340]
            DstComponent  "Scope12"
            DstTerminal   1
          }
        }
        Connection {
          Type          Signal
          SrcComponent  "Mux9"
          SrcTerminal   1
          DstComponent  "PWM Out1"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "Demux"
          SrcTerminal   2
          Points        [1295, 1560; 1295, 1515]
          Branch {
            Points        [1295, 1485]
            Branch {
              Points        [1295, 1455]
              Branch {
                Points        [1295, 1425]
                DstComponent  "Mux9"
                DstTerminal   2
              }
              Branch {
                DstComponent  "Mux9"
                DstTerminal   3
              }
            }
            Branch {
              DstComponent  "Mux9"
              DstTerminal   4
            }
          }
          Branch {
            DstComponent  "Mux9"
            DstTerminal   5
          }
        }
        Connection {
          Type          Signal
          SrcComponent  "Demux"
          SrcTerminal   3
          Points        [1300, 1600]
          Branch {
            Points        [1300, 1575]
            Branch {
              Points        [1300, 1545]
              DstComponent  "Mux9"
              DstTerminal   6
            }
            Branch {
              DstComponent  "Mux9"
              DstTerminal   7
            }
          }
          Branch {
            Points        [1300, 1605]
            Branch {
              DstComponent  "Mux9"
              DstTerminal   8
            }
            Branch {
              Points        [1300, 1635]
              DstComponent  "Mux9"
              DstTerminal   9
            }
          }
        }
        Connection {
          Type          Signal
          SrcComponent  "Demux"
          SrcTerminal   4
          Points        [1295, 1640; 1295, 1665]
          Branch {
            DstComponent  "Mux9"
            DstTerminal   10
          }
          Branch {
            Points        [1295, 1695]
            Branch {
              DstComponent  "Mux9"
              DstTerminal   11
            }
            Branch {
              Points        [1295, 1725]
              Branch {
                DstComponent  "Mux9"
                DstTerminal   12
              }
              Branch {
                Points        [1295, 1755]
                DstComponent  "Mux9"
                DstTerminal   13
              }
            }
          }
        }
        Connection {
          Type          Signal
          SrcComponent  "Demux1"
          SrcTerminal   2
          DstComponent  "Goto"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "Demux1"
          SrcTerminal   10
          DstComponent  "Goto7"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "Demux1"
          SrcTerminal   11
          DstComponent  "Goto8"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "Demux1"
          SrcTerminal   7
          DstComponent  "Goto6"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "Demux1"
          SrcTerminal   6
          DstComponent  "Goto5"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "Demux1"
          SrcTerminal   4
          DstComponent  "Goto11"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "Demux1"
          SrcTerminal   5
          DstComponent  "Goto12"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "Demux1"
          SrcTerminal   8
          DstComponent  "Goto13"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "Demux1"
          SrcTerminal   9
          DstComponent  "Goto16"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "Demux1"
          SrcTerminal   12
          DstComponent  "Goto17"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "Demux1"
          SrcTerminal   13
          DstComponent  "Goto22"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "Constant6"
          SrcTerminal   1
          DstComponent  "Sum6"
          DstTerminal   2
        }
        Connection {
          Type          Signal
          SrcComponent  "From19"
          SrcTerminal   1
          Points        [2285, 1445]
          DstComponent  "Sum6"
          DstTerminal   3
        }
        Connection {
          Type          Signal
          SrcComponent  "Constant7"
          SrcTerminal   1
          DstComponent  "Sum7"
          DstTerminal   2
        }
        Connection {
          Type          Signal
          SrcComponent  "From20"
          SrcTerminal   1
          Points        [2285, 1545]
          DstComponent  "Sum7"
          DstTerminal   3
        }
        Connection {
          Type          Signal
          SrcComponent  "Sum7"
          SrcTerminal   1
          DstComponent  "Goto26"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "Constant8"
          SrcTerminal   1
          DstComponent  "Sum12"
          DstTerminal   2
        }
        Connection {
          Type          Signal
          SrcComponent  "From23"
          SrcTerminal   1
          Points        [2285, 1655]
          DstComponent  "Sum12"
          DstTerminal   3
        }
        Connection {
          Type          Signal
          SrcComponent  "Sum12"
          SrcTerminal   1
          DstComponent  "Goto27"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "Constant9"
          SrcTerminal   1
          DstComponent  "Sum13"
          DstTerminal   2
        }
        Connection {
          Type          Signal
          SrcComponent  "From24"
          SrcTerminal   1
          Points        [2285, 1770]
          DstComponent  "Sum13"
          DstTerminal   3
        }
        Connection {
          Type          Signal
          SrcComponent  "Sum13"
          SrcTerminal   1
          DstComponent  "Goto30"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "Constant10"
          SrcTerminal   1
          DstComponent  "Sum14"
          DstTerminal   2
        }
        Connection {
          Type          Signal
          SrcComponent  "From25"
          SrcTerminal   1
          Points        [2285, 1880]
          DstComponent  "Sum14"
          DstTerminal   3
        }
        Connection {
          Type          Signal
          SrcComponent  "Sum14"
          SrcTerminal   1
          DstComponent  "Goto31"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "Constant11"
          SrcTerminal   1
          DstComponent  "Sum15"
          DstTerminal   2
        }
        Connection {
          Type          Signal
          SrcComponent  "From26"
          SrcTerminal   1
          Points        [2285, 1995]
          DstComponent  "Sum15"
          DstTerminal   3
        }
        Connection {
          Type          Signal
          SrcComponent  "Sum15"
          SrcTerminal   1
          DstComponent  "Goto32"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "Sum6"
          SrcTerminal   1
          Points        [2345, 1400]
          Branch {
            DstComponent  "Goto25"
            DstTerminal   1
          }
          Branch {
            Points        [2345, 1345]
            DstComponent  "Scope13"
            DstTerminal   1
          }
        }
        Connection {
          Type          Signal
          SrcComponent  "From4"
          SrcTerminal   1
          DstComponent  "Mux2"
          DstTerminal   2
        }
        Connection {
          Type          Signal
          SrcComponent  "From10"
          SrcTerminal   1
          DstComponent  "Mux2"
          DstTerminal   3
        }
        Connection {
          Type          Signal
          SrcComponent  "From27"
          SrcTerminal   1
          DstComponent  "Mux2"
          DstTerminal   4
        }
        Connection {
          Type          Signal
          SrcComponent  "From28"
          SrcTerminal   1
          DstComponent  "Mux2"
          DstTerminal   5
        }
        Connection {
          Type          Signal
          SrcComponent  "From5"
          SrcTerminal   1
          DstComponent  "Mux3"
          DstTerminal   2
        }
        Connection {
          Type          Signal
          SrcComponent  "From12"
          SrcTerminal   1
          DstComponent  "Mux3"
          DstTerminal   3
        }
        Connection {
          Type          Signal
          SrcComponent  "From29"
          SrcTerminal   1
          DstComponent  "Mux3"
          DstTerminal   4
        }
        Connection {
          Type          Signal
          SrcComponent  "From30"
          SrcTerminal   1
          DstComponent  "Mux3"
          DstTerminal   5
        }
        Connection {
          Type          Signal
          SrcComponent  "From6"
          SrcTerminal   1
          DstComponent  "Mux4"
          DstTerminal   2
        }
        Connection {
          Type          Signal
          SrcComponent  "From13"
          SrcTerminal   1
          DstComponent  "Mux4"
          DstTerminal   3
        }
        Connection {
          Type          Signal
          SrcComponent  "From31"
          SrcTerminal   1
          DstComponent  "Mux4"
          DstTerminal   4
        }
        Connection {
          Type          Signal
          SrcComponent  "From32"
          SrcTerminal   1
          DstComponent  "Mux4"
          DstTerminal   5
        }
        Connection {
          Type          Signal
          SrcComponent  "From15"
          SrcTerminal   1
          DstComponent  "Mux5"
          DstTerminal   3
        }
        Connection {
          Type          Signal
          SrcComponent  "From7"
          SrcTerminal   1
          DstComponent  "Mux5"
          DstTerminal   2
        }
        Connection {
          Type          Signal
          SrcComponent  "From33"
          SrcTerminal   1
          DstComponent  "Mux5"
          DstTerminal   4
        }
        Connection {
          Type          Signal
          SrcComponent  "From34"
          SrcTerminal   1
          DstComponent  "Mux5"
          DstTerminal   5
        }
        Connection {
          Type          Signal
          SrcComponent  "From8"
          SrcTerminal   1
          DstComponent  "Mux6"
          DstTerminal   2
        }
        Connection {
          Type          Signal
          SrcComponent  "From16"
          SrcTerminal   1
          DstComponent  "Mux6"
          DstTerminal   3
        }
        Connection {
          Type          Signal
          SrcComponent  "From35"
          SrcTerminal   1
          DstComponent  "Mux6"
          DstTerminal   4
        }
        Connection {
          Type          Signal
          SrcComponent  "From36"
          SrcTerminal   1
          DstComponent  "Mux6"
          DstTerminal   5
        }
        Connection {
          Type          Signal
          SrcComponent  "From9"
          SrcTerminal   1
          DstComponent  "Mux7"
          DstTerminal   2
        }
        Connection {
          Type          Signal
          SrcComponent  "From18"
          SrcTerminal   1
          DstComponent  "Mux7"
          DstTerminal   3
        }
        Connection {
          Type          Signal
          SrcComponent  "From37"
          SrcTerminal   1
          DstComponent  "Mux7"
          DstTerminal   4
        }
        Connection {
          Type          Signal
          SrcComponent  "From38"
          SrcTerminal   1
          DstComponent  "Mux7"
          DstTerminal   5
        }
        Connection {
          Type          Signal
          SrcComponent  "From22"
          SrcTerminal   1
          DstComponent  "Demux6"
          DstTerminal   1
        }
        Connection {
          Type          Signal
          SrcComponent  "Mux6"
          SrcTerminal   1
          Points        [1290, 1080; 1380, 1080]
          Branch {
            Points        [1380, 1090; 1775, 1090]
            Branch {
              DstComponent  "MFB3"
              DstTerminal   1
            }
            Branch {
              Points        [1775, 1130; 1890, 1130]
              DstComponent  "MFB3"
              DstTerminal   8
            }
          }
          Branch {
            Points        [1380, 1040]
            DstComponent  "Scope5"
            DstTerminal   1
          }
        }
        Connection {
          Type          Signal
          SrcComponent  "Demux3"
          SrcTerminal   2
          Points        [2725, 750]
          Branch {
            DstComponent  "Goto18"
            DstTerminal   1
          }
          Branch {
            DstComponent  "Sum9"
            DstTerminal   2
          }
        }
        Connection {
          Type          Signal
          SrcComponent  "Demux3"
          SrcTerminal   3
          Points        [2720, 770]
          Branch {
            DstComponent  "Goto19"
            DstTerminal   1
          }
          Branch {
            Points        [2720, 845]
            DstComponent  "Sum9"
            DstTerminal   3
          }
        }
        Connection {
          Type          Signal
          SrcComponent  "Demux3"
          SrcTerminal   4
          Points        [2715, 790]
          Branch {
            DstComponent  "Goto33"
            DstTerminal   1
          }
          Branch {
            Points        [2715, 855]
            DstComponent  "Sum9"
            DstTerminal   4
          }
        }
        Connection {
          Type          Signal
          SrcComponent  "Demux3"
          SrcTerminal   5
          Points        [2710, 810]
          Branch {
            DstComponent  "Goto34"
            DstTerminal   1
          }
          Branch {
            Points        [2710, 865]
            DstComponent  "Sum9"
            DstTerminal   5
          }
        }
        Connection {
          Type          Signal
          SrcComponent  "Demux5"
          SrcTerminal   2
          Points        [2725, 890]
          Branch {
            DstComponent  "Goto23"
            DstTerminal   1
          }
          Branch {
            DstComponent  "Sum10"
            DstTerminal   2
          }
        }
        Connection {
          Type          Signal
          SrcComponent  "Demux5"
          SrcTerminal   3
          Points        [2720, 910]
          Branch {
            DstComponent  "Goto24"
            DstTerminal   1
          }
          Branch {
            Points        [2720, 985]
            DstComponent  "Sum10"
            DstTerminal   3
          }
        }
        Connection {
          Type          Signal
          SrcComponent  "Demux5"
          SrcTerminal   4
          Points        [2715, 930]
          Branch {
            DstComponent  "Goto35"
            DstTerminal   1
          }
          Branch {
            Points        [2715, 995]
            DstComponent  "Sum10"
            DstTerminal   4
          }
        }
        Connection {
          Type          Signal
          SrcComponent  "Demux5"
          SrcTerminal   5
          Points        [2710, 950]
          Branch {
            DstComponent  "Goto36"
            DstTerminal   1
          }
          Branch {
            Points        [2710, 1005]
            DstComponent  "Sum10"
            DstTerminal   5
          }
        }
        Connection {
          Type          Signal
          SrcComponent  "Demux6"
          SrcTerminal   2
          Points        [2725, 1035]
          Branch {
            DstComponent  "Goto28"
            DstTerminal   1
          }
          Branch {
            DstComponent  "Sum11"
            DstTerminal   2
          }
        }
        Connection {
          Type          Signal
          SrcComponent  "Demux6"
          SrcTerminal   3
          Points        [2720, 1055]
          Branch {
            DstComponent  "Goto29"
            DstTerminal   1
          }
          Branch {
            Points        [2720, 1130]
            DstComponent  "Sum11"
            DstTerminal   3
          }
        }
        Connection {
          Type          Signal
          SrcComponent  "Demux6"
          SrcTerminal   4
          Points        [2715, 1075]
          Branch {
            DstComponent  "Goto37"
            DstTerminal   1
          }
          Branch {
            Points        [2715, 1140]
            DstComponent  "Sum11"
            DstTerminal   4
          }
        }
        Connection {
          Type          Signal
          SrcComponent  "Demux6"
          SrcTerminal   5
          Points        [2710, 1095]
          Branch {
            DstComponent  "Goto38"
            DstTerminal   1
          }
          Branch {
            Points        [2710, 1150]
            DstComponent  "Sum11"
            DstTerminal   5
          }
        }
        Annotation {
          Name          base64 "PGh0bWw+PGJvZHk+CjxwPjHnuqfogZRhMTQ8L3A+CjxwPj"
"HnuqfogZRhMjM8L3A+CjxwPjHnuqfogZRiMTQ8L3A+CjxwPjHnuqfogZRiMjM8L3A+CjxwPjHnuqf"
"ogZRjMTQ8L3A+CjxwPjHnuqfogZRjMjM8L3A+PC9ib2R5PjwvaHRtbD4="
          Position      [905, 775]
        } 
        Annotation {
          Name          base64 "PGh0bWw+PGJvZHk+CjxwPjLnuqfogZRhMTQ8L3A+CjxwPj"
"LnuqfogZRhMjM8L3A+CjxwPjLnuqfogZRiMTQ8L3A+CjxwPjLnuqfogZRiMjM8L3A+CjxwPjLnuqf"
"ogZRjMTQ8L3A+CjxwPjLnuqfogZRjMjM8L3A+PC9ib2R5PjwvaHRtbD4="
          Position      [905, 1050]
        } 
        RectangleAnnotation {
          Position     [1765, 1645]
          Width        1840
          Height       770
          CornerRadius 3
          Thickness    2
          PenColor     4289331455
          PenAlpha     1
          BrushColor   0
          BrushAlpha   0
        } 
      }
    }
    Component {
      Type          SignalMux
      Name          "Mux"
      Show          off
      Position      [825, 355]
      Direction     right
      Flipped       off
      LabelPosition south
      Frame         [-2, -60; 7, 60]
      Parameter {
        Variable      "Width"
        Value         "12"
        Show          off
      }
    }
    Component {
      Type          SignalDemux
      Name          "Demux"
      Show          off
      Position      [575, 310]
      Direction     right
      Flipped       on
      LabelPosition south
      Frame         [-7, -15; 2, 15]
      Parameter {
        Variable      "Width"
        Value         "3"
        Show          off
      }
    }
    Component {
      Type          SignalDemux
      Name          "Demux1"
      Show          off
      Position      [575, 340]
      Direction     right
      Flipped       on
      LabelPosition south
      Frame         [-7, -15; 2, 15]
      Parameter {
        Variable      "Width"
        Value         "3"
        Show          off
      }
    }
    Component {
      Type          SignalDemux
      Name          "Demux2"
      Show          off
      Position      [575, 370]
      Direction     right
      Flipped       on
      LabelPosition south
      Frame         [-7, -15; 2, 15]
      Parameter {
        Variable      "Width"
        Value         "3"
        Show          off
      }
    }
    Component {
      Type          SignalDemux
      Name          "Demux3"
      Show          off
      Position      [575, 400]
      Direction     right
      Flipped       on
      LabelPosition south
      Frame         [-7, -15; 2, 15]
      Parameter {
        Variable      "Width"
        Value         "3"
        Show          off
      }
    }
    Component {
      Type          Scope
      Name          "Scope"
      Show          on
      Position      [590, 145]
      Direction     up
      Flipped       off
      LabelPosition south
      Frame         [-15, -15; 15, 15]
      Location      [0, 24; 1920, 1013]
      State         "AAAA/wAAAAD9AAAAAgAAAAEAAAAAAAAAAPwCAAAAA/sAAAAQAFoAbwBvA"
"G0AQQByAGUAYQAAAAAA/////wAAAC8A////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwAAAAAA//"
"///wAAAGEA////+wAAAAwAVAByAGEAYwBlAHMAAAAAAP////8AAABhAP///wAAAAMAAAeAAAAAffw"
"BAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQBAAAAAAAAB4AAAABEAP///wAAB4AAAAM7AAAA"
"BAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP////8AAAAAA"
"AAAAA=="
      SavedViews    "AAAAAgAAAAA="
      HeaderState   "{\"DefaultSecSize\":0,\"FirstSecSize\":180,\"Labels\":[],"
"\"VisualIdxs\":[]}"
      PlotPalettes  "AAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
      Axes          "1"
      TimeRange     "0.0"
      ScrollingMode "1"
      SingleTimeAxis "1"
      Open          "0"
      Ts            "-1"
      SampleLimit   "25000"
      XAxisLabel    "Time / s"
      ShowLegend    "1"
      Axis {
        Name          ""
        AutoScale     1
        MinValue      0
        MaxValue      1
        Signals       {}
        SignalTypes   [ ]
        Untangle      0
        KeepBaseline  off
        BaselineValue 0
      }
      Fourier {
        SingleXAxis       on
        AxisLabel         "Frequency / Hz"
        Scaling           0
        PhaseDisplay      0
        ShowFourierLegend off
        Axis {
          Name          ""
          AutoScale     1
          MinValue      0
          MaxValue      1
          Signals       {}
          Untangle      0
          KeepBaseline  off
          BaselineValue 0
        }
      }
    }
    Component {
      Type          ZeroOrderHold
      Name          "Latch TX words"
      Show          on
      Position      [885, 195]
      Direction     right
      Flipped       on
      LabelPosition west
      Parameter {
        Variable      "Ts"
        Value         "100e-6"
        Show          off
      }
    }
    Component {
      Type          ZeroOrderHold
      Name          "SPI frame received"
      Show          on
      Position      [675, 195]
      Direction     right
      Flipped       on
      LabelPosition west
      Parameter {
        Variable      "Ts"
        Value         "[100e-6,10e-6]"
        Show          off
      }
    }
    Component {
      Type          PulseGenerator
      Name          "RX frame valid"
      Show          on
      Position      [100, 385]
      Direction     right
      Flipped       off
      LabelPosition west
      Parameter {
        Variable      "Hi"
        Value         "1"
        Show          off
      }
      Parameter {
        Variable      "Lo"
        Value         "0"
        Show          off
      }
      Parameter {
        Variable      "f"
        Value         "10e3"
        Show          off
      }
      Parameter {
        Variable      "DutyCycle"
        Value         "0.05"
        Show          off
      }
      Parameter {
        Variable      "Delay"
        Value         "10e-6"
        Show          off
      }
      Parameter {
        Variable      "DataType"
        Value         "10"
        Show          off
      }
    }
    Connection {
      Type          Signal
      SrcComponent  "Mux"
      SrcTerminal   1
      DstComponent  "Controller"
      DstTerminal   1
    }
    Connection {
      Type          Signal
      SrcComponent  "Demux"
      SrcTerminal   2
      DstComponent  "Mux"
      DstTerminal   2
    }
    Connection {
      Type          Signal
      SrcComponent  "Demux"
      SrcTerminal   3
      DstComponent  "Mux"
      DstTerminal   3
    }
    Connection {
      Type          Signal
      SrcComponent  "Demux"
      SrcTerminal   4
      DstComponent  "Mux"
      DstTerminal   4
    }
    Connection {
      Type          Signal
      SrcComponent  "Demux1"
      SrcTerminal   2
      DstComponent  "Mux"
      DstTerminal   5
    }
    Connection {
      Type          Signal
      SrcComponent  "Demux1"
      SrcTerminal   3
      DstComponent  "Mux"
      DstTerminal   6
    }
    Connection {
      Type          Signal
      SrcComponent  "Demux1"
      SrcTerminal   4
      DstComponent  "Mux"
      DstTerminal   7
    }
    Connection {
      Type          Signal
      SrcComponent  "Demux2"
      SrcTerminal   2
      DstComponent  "Mux"
      DstTerminal   8
    }
    Connection {
      Type          Signal
      SrcComponent  "Demux2"
      SrcTerminal   3
      DstComponent  "Mux"
      DstTerminal   9
    }
    Connection {
      Type          Signal
      SrcComponent  "Demux2"
      SrcTerminal   4
      DstComponent  "Mux"
      DstTerminal   10
    }
    Connection {
      Type          Signal
      SrcComponent  "Demux3"
      SrcTerminal   2
      DstComponent  "Mux"
      DstTerminal   11
    }
    Connection {
      Type          Signal
      SrcComponent  "Demux3"
      SrcTerminal   3
      DstComponent  "Mux"
      DstTerminal   12
    }
    Connection {
      Type          Signal
      SrcComponent  "Demux3"
      SrcTerminal   4
      DstComponent  "Mux"
      DstTerminal   13
    }
    Connection {
      Type          Signal
      SrcComponent  "Controller"
      SrcTerminal   4
      Points        [1050, 195]
      DstComponent  "Latch TX words"
      DstTerminal   1
    }
    Connection {
      Type          Signal
      SrcComponent  "Latch TX words"
      SrcTerminal   2
      DstComponent  "SPI frame received"
      DstTerminal   1
    }
    Connection {
      Type          Signal
      SrcComponent  "RX frame valid"
      SrcTerminal   1
      Points        [320, 385]
    }
    Connection {
      Type          Signal
      SrcComponent  "SPI frame received"
      SrcTerminal   2
      Points        [335, 195]
      Branch {
        Points        [335, 145]
        DstComponent  "Scope"
        DstTerminal   1
      }
      Branch {
        Points        [140, 195; 140, 365]
        DstComponent  "Sub"
        DstTerminal   2
      }
    }
    Connection {
      Type          Signal
      SrcComponent  "Sub"
      SrcTerminal   11
      Points        [530, 395; 530, 310]
      DstComponent  "Demux"
      DstTerminal   1
    }
    Connection {
      Type          Signal
      SrcComponent  "Sub"
      SrcTerminal   12
      Points        [540, 345; 540, 340]
      DstComponent  "Demux1"
      DstTerminal   1
    }
    Connection {
      Type          Signal
      SrcComponent  "Sub"
      SrcTerminal   13
      Points        [540, 355; 540, 370]
      DstComponent  "Demux2"
      DstTerminal   1
    }
    Connection {
      Type          Signal
      SrcComponent  "Sub"
      SrcTerminal   14
      Points        [535, 365; 535, 400]
      DstComponent  "Demux3"
      DstTerminal   1
    }
    Connection {
      Type          Signal
      SrcComponent  "Sub"
      SrcTerminal   15
      Points        [545, 405; 545, 330; 305, 330]
      DstComponent  "Sub"
      DstTerminal   16
    }
  }
  Script {
    Name          "Script"
    Script        ""
  }
}
