Plecs { Name "211123 HIL BLDC_Hallsensor ohne Regelung aber mit ADC und Pow" "er Protection INH_IN Ersatz EN PWM Variabel SIL sawtooth" Version "4.5" CircuitModel "ContStateSpace" StartTime "0.0" TimeSpan "1.1" Timeout "" Solver "auto" MaxStep "1e-3" InitStep "-1" FixedStep "1e-3" Refine "1" ZCStepSize "1e-9" RelTol "1e-3" AbsTol "-1" TurnOnThreshold "0" SyncFixedStepTasks "2" UseSingleCommonBaseRate "2" LossVariableLimitExceededMsg "3" NegativeSwitchLossMsg "3" DivisionByZeroMsg "3" StiffnessDetectionMsg "2" MaxConsecutiveZCs "1000" AlgebraicLoopWithStateMachineMsg "3" AssertionAction "1" InitializationCommands "" InitialState "1" SystemState "" TaskingMode "1" TaskConfigurations "" CodeGenParameterInlining "2" CodeGenFloatingPointFormat "2" CodeGenAbsTimeUsageMsg "3" CodeGenBaseName "" CodeGenOutputDir "" CodeGenExtraOpts "" CodeGenTarget "Generic" CodeGenTargetSettings "" ExtendedMatrixPrecision "1" MatrixSignificanceCheck "2" EnableStateSpaceSplitting "2" DisplayStateSpaceSplitting "1" DiscretizationMethod "2" ExternalModeSettings "AAAAfwAAAAAWUU1hcDxRU3RyaW5nLFFTdHJpbmc+AAAAAAYAAAAYAF" "QAcgBpAGcAZwBlAHIAVgBhAGwAdQBlAAAAAgAwAAAAGABUAHIAaQBnAGcAZQByAEQAZQBsAGEAeQA" "AAAIAMAAAABYAUwBlAG4AcwBpAHQAaQB2AGkAdAB5AAAAAgAwAAAAFgBSAGUAZgByAGUAcwBoAFIA" "YQB0AGUAAAAEADIAMAAAABQATgB1AG0AUwBhAG0AcABsAGUAcwAAAAgAOAAxADkAMgAAABQARABlA" "GMAaQBtAGEAdABpAG8AbgAAAAIAMQ==" AlgebraicLoopMethod "1" AlgebraicLoopTolerance "1e-6" ScriptsDialogGeometry "" ScriptsDialogSplitterPos "0" Schematic { Location [0, 27; 1920, 1035] ZoomFactor 1 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Component { Type Subsystem Name "Plant" Show on Position [980, 360] Direction up Flipped off Frame [-125, -100; 125, 100] LabelPosition [0, 103] LabelAlign up TreatAsAtomicUnit on SampleTime "-1" TaskingMode "1" CodeGenEnable on CodeGenSampleTime "2e-6" CodeGenDiscretizationMethod "2" CodeGenTarget "Generic" CodeGenTargetSettings "AAAAfwAAAAAlUU1hcDxRU3RyaW5nLFFNYXA8UVN0cmluZyxRU" "3RyaW5nPiA+AAAAAAIAAAAOAFQASQAyADgAMAA2AHgAAAAPAAAAEgB1AHMAZQBJAG4AdABPAHMAYw" "AAAAIAMQAAABgAdQBuAGkAZgBsAGEAcwBoAEYAaQBsAGUAAAAAAAAAFgB0AGEAcwBrAEYAcgBlAHE" "AVABvAGwAAAACADEAAAASAHMAeQBzAEMAbABrAE0ASAB6AAAABAA5ADAAAAAUAGkAbgBzAHQAYQBs" "AGwARABpAHIAAAAAAAAADgBnAGUAbgBPAG4AbAB5AAAAAgAyAAAAHABlAHgAdABNAG8AZABlAFMAY" "wBpAFAAaQBuAHMAAAAQAFsAMgA4ACwAIAAyADkAXQAAACIAZQB4AHQATQBvAGQAZQBCAHUAZgBmAG" "UAcgBTAGkAegBlAAAACAAxADAAMAAwAAAAEgBlAHgAdABDAGwAawBNAEgAegAAAAQAMgAwAAAACAB" "jAGgAaQBwAAAAAgAxAAAAFgBiAHUAaQBsAGQAQwBvAG4AZgBpAGcAAAACADIAAAAKAGIAbwBhAHIA" "ZAAAAAIAMgAAABoAVABBAFIARwBFAFQAXwBEAEUAVgBJAEMARf////8AAAAiAEwAaQBuAGsAZQByA" "EMAbwBtAG0AYQBuAGQARgBpAGwAZQAAAAAAAAAaAEUAWABUAEUAUgBOAEEATABfAE0ATwBEAEUAAA" "ACADAAAAAOAEcAZQBuAGUAcgBpAGMAAAABAAAAPABHAEUATgBFAFIAQQBUAEUAXwBPAFUAVABQAFU" "AVABfAEEATgBEAF8AVQBQAEQAQQBUAEUAXwBGAEMATgAAAAIAMA==" CodeGenFloatingPointFormat "1" ExternalModeSettings "AAAAfwAAAAAWUU1hcDxRU3RyaW5nLFFTdHJpbmc+AAAAAAYAAA" "AYAFQAcgBpAGcAZwBlAHIAVgBhAGwAdQBlAAAAAgAwAAAAGABUAHIAaQBnAGcAZQByAEQAZQBsAGE" "AeQAAAAIAMAAAABYAUwBlAG4AcwBpAHQAaQB2AGkAdAB5AAAAAgAwAAAAFgBSAGUAZgByAGUAcwBo" "AFIAYQB0AGUAAAAEADIAMAAAABQATgB1AG0AUwBhAG0AcABsAGUAcwAAAAgAOAAxADkAMgAAABQAR" "ABlAGMAaQBtAGEAdABpAG8AbgAAAAIAMQ==" MaskDisplayLang "2" MaskIconFrame on MaskIconOpaque off MaskIconRotates on Terminal { Type Output Position [129, -80] Direction right Index "1" } Terminal { Type Input Position [-125, -90] Direction left Index "1" } Terminal { Type Output Position [-129, 70] Direction left Index "2" } Terminal { Type Input Position [-125, -5] Direction left Index "2" } Terminal { Type Input Position [-125, -25] Direction left Index "3" } Terminal { Type Output Position [129, 85] Direction right Index "3" } Terminal { Type Input Position [-125, -60] Direction left Index "4" } Terminal { Type Input Position [-125, -80] Direction left Index "5" } Terminal { Type Input Position [-125, -50] Direction left Index "6" } Terminal { Type Input Position [-125, -70] Direction left Index "7" } Terminal { Type Input Position [-125, -40] Direction left Index "8" } Terminal { Type Output Position [129, -70] Direction right Index "4" } Terminal { Type Output Position [129, -60] Direction right Index "5" } Terminal { Type Output Position [129, -50] Direction right Index "6" } Terminal { Type Output Position [129, -40] Direction right Index "7" } Terminal { Type Output Position [129, -30] Direction right Index "8" } Terminal { Type Output Position [129, -20] Direction right Index "9" } Terminal { Type Output Position [129, -10] Direction right Index "10" } Terminal { Type Output Position [129, 0] Direction right Index "11" } Terminal { Type Output Position [129, 10] Direction right Index "12" } Terminal { Type Output Position [129, 20] Direction right Index "13" } Terminal { Type Output Position [129, 30] Direction right Index "14" } Terminal { Type Output Position [129, 40] Direction right Index "15" } Terminal { Type Output Position [129, -90] Direction right Index "16" } Schematic { Location [0, 27; 1920, 1026] ZoomFactor 1 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Component { Type Inertia Name "Inertia" Show on Position [850, 300] Direction up Flipped off Parameter { Variable "J" Value "0.000003467" Show off } Parameter { Variable "w0" Value "0" Show off } Parameter { Variable "theta0" Value "" Show off } } Component { Type Reference SrcComponent "Components/Electrical/Machines/BLDC Machine\\n(Simple" ")" Name "BLDC Machine\n(Simple)" Show on Position [770, 270] Direction up Flipped off Frame [-25, -25; 25, 35] LabelPosition [0, 38] LabelAlign up Parameter { Variable "shape" Value "2" Show off } Parameter { Variable "K_E" Value "0.0243/2" Show off } Parameter { Variable "L" Value "0.0000715" Show off } Parameter { Variable "R" Value "0.635" Show off } Parameter { Variable "J" Value "0.00000219" Show off } Parameter { Variable "F" Value "0.00000474531" Show off } Parameter { Variable "p" Value "1" Show off } Parameter { Variable "wm0" Value "0" Show off } Parameter { Variable "thm0" Value "0" Show off } Parameter { Variable "i0" Value "[0 0]" Show off } Terminal { Type Port Position [-30, 0] Direction left } Terminal { Type Port Position [-30, 10] Direction left } Terminal { Type Port Position [-30, -10] Direction left } Terminal { Type Rotational Position [30, 30] Direction right } } Component { Type ThreePhaseMeter Name "3ph Meter1" Show off Position [600, 270] Direction up Flipped off Parameter { Variable "voltage" Value "2" Show off } } Component { Type Ammeter Name "Idc" Show on Position [345, 120] Direction left Flipped off } Component { Type Reference SrcComponent "Components/Electrical/Power Modules/HB1" Name "HB1" Show off Position [415, 265] Direction up Flipped off Frame [-20, -50; 20, 50] LabelPosition [-5, 0] LabelAlign right Parameter { Variable "semiSymbol" Value "2" Show off } Parameter { Variable "assert" Value "2" Show off } Parameter { Variable "Configuration" Value "2" Show off } Terminal { Type Input Position [-20, -30] Direction left } Terminal { Type Port Position [0, -55] Direction up } Terminal { Type Port Position [0, 55] Direction down } Terminal { Type Port Position [25, 0] Direction right } Terminal { Type Input Position [-20, 30] Direction left } } Component { Type Reference SrcComponent "Components/Electrical/Power Modules/HB1" Name "HB2" Show off Position [485, 270] Direction up Flipped off Frame [-20, -50; 20, 50] LabelPosition [-5, 0] LabelAlign right Parameter { Variable "semiSymbol" Value "2" Show off } Parameter { Variable "assert" Value "2" Show off } Parameter { Variable "Configuration" Value "2" Show off } Terminal { Type Input Position [-20, -30] Direction left } Terminal { Type Port Position [0, -55] Direction up } Terminal { Type Port Position [0, 55] Direction down } Terminal { Type Port Position [25, 0] Direction right } Terminal { Type Input Position [-20, 30] Direction left } } Component { Type Reference SrcComponent "Components/Electrical/Power Modules/HB1" Name "HB3" Show off Position [555, 275] Direction up Flipped off Frame [-20, -50; 20, 50] LabelPosition [-5, 0] LabelAlign right Parameter { Variable "semiSymbol" Value "2" Show off } Parameter { Variable "assert" Value "2" Show off } Parameter { Variable "Configuration" Value "2" Show off } Terminal { Type Input Position [-20, -30] Direction left } Terminal { Type Port Position [0, -55] Direction up } Terminal { Type Port Position [0, 55] Direction down } Terminal { Type Port Position [25, 0] Direction right } Terminal { Type Input Position [-20, 30] Direction left } } Component { Type DCVoltageSource Name "V_dc" Show on Position [165, 240] Direction up Flipped off Parameter { Variable "V" Value "24" Show on } } Component { Type Goto Name "Goto2" Show off Position [605, 145] Direction up Flipped off Parameter { Variable "Tag" Value "Iuvw" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type Voltmeter Name "Vm1" Show off Position [635, 330] Direction down Flipped on } Component { Type Voltmeter Name "Vm2" Show off Position [670, 330] Direction down Flipped on } Component { Type Voltmeter Name "Vm3" Show off Position [705, 330] Direction down Flipped on } Component { Type Goto Name "Goto8" Show off Position [625, 115] Direction right Flipped off Parameter { Variable "Tag" Value "Uuvw" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type RotationalSpeedSensor Name "Speed\nSensor2" Show off Position [930, 270] Direction left Flipped on Parameter { Variable "SecondFlange" Value "1" Show off } } Component { Type Math Name "Math3" Show off Position [995, 270] Direction up Flipped on Parameter { Variable "Operator" Value "1" Show off } } Component { Type Gain Name "Friction1" Show off Position [1055, 270] Direction left Flipped on Parameter { Variable "K" Value "-8.56287e-8" Show off } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type ControlledTorque Name "Friction" Show on Position [1090, 300] Direction up Flipped off Parameter { Variable "SecondFlange" Value "1" Show off } Parameter { Variable "StateSpaceInlining" Value "2" Show off } } Component { Type AngleSensor Name "Angle\nSensor1" Show off Position [890, 140] Direction left Flipped on Parameter { Variable "SecondFlange" Value "1" Show off } Parameter { Variable "theta0" Value "0" Show off } } Component { Type Goto Name "Goto3" Show off Position [1125, 90] Direction right Flipped off Parameter { Variable "Tag" Value "hall" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type Goto Name "Goto1" Show off Position [955, 85] Direction right Flipped off Parameter { Variable "Tag" Value "rotor position" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type Goto Name "Goto" Show off Position [975, 190] Direction right Flipped off Parameter { Variable "Tag" Value "speed" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type Voltmeter Name "Vm4" Show off Position [230, 240] Direction up Flipped off } Component { Type Goto Name "Goto5" Show off Position [270, 240] Direction right Flipped off Parameter { Variable "Tag" Value "u_DC" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type Subsystem Name "Hall sensors" Show on Position [1010, 135] Direction up Flipped off Frame [-45, -15; 45, 15] LabelPosition [0, 18] LabelAlign up SampleTime "-1" CodeGenDiscretizationMethod "2" CodeGenTarget "Generic" MaskDisplayLang "2" MaskIconFrame on MaskIconOpaque off MaskIconRotates on Terminal { Type Input Position [-45, 0] Direction left } Terminal { Type Output Position [49, 0] Direction right } Schematic { Location [0, 80; 1920, 1045] ZoomFactor 1 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Component { Type Input Name "theta" Show on Position [55, 25] Direction right Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Output Name "H_abc" Show on Position [660, 205] Direction right Flipped off Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type SignalMux Name "Mux" Show off Position [615, 205] Direction right Flipped off Parameter { Variable "Width" Value "3" Show off } } Component { Type ConstantRelationalOperator Name "Compare to\nConstant" Show off Position [290, 25] Direction right Flipped off Frame [-30, -10; 30, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "Operator" Value "5" Show off } Parameter { Variable "Threshold" Value "-30" Show off } } Component { Type ConstantRelationalOperator Name "Compare to\nConstant1" Show off Position [290, 55] Direction right Flipped off Frame [-30, -10; 30, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "Operator" Value "3" Show off } Parameter { Variable "Threshold" Value "30" Show off } } Component { Type LogicalOperator Name "Logical\nOperator" Show off Position [365, 40] Direction up Flipped off Parameter { Variable "Operator" Value "1" Show off } Parameter { Variable "Inputs" Value "2" Show off } } Component { Type ConstantRelationalOperator Name "Compare to\nConstant2" Show off Position [290, 90] Direction right Flipped off Frame [-30, -10; 30, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "Operator" Value "5" Show off } Parameter { Variable "Threshold" Value "30" Show off } } Component { Type ConstantRelationalOperator Name "Compare to\nConstant3" Show off Position [290, 120] Direction right Flipped off Frame [-30, -10; 30, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "Operator" Value "3" Show off } Parameter { Variable "Threshold" Value "90" Show off } } Component { Type LogicalOperator Name "Logical\nOperator1" Show off Position [365, 105] Direction up Flipped off Parameter { Variable "Operator" Value "1" Show off } Parameter { Variable "Inputs" Value "2" Show off } } Component { Type ConstantRelationalOperator Name "Compare to\nConstant4" Show off Position [290, 155] Direction right Flipped off Frame [-30, -10; 30, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "Operator" Value "5" Show off } Parameter { Variable "Threshold" Value "90" Show off } } Component { Type ConstantRelationalOperator Name "Compare to\nConstant5" Show off Position [290, 185] Direction right Flipped off Frame [-30, -10; 30, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "Operator" Value "3" Show off } Parameter { Variable "Threshold" Value "150" Show off } } Component { Type LogicalOperator Name "Logical\nOperator2" Show off Position [365, 170] Direction up Flipped off Parameter { Variable "Operator" Value "1" Show off } Parameter { Variable "Inputs" Value "2" Show off } } Component { Type ConstantRelationalOperator Name "Compare to\nConstant6" Show off Position [290, 220] Direction right Flipped off Frame [-30, -10; 30, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "Operator" Value "5" Show off } Parameter { Variable "Threshold" Value "150" Show off } } Component { Type ConstantRelationalOperator Name "Compare to\nConstant7" Show off Position [290, 250] Direction right Flipped off Frame [-30, -10; 30, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "Operator" Value "4" Show off } Parameter { Variable "Threshold" Value "180" Show off } } Component { Type LogicalOperator Name "Logical\nOperator3" Show off Position [365, 235] Direction up Flipped off Parameter { Variable "Operator" Value "1" Show off } Parameter { Variable "Inputs" Value "2" Show off } } Component { Type ConstantRelationalOperator Name "Compare to\nConstant8" Show off Position [290, 285] Direction right Flipped off Frame [-30, -10; 30, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "Operator" Value "5" Show off } Parameter { Variable "Threshold" Value "-180" Show off } } Component { Type ConstantRelationalOperator Name "Compare to\nConstant9" Show off Position [290, 315] Direction right Flipped off Frame [-30, -10; 30, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "Operator" Value "3" Show off } Parameter { Variable "Threshold" Value "-150" Show off } } Component { Type LogicalOperator Name "Logical\nOperator4" Show off Position [365, 300] Direction up Flipped off Parameter { Variable "Operator" Value "1" Show off } Parameter { Variable "Inputs" Value "2" Show off } } Component { Type ConstantRelationalOperator Name "Compare to\nConstant10" Show off Position [290, 350] Direction right Flipped off Frame [-30, -10; 30, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "Operator" Value "5" Show off } Parameter { Variable "Threshold" Value "-150" Show off } } Component { Type ConstantRelationalOperator Name "Compare to\nConstant11" Show off Position [290, 380] Direction right Flipped off Frame [-30, -10; 30, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "Operator" Value "3" Show off } Parameter { Variable "Threshold" Value "-90" Show off } } Component { Type LogicalOperator Name "Logical\nOperator5" Show off Position [365, 365] Direction up Flipped off Parameter { Variable "Operator" Value "1" Show off } Parameter { Variable "Inputs" Value "2" Show off } } Component { Type Gain Name "Pole pairs" Show on Position [115, 25] Direction right Flipped off Parameter { Variable "K" Value "1" Show off } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "10" Show off } } Component { Type Gain Name "rad -> deg." Show on Position [185, 25] Direction right Flipped off Parameter { Variable "K" Value "180/pi" Show off } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "10" Show off } } Component { Type LogicalOperator Name "Logical\nOperator6" Show off Position [555, 205] Direction up Flipped off Parameter { Variable "Operator" Value "2" Show off } Parameter { Variable "Inputs" Value "3" Show off } } Component { Type LogicalOperator Name "Logical\nOperator7" Show off Position [555, 150] Direction up Flipped off Parameter { Variable "Operator" Value "2" Show off } Parameter { Variable "Inputs" Value "3" Show off } } Component { Type LogicalOperator Name "Logical\nOperator8" Show off Position [555, 260] Direction up Flipped off Parameter { Variable "Operator" Value "2" Show off } Parameter { Variable "Inputs" Value "3" Show off } } Component { Type LogicalOperator Name "Logical\nOperator9" Show off Position [425, 240] Direction up Flipped off Parameter { Variable "Operator" Value "2" Show off } Parameter { Variable "Inputs" Value "2" Show off } } Component { Type ConstantRelationalOperator Name "Compare to\nConstant12" Show off Position [290, 415] Direction right Flipped off Frame [-30, -10; 30, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "Operator" Value "5" Show off } Parameter { Variable "Threshold" Value "-90" Show off } } Component { Type ConstantRelationalOperator Name "Compare to\nConstant13" Show off Position [290, 445] Direction right Flipped off Frame [-30, -10; 30, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "Operator" Value "3" Show off } Parameter { Variable "Threshold" Value "-30" Show off } } Component { Type LogicalOperator Name "Logical\nOperator10" Show off Position [365, 430] Direction up Flipped off Parameter { Variable "Operator" Value "1" Show off } Parameter { Variable "Inputs" Value "2" Show off } } Connection { Type Signal SrcComponent "Mux" SrcTerminal 1 DstComponent "H_abc" DstTerminal 1 } Connection { Type Signal SrcComponent "Compare to\nConstant" SrcTerminal 2 Points [330, 25; 330, 35] DstComponent "Logical\nOperator" DstTerminal 2 } Connection { Type Signal SrcComponent "Compare to\nConstant1" SrcTerminal 2 Points [330, 55; 330, 45] DstComponent "Logical\nOperator" DstTerminal 3 } Connection { Type Signal SrcComponent "Compare to\nConstant2" SrcTerminal 2 Points [330, 90; 330, 100] DstComponent "Logical\nOperator1" DstTerminal 2 } Connection { Type Signal SrcComponent "Compare to\nConstant3" SrcTerminal 2 Points [330, 120; 330, 110] DstComponent "Logical\nOperator1" DstTerminal 3 } Connection { Type Signal SrcComponent "Compare to\nConstant4" SrcTerminal 2 Points [330, 155; 330, 165] DstComponent "Logical\nOperator2" DstTerminal 2 } Connection { Type Signal SrcComponent "Compare to\nConstant5" SrcTerminal 2 Points [330, 185; 330, 175] DstComponent "Logical\nOperator2" DstTerminal 3 } Connection { Type Signal SrcComponent "Compare to\nConstant6" SrcTerminal 2 Points [330, 220; 330, 230] DstComponent "Logical\nOperator3" DstTerminal 2 } Connection { Type Signal SrcComponent "Compare to\nConstant7" SrcTerminal 2 Points [330, 250; 330, 240] DstComponent "Logical\nOperator3" DstTerminal 3 } Connection { Type Signal SrcComponent "Compare to\nConstant8" SrcTerminal 2 Points [330, 285; 330, 295] DstComponent "Logical\nOperator4" DstTerminal 2 } Connection { Type Signal SrcComponent "Compare to\nConstant9" SrcTerminal 2 Points [330, 315; 330, 305] DstComponent "Logical\nOperator4" DstTerminal 3 } Connection { Type Signal SrcComponent "Compare to\nConstant10" SrcTerminal 2 Points [330, 350; 330, 360] DstComponent "Logical\nOperator5" DstTerminal 2 } Connection { Type Signal SrcComponent "Compare to\nConstant11" SrcTerminal 2 Points [330, 380; 330, 370] DstComponent "Logical\nOperator5" DstTerminal 3 } Connection { Type Signal SrcComponent "Pole pairs" SrcTerminal 2 DstComponent "rad -> deg." DstTerminal 1 } Connection { Type Signal SrcComponent "theta" SrcTerminal 1 DstComponent "Pole pairs" DstTerminal 1 } Connection { Type Signal SrcComponent "rad -> deg." SrcTerminal 2 Points [230, 25] Branch { DstComponent "Compare to\nConstant" DstTerminal 1 } Branch { Points [230, 55] Branch { DstComponent "Compare to\nConstant1" DstTerminal 1 } Branch { Points [230, 90] Branch { DstComponent "Compare to\nConstant2" DstTerminal 1 } Branch { Points [230, 120] Branch { DstComponent "Compare to\nConstant3" DstTerminal 1 } Branch { Points [230, 155] Branch { DstComponent "Compare to\nConstant4" DstTerminal 1 } Branch { Points [230, 185] Branch { DstComponent "Compare to\nConstant5" DstTerminal 1 } Branch { Points [230, 220] Branch { DstComponent "Compare to\nConstant6" DstTerminal 1 } Branch { Points [230, 250] Branch { DstComponent "Compare to\nConstant7" DstTerminal 1 } Branch { Points [230, 285] Branch { DstComponent "Compare to\nConstant8" DstTerminal 1 } Branch { Points [230, 315] Branch { DstComponent "Compare to\nConstant9" DstTerminal 1 } Branch { Points [230, 350] Branch { DstComponent "Compare to\nConstant10" DstTerminal 1 } Branch { Points [230, 380] Branch { DstComponent "Compare to\nConstant11" DstTerminal 1 } Branch { Points [230, 415] Branch { DstComponent "Compare to\nConstant12" DstTerminal 1 } Branch { Points [230, 445] DstComponent "Compare to\nConstant13" DstTerminal 1 } } } } } } } } } } } } } } Connection { Type Signal SrcComponent "Logical\nOperator6" SrcTerminal 1 DstComponent "Mux" DstTerminal 3 } Connection { Type Signal SrcComponent "Logical\nOperator8" SrcTerminal 1 Points [590, 260; 590, 215] DstComponent "Mux" DstTerminal 4 } Connection { Type Signal SrcComponent "Logical\nOperator7" SrcTerminal 1 Points [590, 150; 590, 195] DstComponent "Mux" DstTerminal 2 } Connection { Type Signal SrcComponent "Logical\nOperator1" SrcTerminal 1 Points [470, 105; 470, 260] DstComponent "Logical\nOperator8" DstTerminal 3 } Connection { Type Signal SrcComponent "Logical\nOperator2" SrcTerminal 1 Points [510, 170] Branch { Points [510, 160] DstComponent "Logical\nOperator7" DstTerminal 4 } Branch { Points [510, 270] DstComponent "Logical\nOperator8" DstTerminal 4 } } Connection { Type Signal SrcComponent "Logical\nOperator" SrcTerminal 1 Points [485, 40; 485, 195] Branch { DstComponent "Logical\nOperator6" DstTerminal 2 } Branch { Points [485, 250] DstComponent "Logical\nOperator8" DstTerminal 2 } } Connection { Type Signal SrcComponent "Logical\nOperator3" SrcTerminal 1 DstComponent "Logical\nOperator9" DstTerminal 2 } Connection { Type Signal SrcComponent "Logical\nOperator4" SrcTerminal 1 Points [385, 245] DstComponent "Logical\nOperator9" DstTerminal 3 } Connection { Type Signal SrcComponent "Logical\nOperator9" SrcTerminal 1 Points [455, 240; 455, 150] DstComponent "Logical\nOperator7" DstTerminal 3 } Connection { Type Signal SrcComponent "Logical\nOperator5" SrcTerminal 1 Points [495, 365; 495, 205] Branch { DstComponent "Logical\nOperator6" DstTerminal 3 } Branch { Points [495, 140] DstComponent "Logical\nOperator7" DstTerminal 2 } } Connection { Type Signal SrcComponent "Compare to\nConstant12" SrcTerminal 2 Points [330, 415; 330, 425] DstComponent "Logical\nOperator10" DstTerminal 2 } Connection { Type Signal SrcComponent "Compare to\nConstant13" SrcTerminal 2 Points [330, 445; 330, 435] DstComponent "Logical\nOperator10" DstTerminal 3 } Connection { Type Signal SrcComponent "Logical\nOperator10" SrcTerminal 1 Points [520, 430; 520, 215] DstComponent "Logical\nOperator6" DstTerminal 4 } } } Component { Type Subsystem Name "Hall Sensor" Show on Position [1055, 60] Direction up Flipped on Frame [-20, -15; 20, 15] LabelPosition [0, -18] LabelAlign down SampleTime "-1" CodeGenDiscretizationMethod "2" CodeGenTarget "Generic" MaskType "Hall Sensor" MaskIconFrame on MaskIconOpaque off MaskIconRotates on Parameter { Variable "pp" Prompt "Number of pole-pairs" Type FreeText Value "1" Show off Tunable off TabName "" } Parameter { Variable "offset" Prompt "Offset" Type FreeText Value "0" Show off Tunable off TabName "" } Terminal { Type Output Position [24, 0] Direction right } Terminal { Type Input Position [-20, 0] Direction left } Schematic { Location [2899, 460; 3327, 638] ZoomFactor 1 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Component { Type Output Name "h" Show on Position [225, 60] Direction right Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Input Name "thm" Show on Position [60, 60] Direction right Flipped off Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type CScript Name "Hall Sensor" Show on Position [140, 60] Direction up Flipped off Parameter { Variable "DialogGeometry" Value "[2931 420 422 314]" Show off } Parameter { Variable "NumInputs" Value "1" Show off } Parameter { Variable "NumOutputs" Value "3" 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 "Parameters" Value "[pp, offset]" Show off } Parameter { Variable "LangStandard" Value "2" Show off } Parameter { Variable "GnuExtensions" Value "2" Show off } Parameter { Variable "RuntimeCheck" Value "2" Show off } Parameter { Variable "Declarations" Value "#include \"math.h\"\n" "#include \"stdio.h\"\n" "\n" "static double AngleOffset;\n" "static int pp;\n" "\n" "#ifndef PI\n" "#define PI (3.141592653589793)\n" "#endif\n" Show off } Parameter { Variable "StartFcn" Value "pp = (int) ParamRealData(0, 0);\n" "AngleOffset = ParamRealData(0, 1);\n" Show off } Parameter { Variable "OutputFcn" Value "double te = pp * (Input(0)+2*PI) + AngleOffset;" "\n" "\n" "int a = (int) (te*6./PI);\n" "\n" "Output(0) = (a+17) % 12 >= 6;\n" "Output(1) = (a+13) % 12 >= 6;\n" "Output(2) = (a+9) % 12 >= 6;\n" "\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 } } Connection { Type Signal SrcComponent "thm" SrcTerminal 1 DstComponent "Hall Sensor" DstTerminal 1 } Connection { Type Signal SrcComponent "Hall Sensor" SrcTerminal 2 DstComponent "h" DstTerminal 1 } } } Component { Type Reference SrcComponent "PLECSRTBoxLib/Digital Out1" Name "Hall Signals" Show on Position [1180, 135] Direction up Flipped off Frame [-25, -20; 25, 20] LabelPosition [0, 23] LabelAlign up Parameter { Variable "channel" Value "[22,23,24]" Show on } Parameter { Variable "TargetPortIndices" Value "1" Show off } Terminal { Type Input Position [-25, 0] Direction left } } Component { Type Goto Name "Goto4" Show off Position [365, 75] Direction right Flipped off Parameter { Variable "Tag" Value "I_DC" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type Ammeter Name "Iu" Show on Position [415, 175] Direction up Flipped off } Component { Type Ammeter Name "Iv" Show on Position [485, 175] Direction up Flipped off } Component { Type Ammeter Name "Iw" Show on Position [555, 175] Direction up Flipped off } Component { Type Scope Name "Gate Signals" Show on Position [570, 410] Direction up Flipped off Location [0, 27; 1920, 1064] State "AAAA/wAAAAD9AAAAAgAAAAEAAAC0AAADV/wCAAAAA/sAAAAQAFoAb" "wBvAG0AQQByAGUAYQAAAAAA/////wAAAPwA////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwAAAA" "AA/////wAAAGYA////+wAAAAwAVAByAGEAYwBlAHMBAAAALwAAA1cAAABmAP///wAAAAMAAAeAAAA" "Al/wBAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQBAAAAAAAAB4AAAABQAP///wAABsgAAANX" "AAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP////8AA" "AAAAAAAAA==" SavedViews "AAAAAgAAAAA=" HeaderState "AAAA/wAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAL/gMAAAAJA" "AAAAwAAAGQAAAABAAAAZAAAAAYAAABkAAAABwAAAGQAAAAEAAAAZAAAAAUAAABkAAAACAAAAGQAAA" "AJAAAAZAAAAAIAAABkAAAHgAAAAAsBAAABAAAAAAAAAAAAAAAAZP////8AAACBAAAAAAAAAAsAAAB" "zAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAA" "AAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAA" "AAAAAcNAAAAAQAAAAAAAAPoAAAAACQ=" PlotPalettes "AAAAAQAAAAEAAAABAAAAAQAAAAEC//8u4P//zMwAAAAAAAEAAAABA" "AAAAAEAAAABAAAAAQAAAAEAAAABAAAAAAEAAAABQAAAAAAAAAAAAAABAAAAAQEAAAABAAAAAQAAAA" "EAAAABAv//LuD//8zMAAAAAAABAAAAAQAAAAABAAAAAQAAAAEAAAABAAAAAQAAAAABAAAAAUAAAAA" "AAAAAAAAAAQAAAAEBAAAAAQAAAAEAAAABAAAAAQL//y7g///MzAAAAAAAAQAAAAEAAAAAAQAAAAEA" "AAABAAAAAQAAAAEAAAAAAQAAAAFAAAAAAAAAAAAAAAEAAAABAQAAAAEAAAABAAAAAQAAAAEC//8u4" "P//zMwAAAAAAAEAAAABAAAAAAEAAAABAAAAAQAAAAEAAAABAAAAAAEAAAABQAAAAAAAAAAAAAABAA" "AAAQEAAAABAAAAAQAAAAEAAAABAv//LuD//8zMAAAAAAABAAAAAQAAAAABAAAAAQAAAAEAAAABAAA" "AAQAAAAABAAAAAUAAAAAAAAAAAAAAAQAAAAEBAAAAAQAAAAEAAAABAAAAAQL//y7g///MzAAAAAAA" "AQAAAAEAAAAAAQAAAAEAAAABAAAAAQAAAAEAAAAAAQAAAAFAAAAAAAAAAAAAAAEAAAABAQ==" Axes "6" TimeRange "0" ScrollingMode "1" SingleTimeAxis "1" Open "0" Ts "-1" SampleLimit "0" XAxisLabel "" ShowLegend "1" Axis { Name "Gatesignal Tu+" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "Gatesignal Tu-" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "Gatesignal Tv+" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "Gatesignal Tv-" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "Gatesignal Tw+" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "Gatesignal Tw-" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Fourier { SingleXAxis on AxisLabel "Frequency" 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 } Axis { Name "" AutoScale 1 MinValue 0 MaxValue 1 Signals {} Untangle 0 KeepBaseline off BaselineValue 0 } } } Component { Type Reference SrcComponent "PLECSRTBoxLib/PWM Capture1" Name "Sw PWM1" Show on Position [240, 405] Direction up Flipped off Frame [-25, -20; 25, 20] LabelPosition [0, 23] LabelAlign up Parameter { Variable "channel" Value "[0 1]" Show on } Parameter { Variable "polarity" Value "1" Show off } Parameter { Variable "inputType" Value "1" Show off } Parameter { Variable "Ts" Value "2e-6" Show off } Parameter { Variable "TargetPortIndices" Value "2" Show off } Terminal { Type Output Position [29, 0] Direction right } } Component { Type Reference SrcComponent "PLECSRTBoxLib/Digital Out1" Name "En_Output\nPoPr" Show on Position [330, 915] Direction up Flipped off Frame [-25, -20; 25, 20] LabelPosition [0, 23] LabelAlign up Parameter { Variable "channel" Value "21" Show on } Parameter { Variable "TargetPortIndices" Value "3" Show off } Terminal { Type Input Position [-25, 0] Direction left } } Component { Type Reference SrcComponent "PLECSRTBoxLib/Digital In1" Name "En_Input\nPoPr" Show on Position [210, 915] Direction up Flipped off Frame [-25, -20; 25, 20] LabelPosition [0, 23] LabelAlign up Parameter { Variable "channel" Value "28" Show off } Parameter { Variable "inputType" Value "1" Show off } Parameter { Variable "TargetPortIndices" Value "4" Show off } Terminal { Type Output Position [29, 0] Direction right } } Component { Type Reference SrcComponent "PLECSRTBoxLib/Digital In1" Name "Power" Show on Position [185, 830] Direction up Flipped on Frame [-25, -20; 25, 20] LabelPosition [0, -23] LabelAlign down Parameter { Variable "channel" Value "24" Show on } Parameter { Variable "inputType" Value "1" Show off } Parameter { Variable "TargetPortIndices" Value "5" Show off } Terminal { Type Output Position [29, 0] Direction right } } Component { Type Reference SrcComponent "PLECSRTBoxLib/Digital Out1" Name "LED 30: Powerstage enabled" Show on Position [330, 830] Direction up Flipped on Frame [-25, -20; 25, 20] LabelPosition [0, -23] LabelAlign down Parameter { Variable "channel" Value "30" Show on } Parameter { Variable "TargetPortIndices" Value "6" Show off } Terminal { Type Input Position [-25, 0] Direction left } } Component { Type LogicalOperator Name "Logical\nOperator5" Show off Position [260, 830] Direction up Flipped on Parameter { Variable "Operator" Value "6" Show off } Parameter { Variable "Inputs" Value "1" Show off } } Component { Type Scope Name "Scope2" Show on Position [930, 535] Direction up Flipped off Location [0, 27; 1920, 1064] State "AAAA/wAAAAD9AAAAAgAAAAEAAAC0AAADfvwCAAAAA/sAAAAQAFoAb" "wBvAG0AQQByAGUAYQAAAAAA/////wAAAIQA////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwAAAA" "AA/////wAAAGYA////+wAAAAwAVAByAGEAYwBlAHMBAAAALwAAA34AAABmAP///wAAAAMAAAeAAAA" "AcPwBAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQBAAAAAAAAB4AAAABQAP///wAABsgAAAN+" "AAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP////8AA" "AAAAAAAAA==" SavedViews "AAAAAgAAAAA=" HeaderState "AAAA/wAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAL/gMAAAAJA" "AAABAAAAkwAAAAFAAACTAAAAAYAAAJMAAAABwAAAkwAAAAIAAACTAAAAAkAAAJMAAAAAQAAAk0AAA" "ACAAACTAAAAAMAAAJMAAAHgAAAAAsBAAABAAAAAAAAAAAAAAAAZP////8AAACBAAAAAAAAAAsAAAE" "KAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAA" "AAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAA" "AAAAAZ2AAAAAQAAAAAAAAPoAAAAACQ=" PlotPalettes "AAAAAQAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" "QAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAA" "AAAA==" Axes "3" TimeRange "0" ScrollingMode "1" SingleTimeAxis "1" Open "0" Ts "-1" SampleLimit "0" XAxisLabel "" ShowLegend "1" Axis { Name "Istdrehzahl" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "Rotorposition" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "elektromagnetisches Drehmoment" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Fourier { SingleXAxis on AxisLabel "Frequency" 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 Gain Name "n" Show off Position [795, 485] Direction right Flipped off Parameter { Variable "K" Value "60/(2*pi)" Show off } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type From Name "From2" Show off Position [755, 485] Direction right Flipped off Parameter { Variable "Tag" Value "speed" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type PlecsProbe Name "Probe" Show off Position [830, 570] Direction right Flipped off } Component { Type From Name "From" Show off Position [715, 535] Direction right Flipped off Parameter { Variable "Tag" Value "rotor position" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type Display Name "Display" Show off Position [910, 460] Direction up Flipped off Frame [-41, -11; 41, 11] LabelPosition [0, 14] LabelAlign up Parameter { Variable "Notation" Value "1" Show off } Parameter { Variable "Precision" Value "4" Show off } } Component { Type SignalDemux Name "Demux3" Show off Position [1310, 450] Direction right Flipped on Parameter { Variable "Width" Value "3" Show off } } Component { Type From Name "From8" Show off Position [1275, 450] Direction right Flipped off Parameter { Variable "Tag" Value "Iuvw" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type From Name "From9" Show off Position [1340, 530] Direction right Flipped off Parameter { Variable "Tag" Value "I_DC" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type PlecsProbe Name "Back EMF" Show on Position [1190, 480] Direction right Flipped off } Component { Type SignalDemux Name "Demux5" Show off Position [1310, 480] Direction right Flipped on Parameter { Variable "Width" Value "3" Show off } } Component { Type Scope Name "Scope1" Show on Position [1410, 470] Direction up Flipped off Location [1920, 27; 3840, 1064] State "AAAA/wAAAAD9AAAAAgAAAAEAAAC0AAADSvwCAAAAA/sAAAAQAFoAb" "wBvAG0AQQByAGUAYQAAAAAA/////wAAASQA////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwAAAA" "AA/////wAAAGYA////+wAAAAwAVAByAGEAYwBlAHMBAAAALwAAA0oAAABmAP///wAAAAMAAAeAAAA" "ApPwBAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQBAAAAAAAAB4AAAABQAP///wAABsgAAANK" "AAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP////8AA" "AAAAAAAAA==" SavedViews "AAAAAgAAAAA=" HeaderState "AAAA/wAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAL+AMAAAAHA" "AAABQAAAGQAAAAEAAAAZAAAAAcAAABkAAAABgAAAGQAAAADAAAAZAAAAAkAAABkAAAACAAAAGQAAA" "dvAAAACwEAAAEAAAAAAAAAAAAAAABk/////wAAAIEAAAAAAAAACwAAAPAAAAABAAAAAAAAAGQAAAA" "BAAAAAAAAAGQAAAABAAAAAAAAAAAAAAABAAAAAAAAAAAAAAABAAAAAAAAAAAAAAABAAAAAAAAAAAA" "AAABAAAAAAAAAAAAAAABAAAAAAAAAAAAAAABAAAAAAAAAAAAAAABAAAAAAAABbcAAAABAAAAAAAAA" "+gAAAAAJA==" PlotPalettes "AAAAAQAAAAEAAAABAAAAAQAAAAEB//8AAMzMAAAAAAAAAAEAAAABA" "QAAAAEAAAABAAAAAQAAAAEAAAABAAAAAAEAAAABP/AAAAAAAAAAAAABAAAAAQAAAAABAAAAAQAAAA" "EAAAABAf//AABVVf//AAAAAAABAAAAAQEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAABAAAAAT/wAAA" "AAAAAAAAAAQAAAAEAAAAAAQAAAAEAAAABAAAAAQH/////AAAAAAAAAAAAAQAAAAEBAAAAAQAAAAEA" "AAABAAAAAQAAAAEAAAAAAQAAAAE/8AAAAAAAAAAAAAEAAAABAAAAAAEAAAABAAAAAQAAAAEB//8AA" "MzMAAAAAAAAAAEAAAABAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAAEAAAABP/AAAAAAAAAAAAABAA" "AAAQAAAAABAAAAAQAAAAEAAAABAf//AABVVf//AAAAAAABAAAAAQEAAAABAAAAAQAAAAEAAAABAAA" "AAQAAAAABAAAAAT/wAAAAAAAAAAAAAQAAAAEAAAAAAQAAAAEAAAABAAAAAQH/////AAAAAAAAAAAA" "AQAAAAEBAAAAAQAAAAEAAAABAAAAAQAAAAEAAAAAAQAAAAE/8AAAAAAAAAAAAAEAAAABAAAAAAEAA" "AABAAAAAQAAAAEB//+qqgAAAAAAAAAAAAEAAAABAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAAEAAA" "ABP/AAAAAAAAAAAAABAAAAAQA=" Axes "7" TimeRange "0" ScrollingMode "1" SingleTimeAxis "1" Open "0" Ts "-1" SampleLimit "0" XAxisLabel "" ShowLegend "1" Axis { Name "i_u" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "i_v" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "i_w" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "e_a" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "e_b" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "e_c" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "Zwischenkreisstrom i_DC" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Fourier { SingleXAxis on AxisLabel "Frequency" 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 } 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 PlecsProbe Name "Probe6" Show off Position [1000, 735] Direction right Flipped off } Component { Type PlecsProbe Name "Probe7" Show off Position [855, 750] Direction right Flipped off } Component { Type PlecsProbe Name "Probe8" Show off Position [910, 790] Direction right Flipped off } Component { Type From Name "From10" Show off Position [1120, 805] Direction right Flipped off Parameter { Variable "Tag" Value "Uuvw" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type SignalDemux Name "Demux4" Show off Position [1160, 805] Direction right Flipped on Parameter { Variable "Width" Value "3" Show off } } Component { Type Scope Name "Scope7" Show off Position [1220, 755] Direction up Flipped off Location [0, 27; 1920, 1064] State "AAAA/wAAAAD9AAAAAgAAAAEAAAC0AAADk/wCAAAAA/sAAAAQAFoAb" "wBvAG0AQQByAGUAYQAAAAAA/////wAAASQA////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwAAAA" "AA/////wAAAGYA////+wAAAAwAVAByAGEAYwBlAHMBAAAALwAAA5MAAABmAP///wAAAAMAAAeAAAA" "AW/wBAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQBAAAAAAAAB4AAAABQAP///wAABsgAAAOT" "AAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP////8AA" "AAAAAAAAA==" SavedViews "AAAAAgAAAAA=" HeaderState "AAAA/wAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAL/gMAAAAJA" "AAABAAAAGQAAAAFAAAAZAAAAAYAAABkAAAABwAAAGQAAAAIAAAAZAAAAAkAAABkAAAAAQAAAGQAAA" "ACAAAAZAAAAAMAAABkAAAHbwAAAAsBAAABAAAAAAAAAAAAAAAAZP////8AAACBAAAAAAAAAAsAAAD" "jAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAA" "AAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAA" "AAAAAaMAAAAAQAAAAAAAAPoAAAAACQ=" PlotPalettes "AAAAAQAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" "QAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAA" "AAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAA" "AAAAAAAAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAAAAAAAA" "AAAAAAAAAAAAAAAAAAAA" Axes "7" TimeRange "0" ScrollingMode "1" SingleTimeAxis "1" Open "0" Ts "-1" SampleLimit "0" XAxisLabel "" ShowLegend "2" Axis { Name "Zwischenkreisspannung U_DC" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "u_UG" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "u_VG" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "u_WG" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "u_UV" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "u_VW" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "u_WU" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Fourier { SingleXAxis on AxisLabel "Frequency" 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 } 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 From Name "From3" Show off Position [1150, 695] Direction right Flipped off Parameter { Variable "Tag" Value "u_DC" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type PlecsProbe Name "Probe3" Show off Position [770, 900] Direction right Flipped off } Component { Type From Name "From5" Show off Position [575, 865] Direction right Flipped off Parameter { Variable "Tag" Value "hall" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type Scope Name "Scope" Show off Position [870, 865] Direction up Flipped off Location [0, 27; 1920, 1064] State "AAAA/wAAAAD9AAAAAgAAAAEAAAC0AAADk/wCAAAAA/sAAAAQAFoAb" "wBvAG0AQQByAGUAYQAAAAAA/////wAAAIQA////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwAAAA" "AA/////wAAAGYA////+wAAAAwAVAByAGEAYwBlAHMBAAAALwAAA5MAAABmAP///wAAAAMAAAeAAAA" "AW/wBAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQBAAAAAAAAB4AAAABQAP///wAABsgAAAOT" "AAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP////8AA" "AAAAAAAAA==" SavedViews "AAAAAgAAAAA=" HeaderState "AAAA/wAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAL/gMAAAAJA" "AAABAAAAGQAAAAFAAAAZAAAAAYAAABkAAAABwAAAGQAAAAIAAAAZAAAAAkAAABkAAAAAQAAAGQAAA" "ACAAAAZAAAAAMAAABkAAAHbwAAAAsBAAABAAAAAAAAAAAAAAAAZP////8AAACBAAAAAAAAAAsAAAD" "wAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAA" "AAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAA" "AAAAAZ/AAAAAQAAAAAAAAPoAAAAACQ=" PlotPalettes "AAAAAQAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" "QAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAA" "AAAA==" Axes "3" TimeRange "0" ScrollingMode "1" SingleTimeAxis "1" Open "0" Ts "-1" SampleLimit "0" XAxisLabel "" ShowLegend "2" Axis { Name "Rotorwinkel" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "Hall Signale" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 1 KeepBaseline off BaselineValue 0 } Axis { Name "Back EMF" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 1 KeepBaseline off BaselineValue 0 } Fourier { SingleXAxis on AxisLabel "Frequency" 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 From Name "From1" Show off Position [755, 830] Direction right Flipped off Parameter { Variable "Tag" Value "rotor position" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type SignalSwitch Name "Switch" Show off Position [305, 410] Direction left Flipped on Parameter { Variable "Criteria" Value "2" Show off } Parameter { Variable "Threshold" Value "0" Show off } } Component { Type Reference SrcComponent "PLECSRTBoxLib/Digital In1" Name "INH1" Show on Position [205, 480] Direction up Flipped off Frame [-25, -20; 25, 20] LabelPosition [0, 23] LabelAlign up Parameter { Variable "channel" Value "16" Show on } Parameter { Variable "inputType" Value "1" Show off } Parameter { Variable "TargetPortIndices" Value "7" Show off } Terminal { Type Output Position [29, 0] Direction right } } Component { Type SignalDemux Name "Demux" Show off Position [340, 410] Direction right Flipped on Parameter { Variable "Width" Value "2" Show off } } Component { Type Reference SrcComponent "PLECSRTBoxLib/PWM Capture1" Name "Sw PWM2" Show on Position [305, 510] Direction up Flipped off Frame [-25, -20; 25, 20] LabelPosition [0, 23] LabelAlign up Parameter { Variable "channel" Value "[2 3]" Show on } Parameter { Variable "polarity" Value "1" Show off } Parameter { Variable "inputType" Value "1" Show off } Parameter { Variable "Ts" Value "2e-6" Show off } Parameter { Variable "TargetPortIndices" Value "8" Show off } Terminal { Type Output Position [29, 0] Direction right } } Component { Type SignalSwitch Name "Switch1" Show off Position [365, 515] Direction left Flipped on Parameter { Variable "Criteria" Value "2" Show off } Parameter { Variable "Threshold" Value "0" Show off } } Component { Type Reference SrcComponent "PLECSRTBoxLib/Digital In1" Name "INH2" Show on Position [275, 585] Direction up Flipped off Frame [-25, -20; 25, 20] LabelPosition [0, 23] LabelAlign up Parameter { Variable "channel" Value "17" Show on } Parameter { Variable "inputType" Value "1" Show off } Parameter { Variable "TargetPortIndices" Value "9" Show off } Terminal { Type Output Position [29, 0] Direction right } } Component { Type SignalDemux Name "Demux6" Show off Position [405, 515] Direction right Flipped on Parameter { Variable "Width" Value "2" Show off } } Component { Type Reference SrcComponent "PLECSRTBoxLib/PWM Capture1" Name "Sw PWM3" Show on Position [370, 615] Direction up Flipped off Frame [-25, -20; 25, 20] LabelPosition [0, 23] LabelAlign up Parameter { Variable "channel" Value "[4 5]" Show on } Parameter { Variable "polarity" Value "1" Show off } Parameter { Variable "inputType" Value "1" Show off } Parameter { Variable "Ts" Value "2e-6" Show off } Parameter { Variable "TargetPortIndices" Value "10" Show off } Terminal { Type Output Position [29, 0] Direction right } } Component { Type SignalSwitch Name "Switch2" Show off Position [430, 620] Direction left Flipped on Parameter { Variable "Criteria" Value "2" Show off } Parameter { Variable "Threshold" Value "0" Show off } } Component { Type Reference SrcComponent "PLECSRTBoxLib/Digital In1" Name "INH3" Show on Position [340, 695] Direction up Flipped off Frame [-25, -20; 25, 20] LabelPosition [0, 23] LabelAlign up Parameter { Variable "channel" Value "18" Show on } Parameter { Variable "inputType" Value "1" Show off } Parameter { Variable "TargetPortIndices" Value "11" Show off } Terminal { Type Output Position [29, 0] Direction right } } Component { Type SignalDemux Name "Demux7" Show off Position [470, 620] Direction right Flipped on Parameter { Variable "Width" Value "2" Show off } } Component { Type LogicalOperator Name "Logical\nOperator" Show off Position [260, 480] Direction up Flipped off Parameter { Variable "Operator" Value "6" Show off } Parameter { Variable "Inputs" Value "2" Show off } } Component { Type LogicalOperator Name "Logical\nOperator1" Show off Position [330, 585] Direction up Flipped off Parameter { Variable "Operator" Value "6" Show off } Parameter { Variable "Inputs" Value "2" Show off } } Component { Type LogicalOperator Name "Logical\nOperator2" Show off Position [400, 695] Direction up Flipped off Parameter { Variable "Operator" Value "6" Show off } Parameter { Variable "Inputs" Value "2" Show off } } Component { Type Reference SrcComponent "PLECSRTBoxLib/Analog Out1" Name "I_uvw" Show on Position [1355, 370] Direction up Flipped off Frame [-25, -20; 25, 20] LabelPosition [0, 23] LabelAlign up Parameter { Variable "channel" Value "[17 18 19]" Show on } Parameter { Variable "scale" Value "1" Show off } Parameter { Variable "offset" Value "0" Show off } Parameter { Variable "minOutput" Value "" Show off } Parameter { Variable "maxOutput" Value "" 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 "Back EMF1" Show on Position [1270, 540] Direction up Flipped off Frame [-25, -20; 25, 20] LabelPosition [0, 23] LabelAlign up Parameter { Variable "channel" Value "[20 21 22]" Show on } Parameter { Variable "scale" Value "1" Show off } Parameter { Variable "offset" Value "0" Show off } Parameter { Variable "minOutput" Value "" Show off } Parameter { Variable "maxOutput" Value "" 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 "IDC" Show on Position [1405, 570] Direction up Flipped off Frame [-25, -20; 25, 20] LabelPosition [0, 23] LabelAlign up Parameter { Variable "channel" Value "[6]" Show on } Parameter { Variable "scale" Value "1" Show off } Parameter { Variable "offset" Value "0" Show off } Parameter { Variable "minOutput" Value "" Show off } Parameter { Variable "maxOutput" Value "" Show off } Parameter { Variable "TargetPortIndices" Value "14" Show off } Terminal { Type Input Position [-25, 0] Direction left } } Component { Type Reference SrcComponent "PLECSRTBoxLib/Analog Out1" Name "speed" Show on Position [920, 385] Direction up Flipped off Frame [-25, -20; 25, 20] LabelPosition [0, 23] LabelAlign up Parameter { Variable "channel" Value "[7]" Show on } Parameter { Variable "scale" Value "1" Show off } Parameter { Variable "offset" Value "0" Show off } Parameter { Variable "minOutput" Value "" Show off } Parameter { Variable "maxOutput" Value "" Show off } Parameter { Variable "TargetPortIndices" Value "15" Show off } Terminal { Type Input Position [-25, 0] Direction left } } Component { Type Reference SrcComponent "PLECSRTBoxLib/Analog Out1" Name "rotor position" Show on Position [785, 605] Direction up Flipped off Frame [-25, -20; 25, 20] LabelPosition [0, 23] LabelAlign up Parameter { Variable "channel" Value "[8]" Show on } Parameter { Variable "scale" Value "1" Show off } Parameter { Variable "offset" Value "0" Show off } Parameter { Variable "minOutput" Value "" Show off } Parameter { Variable "maxOutput" Value "" Show off } Parameter { Variable "TargetPortIndices" Value "16" Show off } Terminal { Type Input Position [-25, 0] Direction left } } Component { Type Reference SrcComponent "PLECSRTBoxLib/Analog Out1" Name "Torque" Show on Position [900, 600] Direction up Flipped off Frame [-25, -20; 25, 20] LabelPosition [0, 23] LabelAlign up Parameter { Variable "channel" Value "[9]" Show on } Parameter { Variable "scale" Value "1" Show off } Parameter { Variable "offset" Value "0" Show off } Parameter { Variable "minOutput" Value "" Show off } Parameter { Variable "maxOutput" Value "" Show off } Parameter { Variable "TargetPortIndices" Value "17" Show off } Terminal { Type Input Position [-25, 0] Direction left } } Component { Type Reference SrcComponent "PLECSRTBoxLib/Analog Out1" Name "u_DC" Show on Position [1230, 640] Direction up Flipped off Frame [-25, -20; 25, 20] LabelPosition [0, 23] LabelAlign up Parameter { Variable "channel" Value "[10]" Show on } Parameter { Variable "scale" Value "1" Show off } Parameter { Variable "offset" Value "0" Show off } Parameter { Variable "minOutput" Value "" Show off } Parameter { Variable "maxOutput" Value "" Show off } Parameter { Variable "TargetPortIndices" Value "18" Show off } Terminal { Type Input Position [-25, 0] Direction left } } Component { Type Reference SrcComponent "PLECSRTBoxLib/Analog Out1" Name "V_m1" Show on Position [1075, 635] Direction up Flipped off Frame [-25, -20; 25, 20] LabelPosition [0, 23] LabelAlign up Parameter { Variable "channel" Value "[11]" Show on } Parameter { Variable "scale" Value "1" Show off } Parameter { Variable "offset" Value "0" Show off } Parameter { Variable "minOutput" Value "" Show off } Parameter { Variable "maxOutput" Value "" Show off } Parameter { Variable "TargetPortIndices" Value "19" Show off } Terminal { Type Input Position [-25, 0] Direction left } } Component { Type Reference SrcComponent "PLECSRTBoxLib/Analog Out1" Name "V_m2" Show on Position [935, 690] Direction up Flipped off Frame [-25, -20; 25, 20] LabelPosition [0, 23] LabelAlign up Parameter { Variable "channel" Value "[12]" Show on } Parameter { Variable "scale" Value "1" Show off } Parameter { Variable "offset" Value "0" Show off } Parameter { Variable "minOutput" Value "" Show off } Parameter { Variable "maxOutput" Value "" Show off } Parameter { Variable "TargetPortIndices" Value "20" Show off } Terminal { Type Input Position [-25, 0] Direction left } } Component { Type Reference SrcComponent "PLECSRTBoxLib/Analog Out1" Name "V_m3" Show on Position [995, 830] Direction up Flipped off Frame [-25, -20; 25, 20] LabelPosition [0, 23] LabelAlign up Parameter { Variable "channel" Value "[13]" Show on } Parameter { Variable "scale" Value "1" Show off } Parameter { Variable "offset" Value "0" Show off } Parameter { Variable "minOutput" Value "" Show off } Parameter { Variable "maxOutput" Value "" Show off } Parameter { Variable "TargetPortIndices" Value "21" Show off } Terminal { Type Input Position [-25, 0] Direction left } } Component { Type Reference SrcComponent "PLECSRTBoxLib/Analog Out1" Name "U_uvw" Show on Position [1175, 865] Direction up Flipped off Frame [-25, -20; 25, 20] LabelPosition [0, 23] LabelAlign up Parameter { Variable "channel" Value "[14 15 16]" Show on } Parameter { Variable "scale" Value "1" Show off } Parameter { Variable "offset" Value "0" Show off } Parameter { Variable "minOutput" Value "" Show off } Parameter { Variable "maxOutput" Value "" Show off } Parameter { Variable "TargetPortIndices" Value "22" Show off } Terminal { Type Input Position [-25, 0] Direction left } } Component { Type Reference SrcComponent "PLECSRTBoxLib/Digital Out1" Name "Hall_Signals" Show on Position [645, 925] Direction up Flipped off Frame [-25, -20; 25, 20] LabelPosition [0, 23] LabelAlign up Parameter { Variable "channel" Value "[0 1 2]" Show on } Parameter { Variable "TargetPortIndices" Value "23" Show off } Terminal { Type Input Position [-25, 0] Direction left } } Component { Type Reference SrcComponent "PLECSRTBoxLib/Analog Out1" Name "Iabc*" Show on Position [660, 185] Direction up Flipped off Frame [-25, -20; 25, 20] LabelPosition [0, 23] LabelAlign up Parameter { Variable "channel" Value "[0 2 4]" Show on } Parameter { Variable "scale" Value "0.4" Show off } Parameter { Variable "offset" Value "1.5" Show off } Parameter { Variable "minOutput" Value "0.5" Show off } Parameter { Variable "maxOutput" Value "2.5" Show off } Parameter { Variable "TargetPortIndices" Value "24" Show off } Terminal { Type Input Position [-25, 0] Direction left } } Connection { Type Wire SrcComponent "HB1" SrcTerminal 4 Points [585, 265] DstComponent "3ph Meter1" DstTerminal 1 } Connection { Type Wire SrcComponent "3ph Meter1" SrcTerminal 3 Points [585, 275] DstComponent "HB3" DstTerminal 4 } Connection { Type Wire SrcComponent "3ph Meter1" SrcTerminal 2 DstComponent "HB2" DstTerminal 4 } Connection { Type Wire SrcComponent "HB3" SrcTerminal 3 Points [555, 360] Branch { Points [485, 360] Branch { Points [415, 360] Branch { DstComponent "HB1" DstTerminal 3 } Branch { Points [230, 360] Branch { Points [165, 360] DstComponent "V_dc" DstTerminal 2 } Branch { DstComponent "Vm4" DstTerminal 2 } } } Branch { DstComponent "HB2" DstTerminal 3 } } Branch { Points [635, 360] Branch { DstComponent "Vm1" DstTerminal 2 } Branch { Points [670, 360] Branch { DstComponent "Vm2" DstTerminal 2 } Branch { Points [705, 360] DstComponent "Vm3" DstTerminal 2 } } } } Connection { Type Wire SrcComponent "3ph Meter1" SrcTerminal 4 Points [635, 260] Branch { DstComponent "BLDC Machine\n(Simple)" DstTerminal 3 } Branch { DstComponent "Vm1" DstTerminal 1 } } Connection { Type Wire SrcComponent "3ph Meter1" SrcTerminal 5 Points [670, 270] Branch { DstComponent "BLDC Machine\n(Simple)" DstTerminal 1 } Branch { DstComponent "Vm2" DstTerminal 1 } } Connection { Type Wire SrcComponent "3ph Meter1" SrcTerminal 6 Points [705, 280] Branch { DstComponent "BLDC Machine\n(Simple)" DstTerminal 2 } Branch { DstComponent "Vm3" DstTerminal 1 } } Connection { Type Signal SrcComponent "3ph Meter1" SrcTerminal 7 Points [595, 115] DstComponent "Goto8" DstTerminal 1 } Connection { Type Rotational SrcComponent "BLDC Machine\n(Simple)" SrcTerminal 4 DstComponent "Inertia" DstTerminal 1 } Connection { Type Signal SrcComponent "Math3" SrcTerminal 1 DstComponent "Friction1" DstTerminal 1 } Connection { Type Signal SrcComponent "Friction1" SrcTerminal 2 Points [1090, 270] DstComponent "Friction" DstTerminal 2 } Connection { Type Rotational SrcComponent "Speed\nSensor2" SrcTerminal 1 Points [930, 300] Branch { Points [890, 300] Branch { DstComponent "Inertia" DstTerminal 2 } Branch { DstComponent "Angle\nSensor1" DstTerminal 1 } } Branch { DstComponent "Friction" DstTerminal 1 } } Connection { Type Signal SrcComponent "Speed\nSensor2" SrcTerminal 2 Points [955, 270] Branch { DstComponent "Math3" DstTerminal 2 } Branch { DstComponent "Goto" DstTerminal 1 } } Connection { Type Signal SrcComponent "Vm4" SrcTerminal 3 DstComponent "Goto5" DstTerminal 1 } Connection { Type Signal SrcComponent "Angle\nSensor1" SrcTerminal 2 Points [925, 140; 925, 135] Branch { Points [925, 85] DstComponent "Goto1" DstTerminal 1 } Branch { DstComponent "Hall sensors" DstTerminal 1 } } Connection { Type Signal SrcComponent "Hall sensors" SrcTerminal 2 Points [1100, 135] Branch { Points [1100, 90] DstComponent "Goto3" DstTerminal 1 } Branch { DstComponent "Hall Signals" DstTerminal 1 } } Connection { Type Signal SrcComponent "Idc" SrcTerminal 3 DstComponent "Goto4" DstTerminal 1 } Connection { Type Wire SrcComponent "Idc" SrcTerminal 2 Points [415, 120] Branch { Points [485, 120] Branch { DstComponent "Iv" DstTerminal 1 } Branch { Points [555, 120] DstComponent "Iw" DstTerminal 1 } } Branch { DstComponent "Iu" DstTerminal 1 } } Connection { Type Wire SrcComponent "Idc" SrcTerminal 1 Points [230, 120] Branch { DstComponent "Vm4" DstTerminal 1 } Branch { Points [165, 120] DstComponent "V_dc" DstTerminal 1 } } Connection { Type Wire SrcComponent "HB1" SrcTerminal 2 DstComponent "Iu" DstTerminal 2 } Connection { Type Wire SrcComponent "HB2" SrcTerminal 2 DstComponent "Iv" DstTerminal 2 } Connection { Type Wire SrcComponent "Iw" SrcTerminal 2 DstComponent "HB3" DstTerminal 2 } Connection { Type Signal SrcComponent "En_Input\nPoPr" SrcTerminal 1 DstComponent "En_Output\nPoPr" DstTerminal 1 } Connection { Type Signal SrcComponent "Logical\nOperator5" SrcTerminal 1 DstComponent "LED 30: Powerstage enabled" DstTerminal 1 } Connection { Type Signal SrcComponent "Power" SrcTerminal 1 DstComponent "Logical\nOperator5" DstTerminal 2 } Connection { Type Signal SrcComponent "From2" SrcTerminal 1 DstComponent "n" DstTerminal 1 } Connection { Type Signal SrcComponent "n" SrcTerminal 2 Points [840, 485] Branch { Points [860, 485; 860, 525] DstComponent "Scope2" DstTerminal 1 } Branch { Points [840, 460] Branch { DstComponent "Display" DstTerminal 1 } Branch { Points [840, 385] DstComponent "speed" DstTerminal 1 } } } Connection { Type Signal SrcComponent "Demux3" SrcTerminal 2 DstComponent "Scope1" DstTerminal 1 } Connection { Type Signal SrcComponent "Demux3" SrcTerminal 3 DstComponent "Scope1" DstTerminal 2 } Connection { Type Signal SrcComponent "Demux3" SrcTerminal 4 DstComponent "Scope1" DstTerminal 3 } Connection { Type Signal SrcComponent "Demux5" SrcTerminal 2 DstComponent "Scope1" DstTerminal 4 } Connection { Type Signal SrcComponent "Demux5" SrcTerminal 3 DstComponent "Scope1" DstTerminal 5 } Connection { Type Signal SrcComponent "Demux5" SrcTerminal 4 DstComponent "Scope1" DstTerminal 6 } Connection { Type Signal SrcComponent "Demux4" SrcTerminal 4 Points [1180, 815; 1180, 785] DstComponent "Scope7" DstTerminal 7 } Connection { Type Signal SrcComponent "Demux4" SrcTerminal 3 Points [1175, 805; 1175, 775] DstComponent "Scope7" DstTerminal 6 } Connection { Type Signal SrcComponent "Demux4" SrcTerminal 2 Points [1170, 795; 1170, 765] DstComponent "Scope7" DstTerminal 5 } Connection { Type Signal SrcComponent "From1" SrcTerminal 1 Points [805, 830; 805, 855] DstComponent "Scope" DstTerminal 1 } Connection { Type Signal SrcComponent "Probe3" SrcTerminal 1 Points [820, 900; 820, 875] DstComponent "Scope" DstTerminal 3 } Connection { Type Signal SrcComponent "Sw PWM1" SrcTerminal 1 DstComponent "Switch" DstTerminal 3 } Connection { Type Signal SrcComponent "Switch" SrcTerminal 1 DstComponent "Demux" DstTerminal 1 } Connection { Type Signal SrcComponent "Sw PWM2" SrcTerminal 1 DstComponent "Switch1" DstTerminal 3 } Connection { Type Signal SrcComponent "Switch1" SrcTerminal 1 DstComponent "Demux6" DstTerminal 1 } Connection { Type Signal SrcComponent "Sw PWM3" SrcTerminal 1 DstComponent "Switch2" DstTerminal 3 } Connection { Type Signal SrcComponent "Switch2" SrcTerminal 1 DstComponent "Demux7" DstTerminal 1 } Connection { Type Signal SrcComponent "Demux" SrcTerminal 2 Points [355, 405; 355, 385] Branch { Points [355, 235] DstComponent "HB1" DstTerminal 1 } Branch { DstComponent "Gate Signals" DstTerminal 1 } } Connection { Type Signal SrcComponent "Demux" SrcTerminal 3 Points [375, 415; 375, 395] Branch { Points [375, 295] DstComponent "HB1" DstTerminal 5 } Branch { DstComponent "Gate Signals" DstTerminal 2 } } Connection { Type Signal SrcComponent "Demux6" SrcTerminal 2 Points [440, 510; 440, 405] Branch { Points [440, 240] DstComponent "HB2" DstTerminal 1 } Branch { DstComponent "Gate Signals" DstTerminal 3 } } Connection { Type Signal SrcComponent "Demux6" SrcTerminal 3 Points [450, 520; 450, 415] Branch { DstComponent "HB2" DstTerminal 5 } Branch { DstComponent "Gate Signals" DstTerminal 4 } } Connection { Type Signal SrcComponent "Demux7" SrcTerminal 2 Points [510, 615; 510, 425] Branch { Points [510, 245] DstComponent "HB3" DstTerminal 1 } Branch { DstComponent "Gate Signals" DstTerminal 5 } } Connection { Type Signal SrcComponent "Demux7" SrcTerminal 3 Points [520, 625; 520, 435] Branch { DstComponent "HB3" DstTerminal 5 } Branch { DstComponent "Gate Signals" DstTerminal 6 } } Connection { Type Signal SrcComponent "INH1" SrcTerminal 1 DstComponent "Logical\nOperator" DstTerminal 2 } Connection { Type Signal SrcComponent "Logical\nOperator" SrcTerminal 1 Points [305, 480] DstComponent "Switch" DstTerminal 4 } Connection { Type Signal SrcComponent "INH2" SrcTerminal 1 DstComponent "Logical\nOperator1" DstTerminal 2 } Connection { Type Signal SrcComponent "Logical\nOperator1" SrcTerminal 1 Points [365, 585] DstComponent "Switch1" DstTerminal 4 } Connection { Type Signal SrcComponent "INH3" SrcTerminal 1 DstComponent "Logical\nOperator2" DstTerminal 2 } Connection { Type Signal SrcComponent "Logical\nOperator2" SrcTerminal 1 Points [430, 695] DstComponent "Switch2" DstTerminal 4 } Connection { Type Signal SrcComponent "From8" SrcTerminal 1 Points [1290, 450] Branch { DstComponent "Demux3" DstTerminal 1 } Branch { Points [1290, 370] DstComponent "I_uvw" DstTerminal 1 } } Connection { Type Signal SrcComponent "Back EMF" SrcTerminal 1 Points [1225, 480] Branch { DstComponent "Demux5" DstTerminal 1 } Branch { Points [1225, 540] DstComponent "Back EMF1" DstTerminal 1 } } Connection { Type Signal SrcComponent "From9" SrcTerminal 1 Points [1365, 530] Branch { Points [1365, 500] DstComponent "Scope1" DstTerminal 7 } Branch { DstComponent "IDC" DstTerminal 1 } } Connection { Type Signal SrcComponent "From" SrcTerminal 1 Points [735, 535] Branch { DstComponent "Scope2" DstTerminal 2 } Branch { Points [735, 605] DstComponent "rotor position" DstTerminal 1 } } Connection { Type Signal SrcComponent "Probe" SrcTerminal 1 Points [860, 570] Branch { Points [865, 570; 865, 545] DstComponent "Scope2" DstTerminal 3 } Branch { DstComponent "Torque" DstTerminal 1 } } Connection { Type Signal SrcComponent "From3" SrcTerminal 1 Points [1170, 695] Branch { Points [1170, 725] DstComponent "Scope7" DstTerminal 1 } Branch { Points [1170, 640] DstComponent "u_DC" DstTerminal 1 } } Connection { Type Signal SrcComponent "Probe6" SrcTerminal 1 Points [1030, 735] Branch { DstComponent "Scope7" DstTerminal 2 } Branch { Points [1030, 635] DstComponent "V_m1" DstTerminal 1 } } Connection { Type Signal SrcComponent "Probe7" SrcTerminal 1 Points [890, 750] Branch { Points [1170, 750; 1170, 745] DstComponent "Scope7" DstTerminal 3 } Branch { Points [890, 690] DstComponent "V_m2" DstTerminal 1 } } Connection { Type Signal SrcComponent "Probe8" SrcTerminal 1 Points [950, 790] Branch { Points [1135, 790; 1135, 760; 1190, 760] DstComponent "Scope7" DstTerminal 4 } Branch { Points [950, 830] DstComponent "V_m3" DstTerminal 1 } } Connection { Type Signal SrcComponent "From10" SrcTerminal 1 Points [1135, 805] Branch { DstComponent "Demux4" DstTerminal 1 } Branch { DstComponent "U_uvw" DstTerminal 1 } } Connection { Type Signal SrcComponent "From5" SrcTerminal 1 Points [600, 865] Branch { DstComponent "Scope" DstTerminal 2 } Branch { Points [600, 925] DstComponent "Hall_Signals" DstTerminal 1 } } Connection { Type Signal SrcComponent "3ph Meter1" SrcTerminal 8 Points [605, 185] Branch { DstComponent "Goto2" DstTerminal 1 } Branch { DstComponent "Iabc*" DstTerminal 1 } } Annotation { Name "Tu+" Position [395, 210] } Annotation { Name "Tu-" Position [400, 335] } Annotation { Name "Tv+" Position [470, 215] } Annotation { Name "Tv-" Position [470, 335] } Annotation { Name "Tw-" Position [540, 335] } Annotation { Name "Tw+" Position [535, 215] } Annotation { Name "Sliding switch channel: 28" Position [210, 970] } Annotation { Name "Umrechnung in n" Position [770, 510] } Annotation { Name "Back EMF" Position [720, 900] } Annotation { Name "IN1" Position [340, 390] } Annotation { Name "IN2" Position [425, 500] } Annotation { Name "IN3" Position [490, 605] } } } Component { Type Subsystem Name "Controller" Show on Position [545, 365] Direction up Flipped off Frame [-90, -105; 90, 105] LabelPosition [0, 108] LabelAlign up TreatAsAtomicUnit on SampleTime "-1" TaskingMode "1" CodeGenEnable on CodeGenSampleTime "0.00005" CodeGenDiscretizationMethod "2" CodeGenTarget "Generic" CodeGenTargetSettings "AAAAfwAAAAAlUU1hcDxRU3RyaW5nLFFNYXA8UVN0cmluZyxRU" "3RyaW5nPiA+AAAAAAEAAAAOAEcAZQBuAGUAcgBpAGMAAAABAAAAPABHAEUATgBFAFIAQQBUAEUAXw" "BPAFUAVABQAFUAVABfAEEATgBEAF8AVQBQAEQAQQBUAEUAXwBGAEMATgAAAAIAMA==" CodeGenFloatingPointFormat "1" ExternalModeSettings "AAAAfwAAAAAWUU1hcDxRU3RyaW5nLFFTdHJpbmc+AAAAAAYAAA" "AYAFQAcgBpAGcAZwBlAHIAVgBhAGwAdQBlAAAAAgAwAAAAGABUAHIAaQBnAGcAZQByAEQAZQBsAGE" "AeQAAAAIAMAAAABYAUwBlAG4AcwBpAHQAaQB2AGkAdAB5AAAAAgAwAAAAFgBSAGUAZgByAGUAcwBo" "AFIAYQB0AGUAAAAEADIAMAAAABQATgB1AG0AUwBhAG0AcABsAGUAcwAAAAgAOAAxADkAMgAAABQAR" "ABlAGMAaQBtAGEAdABpAG8AbgAAAAIAMQ==" MaskDisplayLang "2" MaskIconFrame on MaskIconOpaque off MaskIconRotates on Terminal { Type Input Position [-90, -85] Direction left Index "1" } Terminal { Type Output Position [94, -30] Direction right Index "1" } Terminal { Type Input Position [90, 65] Direction right Index "2" } Terminal { Type Output Position [94, -45] Direction right Index "2" } Terminal { Type Output Position [94, -55] Direction right Index "3" } Terminal { Type Output Position [94, -65] Direction right Index "4" } Terminal { Type Output Position [94, -95] Direction right Index "5" } Terminal { Type Output Position [94, -75] Direction right Index "6" } Terminal { Type Output Position [94, -85] Direction right Index "7" } Terminal { Type Input Position [-90, -95] Direction left Index "3" } Terminal { Type Output Position [-94, 30] Direction left Index "8" } Terminal { Type Output Position [-94, 50] Direction left Index "9" } Terminal { Type Input Position [-90, 70] Direction left Index "4" } Terminal { Type Output Position [94, 10] Direction right Index "10" } Terminal { Type Output Position [-94, 90] Direction left Index "11" } Schematic { Location [1920, 23; 3840, 1031] ZoomFactor 1 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Component { Type Subsystem Name "Hall Evaluation1" Show on Position [350, 290] Direction up Flipped off Frame [-35, -15; 35, 15] LabelPosition [0, 18] LabelAlign up SampleTime "-1" CodeGenDiscretizationMethod "2" CodeGenTarget "Generic" MaskIconFrame on MaskIconOpaque off MaskIconRotates on Terminal { Type Output Position [39, -5] Direction right } Terminal { Type Input Position [-35, 0] Direction left } Schematic { Location [2146, 633; 2435, 726] ZoomFactor 1 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Component { Type CScript Name "DetermineHallGPIO\n& CommPtr" Show on Position [90, 35] Direction up Flipped off Parameter { Variable "DialogGeometry" Value "[1920 22 1920 1057]" Show off } Parameter { Variable "NumInputs" Value "3" Show off } Parameter { Variable "NumOutputs" Value "1" 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 "5e-5" Show off } Parameter { Variable "Parameters" Value "" Show off } Parameter { Variable "LangStandard" Value "2" Show off } Parameter { Variable "GnuExtensions" Value "2" Show off } Parameter { Variable "RuntimeCheck" Value "2" Show off } Parameter { Variable "Declarations" Value "#include \"math.h\"\n" "\n" "static int HallGpioBitA,HallGpioBitB,HallGpioBitC;\n" "//Virtual structs as in C-Code\n" "typedef struct\n" "{\n" "\tint HallGpio;\t\n" "} HALL3;\n" "\n" "\n" "static HALL3 hall;\n" "\n" "\n" Show off } Parameter { Variable "StartFcn" Value "" Show off } Parameter { Variable "OutputFcn" Value "//determine hall state\n" "HallGpioBitC = (int)Input(2) <<2; // blue\n" "HallGpioBitB = (int)Input(1) <<1; // green\n" "HallGpioBitA = (int)Input(0); // white\n" "hall.HallGpio = HallGpioBitA + HallGpioBitB + HallGpioBitC;\n" "\n" "//check validity of HallGpio\n" "if((hall.HallGpio > 0) && (hall.HallGpio < 7))\n" "{\n" "\t//determine position\t\n" "\tOutput(0) = hall.HallGpio;\n" "}\n" "else\n" "{\n" "\t// really error \n" " SetErrorMessage(\"HallGpio out of range\");\n" "}\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 Output Name "HallGPIO" Show on Position [160, 35] Direction right Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Input Name "hall" Show on Position [20, 35] Direction right Flipped off Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "-1" Show off } } Connection { Type Signal SrcComponent "DetermineHallGPIO\n& CommPtr" SrcTerminal 2 DstComponent "HallGPIO" DstTerminal 1 } Connection { Type Signal SrcComponent "hall" SrcTerminal 1 DstComponent "DetermineHallGPIO\n& CommPtr" DstTerminal 1 } } } Component { Type SignalMux Name "Mux1" Show off Position [565, 280] Direction right Flipped off Parameter { Variable "Width" Value "3" Show off } } Component { Type Reference SrcComponent "TIC2000_Lib/Digital In" Name "Hall Signals1" Show on Position [190, 290] Direction up Flipped off Frame [-25, -20; 25, 20] LabelPosition [0, 23] LabelAlign up Parameter { Variable "gpio" Value "[52,53,56]" Show on } Parameter { Variable "TargetPortIndices" Value "1" Show off } Terminal { Type Output Position [29, 0] Direction right } } Component { Type Scope Name "Scope2" Show off Position [325, 350] Direction up Flipped off Location [0, 27; 1920, 1064] State "AAAA/wAAAAD9AAAAAgAAAAEAAAAAAAAAAPwCAAAAA/sAAAAQAFoAb" "wBvAG0AQQByAGUAYQAAAAAA/////wAAADQA////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwAAAA" "AA/////wAAAGYA////+wAAAAwAVAByAGEAYwBlAHMAAAAAAP////8AAABmAP///wAAAAMAAAAAAAA" "AAPwBAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQAAAAAAP////8AAABQAP///wAAB4AAAAPy" "AAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP////8AA" "AAAAAAAAA==" SavedViews "AAAAAgAAAAA=" HeaderState "AAAA/wAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAL/gMAAAAJA" "AAACAAAAGQAAAAJAAAAZAAAAAIAAABkAAAAAwAAAGQAAAABAAAAZAAAAAYAAABkAAAABwAAAGQAAA" "AEAAAAZAAAAAUAAABkAAAAZAAAAAsBAAABAAAAAAAAAAAAAAAAZP////8AAACBAAAAAAAAAAsAAAB" "AAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAA" "AAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAA" "AAAAAAkAAAAAQAAAAAAAAPoAAAAACQ=" PlotPalettes "AAAAAQAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" Axes "1" TimeRange "0" ScrollingMode "1" SingleTimeAxis "1" Open "0" Ts "-1" SampleLimit "0" XAxisLabel "" ShowLegend "1" Axis { Name "Hallsignale" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 1 KeepBaseline off BaselineValue 0 } Fourier { SingleXAxis on AxisLabel "Frequency" 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 "Constant3" Show off Position [425, 240] Direction right Flipped off Frame [-15, -10; 15, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "Value" Value "0.5" Show off } Parameter { Variable "DataType" Value "10" Show off } } Component { Type CScript Name "Gate Signals" Show on Position [635, 280] Direction up Flipped off Parameter { Variable "DialogGeometry" Value "[1920 22 1920 1057]" Show off } Parameter { Variable "NumInputs" Value "3" Show off } Parameter { Variable "NumOutputs" Value "4" 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 "5e-5" Show off } Parameter { Variable "Parameters" Value "" Show off } Parameter { Variable "LangStandard" Value "2" Show off } Parameter { Variable "GnuExtensions" Value "2" Show off } Parameter { Variable "RuntimeCheck" Value "2" Show off } Parameter { Variable "Declarations" Value "#include \"math.h\"\n" "\n" "#define PWM \t\t\t\t\tOutput(0)\n" "#define INH1 \t\t\t\t\tOutput(1)\n" "#define INH2 \t\t\t\t\tOutput(2)\n" "#define INH3 \t\t\t\t\tOutput(3)\n" "\n" "\n" "static float Controller_Mod_Index;\n" "static int HallGPIO,PoPr;" Show off } Parameter { Variable "StartFcn" Value "" Show off } Parameter { Variable "OutputFcn" Value "Controller_Mod_Index = Input(0);\n" "HallGPIO = (int)Input(1);\n" "PoPr = (int)Input(2);\n" "\n" "if(PoPr == 0)\n" "{\n" "INH1 = 0;\n" "INH2 = 0;\n" "INH3 = 0;\n" "}\n" "else\n" "{\n" "\tswitch(HallGPIO){\n" "\tcase 1:\n" "\t\tPWM = Controller_Mod_Index;\n" "\t\tINH1 = 0;\n" "\t\tINH2 = 1;\n" "\t\tINH3 = 1;\t\t\n" "\t\tbreak;\n" "\t\t\t\n" "\tcase 2:\n" "\t\tPWM = Controller_Mod_Index;\n" "\t\tINH1 = 1;\n" "\t\tINH2 = 0;\n" "\t\tINH3 = 1;\t\t\n" "\t\tbreak;\n" "\t\t\n" "\tcase 3:\n" "\t\tPWM = Controller_Mod_Index;\n" "\t\tINH1 = 1;\n" "\t\tINH2 = 1;\n" "\t\tINH3 = 0;\t\t\n" "\t\tbreak;\n" "\n" "\tcase 4:\n" "\t\tPWM = 1-Controller_Mod_Index;\n" "\t\tINH1 = 1;\n" "\t\tINH2 = 1;\n" "\t\tINH3 = 0;\t\t\n" "\t\tbreak;\n" "\n" "\tcase 5:\n" "\t\tPWM = 1-Controller_Mod_Index;\n" "\t\tINH1 = 1;\n" "\t\tINH2 = 0;\n" "\t\tINH3 = 1;\t\t\n" "\t\tbreak;\n" "\t\n" "\tcase 6:\n" "\t\tPWM = 1-Controller_Mod_Index;\n" "\t\tINH1 = 0;\n" "\t\tINH2 = 1;\n" "\t\tINH3 = 1;\t\t\n" "\t\tbreak;\t\t\n" "\t}\n" "}\t\n" "\n" "\n" "\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 Subsystem Name "V*->d" Show off Position [480, 240] Direction up Flipped off Frame [-20, -10; 20, 10] LabelPosition [0, -13] LabelAlign down 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 [0, 46; 1920, 1054] ZoomFactor 1 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Component { Type Offset Name "Offset" Show off Position [115, 60] Direction right Flipped off Frame [-20, -10; 20, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "Offset" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Gain Name "Gain2" Show off Position [170, 60] Direction right Flipped off Parameter { Variable "K" Value "0.5" Show off } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Output Name "o" Show on Position [220, 60] Direction right Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Input Name "i" Show on Position [60, 60] Direction right Flipped off Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "-1" Show off } } Connection { Type Signal SrcComponent "Offset" SrcTerminal 2 DstComponent "Gain2" DstTerminal 1 } Connection { Type Signal SrcComponent "Gain2" SrcTerminal 2 DstComponent "o" DstTerminal 1 } Connection { Type Signal SrcComponent "i" SrcTerminal 1 DstComponent "Offset" DstTerminal 1 } } } Component { Type Display Name "Display1" Show off Position [635, 240] Direction up Flipped off Frame [-31, -11; 31, 11] LabelPosition [0, 14] LabelAlign up Parameter { Variable "Notation" Value "1" Show off } Parameter { Variable "Precision" Value "4" Show off } } Component { Type Reference SrcComponent "TIC2000_Lib/Powerstage" Name "Power" Show on Position [465, 440] Direction up Flipped off Frame [-45, -25; 45, 25] LabelPosition [0, 28] LabelAlign up Parameter { Variable "en" Value "1" Show off } Parameter { Variable "pol" Value "1" Show off } Parameter { Variable "gpio" Value "18" Show on } Parameter { Variable "pwmsafe" Value "1" Show off } Parameter { Variable "tz1_gpio" Value "" Show off } Parameter { Variable "tz2_gpio" Value "" Show off } Parameter { Variable "tz3_gpio" Value "" Show off } Parameter { Variable "sim_interlock" Value "1" Show off } Parameter { Variable "TargetPortIndices" Value "2" Show off } Terminal { Type Input Position [-45, 0] Direction left } Terminal { Type Output Position [49, 0] Direction right } } Component { Type Reference SrcComponent "TIC2000_Lib/Digital In" Name "En" Show on Position [365, 440] Direction up Flipped off Frame [-25, -20; 25, 20] LabelPosition [0, 23] LabelAlign up Parameter { Variable "gpio" Value "25" Show on } Parameter { Variable "TargetPortIndices" Value "3" Show off } Terminal { Type Output Position [29, 0] Direction right } } Component { Type InitialCondition Name "IC" Show on Position [255, 290] Direction right Flipped off Frame [-15, -15; 15, 15] LabelPosition [0, 18] LabelAlign up Parameter { Variable "InitialValue" Value "[1 0 0]" Show off } } Component { Type Reference SrcComponent "TIC2000_Lib/Digital Out" Name "INH1" Show on Position [935, 275] Direction up Flipped off Frame [-25, -20; 25, 20] LabelPosition [0, 23] LabelAlign up Parameter { Variable "gpio" Value "6" Show on } Parameter { Variable "TargetPortIndices" Value "6" Show off } Terminal { Type Input Position [-25, 0] Direction left } } Component { Type Reference SrcComponent "TIC2000_Lib/Digital Out" Name "INH2" Show on Position [970, 420] Direction up Flipped off Frame [-25, -20; 25, 20] LabelPosition [0, 23] LabelAlign up Parameter { Variable "gpio" Value "7" Show on } Parameter { Variable "TargetPortIndices" Value "5" Show off } Terminal { Type Input Position [-25, 0] Direction left } } Component { Type Reference SrcComponent "TIC2000_Lib/Digital Out" Name "INH3" Show on Position [990, 735] Direction up Flipped off Frame [-25, -20; 25, 20] LabelPosition [0, 23] LabelAlign up Parameter { Variable "gpio" Value "8" Show on } Parameter { Variable "TargetPortIndices" Value "4" Show off } Terminal { Type Input Position [-25, 0] Direction left } } Component { Type Reference SrcComponent "TIC2000_Lib/PWM" Name "PWM1" Show on Position [1030, 310] Direction up Flipped off Frame [-25, -25; 25, 25] LabelPosition [0, 28] LabelAlign up Parameter { Variable "pwm" Value "[1 ]" Show on } Parameter { Variable "type" Value "2" Show off } Parameter { Variable "fc" Value "20000" Show off } Parameter { Variable "fc_tol" Value "1" Show off } Parameter { Variable "outmode" Value "1" Show off } Parameter { Variable "delay" Value "0.1e-6" Show off } Parameter { Variable "polarity" Value "1" Show off } Parameter { Variable "sequence" Value "1" Show off } Parameter { Variable "show_enable" Value "1" Show off } Parameter { Variable "socsel" Value "1" Show off } Parameter { Variable "socsel_prd" Value "" Show off } Parameter { Variable "intsel" Value "1" Show off } Parameter { Variable "intsel_prd" Value "" Show off } Parameter { Variable "tz1mode" Value "1" Show off } Parameter { Variable "tz2mode" Value "1" Show off } Parameter { Variable "tz3mode" Value "1" Show off } Parameter { Variable "TargetPortIndices" Value "7" Show off } Terminal { Type Input Position [-25, 0] Direction left } Terminal { Type EventOutput Position [29, 15] Direction right } Terminal { Type EventOutput Position [29, -15] Direction right } Terminal { Type Input Position [-25, 10] Direction left } Terminal { Type Input Position [-25, -10] Direction left } } Component { Type Reference SrcComponent "TIC2000_Lib/PWM" Name "PWM3" Show on Position [1080, 745] Direction up Flipped off Frame [-25, -25; 25, 25] LabelPosition [0, 28] LabelAlign up Parameter { Variable "pwm" Value "[3]" Show on } Parameter { Variable "type" Value "2" Show off } Parameter { Variable "fc" Value "20000" Show off } Parameter { Variable "fc_tol" Value "1" Show off } Parameter { Variable "outmode" Value "1" Show off } Parameter { Variable "delay" Value "0.1e-6" Show off } Parameter { Variable "polarity" Value "1" Show off } Parameter { Variable "sequence" Value "3" Show off } Parameter { Variable "show_enable" Value "1" Show off } Parameter { Variable "socsel" Value "1" Show off } Parameter { Variable "socsel_prd" Value "" Show off } Parameter { Variable "intsel" Value "1" Show off } Parameter { Variable "intsel_prd" Value "" Show off } Parameter { Variable "tz1mode" Value "1" Show off } Parameter { Variable "tz2mode" Value "1" Show off } Parameter { Variable "tz3mode" Value "1" Show off } Parameter { Variable "TargetPortIndices" Value "8" Show off } Terminal { Type Input Position [-25, 0] Direction left } Terminal { Type EventOutput Position [29, 15] Direction right } Terminal { Type EventOutput Position [29, -15] Direction right } Terminal { Type Input Position [-25, 10] Direction left } Terminal { Type Input Position [-25, -10] Direction left } } Component { Type Constant Name "Constant1" Show off Position [855, 485] Direction right Flipped off Frame [-20, -10; 20, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "Value" Value "1" Show off } Parameter { Variable "DataType" Value "10" Show off } } Component { Type Sum Name "Subtract" Show off Position [920, 490] Direction up Flipped off Parameter { Variable "IconShape" Value "1" Show off } Parameter { Variable "Inputs" Value "+-" Show off } Parameter { Variable "DataType" Value "10" Show off } } Component { Type Reference SrcComponent "TIC2000_Lib/PWM" Name "PWM2" Show on Position [1030, 475] Direction up Flipped off Frame [-25, -25; 25, 25] LabelPosition [0, 28] LabelAlign up Parameter { Variable "pwm" Value "[2]" Show on } Parameter { Variable "type" Value "2" Show off } Parameter { Variable "fc" Value "20000" Show off } Parameter { Variable "fc_tol" Value "1" Show off } Parameter { Variable "outmode" Value "1" Show off } Parameter { Variable "delay" Value "0.1e-6" Show off } Parameter { Variable "polarity" Value "1" Show off } Parameter { Variable "sequence" Value "2" Show off } Parameter { Variable "show_enable" Value "1" Show off } Parameter { Variable "socsel" Value "1" Show off } Parameter { Variable "socsel_prd" Value "" Show off } Parameter { Variable "intsel" Value "1" Show off } Parameter { Variable "intsel_prd" Value "" Show off } Parameter { Variable "tz1mode" Value "1" Show off } Parameter { Variable "tz2mode" Value "1" Show off } Parameter { Variable "tz3mode" Value "1" Show off } Parameter { Variable "TargetPortIndices" Value "9" Show off } Terminal { Type Input Position [-25, 0] Direction left } Terminal { Type EventOutput Position [29, 15] Direction right } Terminal { Type EventOutput Position [29, -15] Direction right } Terminal { Type Input Position [-25, 10] Direction left } Terminal { Type Input Position [-25, -10] Direction left } } Component { Type Constant Name "Constant2" Show off Position [840, 830] Direction right Flipped off Frame [-10, -10; 10, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "Value" Value "-1" Show off } Parameter { Variable "DataType" Value "10" Show off } } Component { Type Constant Name "Constant5" Show off Position [840, 800] Direction right Flipped off Frame [-10, -10; 10, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "Value" Value "1" Show off } Parameter { Variable "DataType" Value "10" Show off } } Component { Type SignalSwitch Name "Switch" Show on Position [895, 810] Direction right Flipped off Parameter { Variable "Criteria" Value "3" Show off } Parameter { Variable "Threshold" Value "0" Show off } } Component { Type SignalSwitch Name "Switch1" Show on Position [895, 635] Direction left Flipped on Parameter { Variable "Criteria" Value "3" Show off } Parameter { Variable "Threshold" Value "0" Show off } } Component { Type SignalDemux Name "Demux1" Show off Position [695, 280] Direction right Flipped on Parameter { Variable "Width" Value "4" Show off } } Component { Type Goto Name "Goto" Show off Position [745, 295] Direction right Flipped off Parameter { Variable "Tag" Value "EN3" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type From Name "From" Show off Position [940, 735] Direction right Flipped off Parameter { Variable "Tag" Value "EN3" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type Scope Name "Scope" Show on Position [595, 425] Direction up Flipped off Location [2560, 300; 2910, 527] State "AAAA/wAAAAD9AAAAAgAAAAEAAAAAAAAAAPwCAAAAA/sAAAAQAFoAb" "wBvAG0AQQByAGUAYQAAAAAA/////wAAADQA////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwAAAA" "AA/////wAAAGYA////+wAAAAwAVAByAGEAYwBlAHMAAAAAAP////8AAABmAP///wAAAAMAAAAAAAA" "AAPwBAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQAAAAAAP////8AAABQAP///wAAAV4AAADI" "AAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP////8AA" "AAAAAAAAA==" SavedViews "AAAAAgAAAAA=" HeaderState "AAAA/wAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAL/gMAAAAJA" "AAABQAAAGQAAAAEAAAAZAAAAAcAAABkAAAABgAAAGQAAAABAAAAZAAAAAMAAABkAAAAAgAAAGQAAA" "AJAAAAZAAAAAgAAABkAAAAhAAAAAsBAAABAAAAAAAAAAAAAAAAZP////8AAACBAAAAAAAAAAsAAAB" "gAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAA" "AAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAA" "AAAAAAkAAAAAQAAAAAAAAPoAAAAACQ=" PlotPalettes "AAAAAQAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" Axes "1" TimeRange "0.0" ScrollingMode "1" SingleTimeAxis "1" Open "0" Ts "-1" SampleLimit "0" XAxisLabel "" ShowLegend "1" Axis { Name "" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Fourier { SingleXAxis on AxisLabel "Frequency" 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 "TIC2000_Lib/Control Task\\nTrigger" Name "Control Task\nTrigger" Show off Position [345, 175] Direction right Flipped off } Component { Type Reference SrcComponent "TIC2000_Lib/ADC" Name "ADC" Show on Position [280, 160] Direction up Flipped off Frame [-25, -25; 25, 25] LabelPosition [0, 28] LabelAlign up Parameter { Variable "trig" Value "2" Show off } Parameter { Variable "adc" Value "1" Show off } Parameter { Variable "input" Value "[7, 2, 0]" Show on } Parameter { Variable "scale" Value "[1/0.4, 1/0.4, 1/0.4]" Show off } Parameter { Variable "offset" Value "[-1.5/0.4, -1.5/0.4, -1.5/0.4]" Show off } Parameter { Variable "tacqsel" Value "1" Show off } Parameter { Variable "tacq" Value "0" Show off } Parameter { Variable "bits" Value "" Show off } Parameter { Variable "vref" Value "" Show off } Parameter { Variable "TargetPortIndices" Value "10" Show off } Terminal { Type Output Position [29, 0] Direction right } Terminal { Type EventOutput Position [29, 15] Direction right } Terminal { Type EventInput Position [0, -25] Direction up } } Component { Type Subsystem Name "Meas. Processing" Show on Position [490, 165] Direction up Flipped off Frame [-50, -15; 50, 15] LabelPosition [0, 18] LabelAlign up SampleTime "-1" CodeGenDiscretizationMethod "2" CodeGenTarget "Generic" MaskIconFrame on MaskIconOpaque off MaskIconRotates on Terminal { Type Input Position [-50, -5] Direction left } Terminal { Type Output Position [54, -5] Direction right } Terminal { Type Input Position [-50, 10] Direction left } Schematic { Location [0, 27; 1920, 1035] ZoomFactor 1 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Component { Type Input Name "Iabc_uA" Show on Position [280, 250] Direction right Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Output Name "Idc_m" Show on Position [590, 255] Direction right Flipped off Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type CScript Name "C-Script" Show off Position [470, 255] Direction up Flipped off Parameter { Variable "DialogGeometry" Value "[0 23 1920 1057]" Show off } Parameter { Variable "NumInputs" Value "4" Show off } Parameter { Variable "NumOutputs" Value "1" 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 "5e-5" Show off } Parameter { Variable "Parameters" Value "" Show off } Parameter { Variable "LangStandard" Value "2" Show off } Parameter { Variable "GnuExtensions" Value "2" Show off } Parameter { Variable "RuntimeCheck" Value "2" Show off } Parameter { Variable "Declarations" Value "#define Iu_uA \t\t\tInput(0)\n" "#define Iv_uA\t\t\tInput(1)\n" "#define Iw_uA \t\t\tInput(2)\n" "\n" "#define HallGPIO \t\tInput(3)\n" "#define Idc \t\t\tOutput(0)" Show off } Parameter { Variable "StartFcn" Value "" Show off } Parameter { Variable "OutputFcn" Value "switch((int)HallGPIO)\n" "{\n" "\tcase 1:\n" "\t\tIdc = Iw_uA;\n" "\t\tbreak;\t\t\t\n" "\tcase 2:\n" "\t\tIdc = Iu_uA;\n" "\t\tbreak;\t\n" "\tcase 3:\t\t\n" "\t\tIdc = Iu_uA;\n" "\t\tbreak;\t\t\n" "\tcase 4:\t\t\n" "\t\tIdc = Iv_uA;\n" "\t\tbreak;\t\n" "\tcase 5:\t\t\n" "\t\tIdc = Iw_uA;\n" "\t\tbreak;\t\n" "\tcase 6:\t\t\n" "\t\tIdc = Iv_uA;\n" "\t\tbreak;\t\n" "\tdefault:\n" "\t\tIdc = 0;\n" "\t\tbreak;\t\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 SignalMux Name "Mux" Show off Position [370, 255] Direction right Flipped off Parameter { Variable "Width" Value "[3 1]" Show off } } Component { Type Input Name "HallGPIO" Show on Position [280, 355] Direction right Flipped off Parameter { Variable "Index" Value "3" Show on } Parameter { Variable "Width" Value "-1" Show off } } Connection { Type Signal SrcComponent "Mux" SrcTerminal 1 DstComponent "C-Script" DstTerminal 1 } Connection { Type Signal SrcComponent "Iabc_uA" SrcTerminal 1 DstComponent "Mux" DstTerminal 2 } Connection { Type Signal SrcComponent "C-Script" SrcTerminal 2 DstComponent "Idc_m" DstTerminal 1 } Connection { Type Signal SrcComponent "HallGPIO" SrcTerminal 1 Points [330, 355; 330, 260] DstComponent "Mux" DstTerminal 3 } } } Component { Type SignalDemux Name "Demux3" Show off Position [450, 80] Direction right Flipped on Parameter { Variable "Width" Value "3" Show off } } Component { Type Scope Name "Scope1" Show off Position [660, 85] Direction up Flipped off Location [0, 27; 1920, 1064] State "AAAA/wAAAAD9AAAAAgAAAAEAAAC0AAADk/wCAAAAA/sAAAAQAFoAb" "wBvAG0AQQByAGUAYQAAAAAA/////wAAAKwA////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwAAAA" "AA/////wAAAGYA////+wAAAAwAVAByAGEAYwBlAHMBAAAALwAAA5MAAABmAP///wAAAAMAAAeAAAA" "AW/wBAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQBAAAAAAAAB4AAAABQAP///wAABsgAAAOT" "AAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP////8AA" "AAAAAAAAA==" SavedViews "AAAAAgAAAAA=" HeaderState "AAAA/wAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAL/gMAAAAJA" "AAAAgAAAGQAAAAFAAAAZAAAAAQAAABkAAAABwAAAGQAAAAGAAAAZAAAAAkAAABkAAAACAAAAGQAAA" "ABAAAAZAAAAAMAAABkAAAHbwAAAAsBAAABAAAAAAAAAAAAAAAAZP////8AAACBAAAAAAAAAAsAAAB" "8AAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAA" "AAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAA" "AAAAAbzAAAAAQAAAAAAAAPoAAAAACQ=" PlotPalettes "AAAAAQAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" "QAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAA" "AAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" Axes "4" TimeRange "0" ScrollingMode "1" SingleTimeAxis "1" Open "0" Ts "-1" SampleLimit "0" XAxisLabel "" ShowLegend "1" Axis { Name "Iu_uA nach ADC" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "Iv_uA nach ADC" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "Iw_uA nach ADC" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "IDC_m" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Fourier { SingleXAxis on AxisLabel "Frequency" 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 } } } Component { Type Reference SrcComponent "TIC2000_Lib/Digital Out" Name "IabcUa" Show on Position [330, 75] Direction down Flipped on Frame [-25, -20; 25, 20] LabelPosition [0, 23] LabelAlign up Parameter { Variable "gpio" Value "[10 11 12]" Show on } Parameter { Variable "TargetPortIndices" Value "11" Show off } Terminal { Type Input Position [-25, 0] Direction left } } Component { Type Reference SrcComponent "TIC2000_Lib/Digital Out" Name "IDC_M" Show on Position [640, 155] Direction up Flipped off Frame [-25, -20; 25, 20] LabelPosition [0, 23] LabelAlign up Parameter { Variable "gpio" Value "3" Show on } Parameter { Variable "TargetPortIndices" Value "12" Show off } Terminal { Type Input Position [-25, 0] Direction left } } Component { Type Constant Name "Constant" Show off Position [1130, 345] Direction right Flipped off Frame [-25, -10; 25, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "Value" Value "0" Show off } Parameter { Variable "DataType" Value "10" Show off } } Component { Type Constant Name "Constant6" Show off Position [1130, 365] Direction right Flipped off Frame [-25, -10; 25, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "Value" Value "0" Show off } Parameter { Variable "DataType" Value "10" Show off } } Component { Type Reference SrcComponent "TIC2000_Lib/External Sync" Name "External Sync" Show on Position [1135, 270] Direction up Flipped off Frame [-25, -20; 25, 20] LabelPosition [0, 23] LabelAlign up Parameter { Variable "sync_gpio" Value "105" Show on } Parameter { Variable "TargetPortIndices" Value "13" Show off } Terminal { Type EventOutput Position [29, 0] Direction right } } Component { Type TargetCode Name "PWM (Variable)1" Show on Position [1225, 355] Direction up Flipped off Frame [-35, -25; 35, 25] LabelPosition [0, 28] LabelAlign up TargetPortIndices "14" SampleTime "0" EnforceBaseTask "1" CodeFcnLang "2" CodeFcn "local block = Target.Coder.CreateTargetBlock(\"TI C20" "00\", \"epwm_var\")\n" "\n" "return block:getDirectFeedthroughCode()" NonDftCodeFcn "local block = Target.Coder.GetTargetBlock(Block.UserD" "ata.bid)\n" "\n" "return block:getNonDirectFeedthroughCode()" MaskType "PWM (Variable)" MaskDescription "Generate a complementary PWM signal pair with a var" "iable phase shift and synchronization options.\n" "\n" "The carrier starts at 0 and varies between 0 and 1. The PWM output is active " "when the input is greater than the carrier." MaskHelp "qthelp://com.plexim.c2000.1.0/doc/pwm_var_c2000.html" MaskDisplay "Icon:text('PWM')\n" "\n" "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" "if Dialog:get('sync_src')>='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" "\t drawTrigger(0, 30)\n" " else\n" "\t drawTrigger(18, 0)\n" "\t drawTrigger(0, 30)\n" " end\n" " end\n" " if direction == 0.25 then\n" " if flipped then\n" "\t drawTrigger(0, -18)\n" "\t drawTrigger(-30, 0)\n" " else\n" "\t drawTrigger(0, 18)\n" "\t drawTrigger(-30, 0)\n" " end \n" " end\n" " if direction == 0.5 then\n" " if flipped then\n" "\t drawTrigger(18, 0)\n" "\t drawTrigger(0, -30)\n" " else\n" "\t drawTrigger(-18, 0)\n" "\t drawTrigger(0, -30)\n" " end \n" " end\n" " if direction == 0.75 then\n" " if flipped then\n" "\t drawTrigger(0, 18) \n" "\t drawTrigger(30, 0)\n" " else\n" "\t drawTrigger(0, -18)\n" "\t drawTrigger(30, 0)\n" " end \n" " end \n" "end\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(0, 30)\n" " else\n" "\t drawTrigger(0, 30)\n" " end\n" "end\n" "if direction == 0.25 then\n" " if flipped then\n" "\t drawTrigger(-30, 0)\n" " else\n" " drawTrigger(-30, 0)\n" " end \n" "end\n" "if direction == 0.5 then\n" " if flipped then\n" " drawTrigger(0, -30)\n" " else\n" "\t drawTrigger(0, -30)\n" " end \n" "end\n" "if direction == 0.75 then\n" " if flipped then \n" "\t drawTrigger(30, 0)\n" " else\n" "\t drawTrigger(30, 0)\n" " end \n" "end \n" "\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 = [[]] .. string.sub(text,1,1) .. [[]]\n" " local s2 = [[]] .. string.sub(text,2,2) .. [[]]\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 = 'lowLeft'\n" " else\n" " xT1 = xLeft+4.5\n" " yT1 = -yUp-8\n" " xT2 = xLeft+4.5\n" " yT2 = -yUp-13\n" " position = 'lowRight'\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 = 'upRight'\n" " else\n" " xT1 = -xLeft-4.5\n" " yT1 = yUp+8\n" " xT2 = -xLeft-4.5\n" " yT2 = yUp+13\n" " position = 'upLeft'\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 "sys_clk = 1/100e6;\n" "prd = round(1/ (fc * sys_clk));\n" "limit_delta = 1;\n" "offset = 0;\n" "gain_offline = 1/type/limit_delta;\n" "num_channel = num_pwm;\n" "num_channel_1 = num_channel-1;\n" "\n" "if num_pwm~=1 && num_pwm~=2 && num_pwm~=3,\n" " error('\"Number of synchronized PWMs\" must be an integer value of 1, 2, o" "r 3.')\n" "end\n" "\n" "if numel(pwm_1) ~= 1, \n" " error('\"Group of 1 PWM Generator\" must be scalar.');\n" "end\n" "if numel(pwm_2) ~= 1,\n" " error('\"Group of 2 PWM Generator(s)\" must be scalar.');\n" "end\n" "if numel(pwm_3) ~= 1,\n" " error('\"Group of 3 PWM Generator(s)\" must be scalar.');\n" "end\n" "\n" "\n" "if numel(fc) ~= 1,\n" " error('\"Carrier frequency\" must be scalar.');\n" "end\n" "\n" "if any(fc <= 0)\n" "\terror('\"Carrier frequency [Hz]\" must be greater than 0.')\n" "end\n" "\n" "if any(fc > 25e6)\n" "\terror('\"Carrier frequency [Hz]\" greater than 25 MHz exceeds toggling freq" "uency of GPIO pins, please reduce the carrier frequency.')\n" "end\n" "\n" "if any(fc < 0.01)\n" " plecs('warning', '\"Carrier frequency [Hz]\" lower than 0.01 Hz, please us" "e \"Digital Out\" to generate low frequency PWM.')\n" "end\n" "\n" "if numel(fc_tol) ~= 1,\n" " error('\"Frequency tolerance\" must be scalar.');\n" "end\n" "\n" "if numel(delay) ~= 1,\n" " error('\"Blanking time\" must be scalar.');\n" "end\n" "\n" "if any(delay < 0)\n" "\terror('\"Blanking time [s]\" must be greater than zero seconds.')\n" "end\n" "\n" "if any(delay >= (1/fc/2))\n" "\terror(['\"Blanking time [s]\" should not be larger than half the carrier pe" "riod ' num2str(1/fc/2) 's.'])\n" "end\n" "\n" "if numel(type) ~= 1,\n" " error('\"Carrier type\" must be scalar.');\n" "end\n" "\n" "if numel(polarity) ~= 1,\n" " error('\"Polarity\" must be scalar.');\n" "end\n" "\n" "if numel(sync_src) ~= 1,\n" " error('\"Synchronization impulse from\" must be scalar.');\n" "end\n" "\n" "if (sync_src==3) && (numel(sync_gpio) ~= 1 || ~isvector(sync_gpio) ...\n" " || any(floor(sync_gpio) ~= sync_gpio) || any(sync_gpio < 0)),\n" " error('\"External GPIO\" must be a scalar positive integer.');\n" "end\n" "\n" "if numel(socsel) ~= 1,\n" " error('\"ADC trigger\" must be scalar.');\n" "end\n" "\n" "if numel(intsel) ~= 1,\n" " error('\"Task trigger\" must be scalar.');\n" "end\n" "\n" "if numel(tz1mode) ~= 1 || numel(tz2mode) ~= 1 || numel(tz3mode) ~= 1 ,\n" " error('\"TZ mode\" must be scalar.');\n" "end\n" "\n" "if ~isnan(socsel_prd) && ((floor(socsel_prd) ~= socsel_prd) || (socsel_prd < " "1))\n" " error('\"ADC trigger divider\" must be an integer and greater than zero.');" "\n" "end\n" "\n" "if ~isnan(intsel_prd) && ((floor(intsel_prd) ~= intsel_prd) || (intsel_prd < " "1))\n" " error('\"Task trigger divider\" must be an integer and greater than zero.')" ";\n" "end\n" "\n" "\n" MaskDialogCallback "Block:showTerminal('Task', Dialog:get('intsel')~" "='1')\n" "Block:showTerminal('ADC', Dialog:get('socsel')~='1')\n" "Dialog:set('socsel_prd', 'Visible', Dialog:get('socsel')~='1')\n" "Dialog:set('intsel_prd', 'Visible', Dialog:get('intsel')~='1')\n" "if Dialog:get('sync_src')=='2' then\n" "\tBlock:showTerminal('synci', true)\n" "else\n" "\tBlock:showTerminal('synci', false)\n" "end\n" "\n" "Dialog:set('pwm_1', 'Visible', Dialog:get('num_pwm')=='1')\n" "Dialog:set('pwm_2', 'Visible', Dialog:get('num_pwm')=='2')\n" "Dialog:set('pwm_3', 'Visible', Dialog:get('num_pwm')=='3')\n" "\n" "if Dialog:get('fvar')=='2' then\n" "\tBlock:showTerminal('f\\'', true)\n" "else\n" "\tBlock:showTerminal('f\\'', false)\n" "end\n" "\n" Parameter { Variable "num_pwm" Prompt "Number of synchronized PWMs" Type FixedText PossibleValues {"1", "2", "3"} Value "1" Show off Tunable off TabName "Main" } Parameter { Variable "pwm_3" Prompt "Group of 3 PWM generator(s) " Type FixedText PossibleValues {"1,2,3", "4,5,6", "7,8,9", "10,11,12"} Value "1" Show off Tunable off TabName "Main" } Parameter { Variable "pwm_2" Prompt "Group of 2 PWM generator(s)" Type FixedText PossibleValues {"1,2", "4,5", "7,8", "10,11"} Value "1" Show off Tunable off TabName "Main" } Parameter { Variable "pwm_1" Prompt "Group of 1 PWM generator" Type FixedText PossibleValues {"1", "4", "7", "10"} Value "3" Show off Tunable off TabName "Main" } Parameter { Variable "type" Prompt "Carrier type" Type FixedText PossibleValues {"Sawtooth", "Symmetrical"} Value "1" Show off Tunable off TabName "Main" } Parameter { Variable "fc" Prompt "Carrier frequency [Hz]" Type FreeText Value "20e3" Show off Tunable off TabName "Main" } Parameter { Variable "fc_tol" Prompt "Frequency tolerance" Type FixedText PossibleValues {"Enforce exact value", "Round to closest achievabl" "e value"} Value "1" Show off Tunable off TabName "Main" } Parameter { Variable "delay" Prompt "Blanking time [s]" Type FreeText Value "0.1e-6" Show off Tunable off TabName "Main" } Parameter { Variable "polarity" Prompt "Polarity" Type FixedText PossibleValues {"Active state is logic '1'", "Active state is logi" "c '0'"} Value "1" Show off Tunable off TabName "Main" } Parameter { Variable "fvar" Prompt "Frequency variation" Type FixedText PossibleValues {"Disabled", "Enabled"} Value "1" Show off Tunable off TabName "Main" } Parameter { Variable "sync_src" Prompt "Synchronization impulse from" Type FixedText PossibleValues {"Self", "External"} Value "2" Show off Tunable off TabName "Sync" } Parameter { Variable "socsel" Prompt "ADC trigger" Type FixedText PossibleValues {"Disabled", "Underflow", "Overflow", "Underflow an" "d Overflow"} Value "2" Show off Tunable off TabName "Events" } Parameter { Variable "socsel_prd" Prompt "ADC trigger divider" Type FreeText Value "" Show off Tunable off TabName "Events" } Parameter { Variable "intsel" Prompt "Task trigger" Type FixedText PossibleValues {"Disabled", "Underflow", "Overflow", "Underflow an" "d Overflow"} Value "1" Show off Tunable off TabName "Events" } Parameter { Variable "intsel_prd" Prompt "Task trigger divider" Type FreeText Value "" Show off Tunable off TabName "Events" } Parameter { Variable "tz1mode" Prompt "TZ1 mode" Type FixedText PossibleValues {"Disabled", "Cycle-by-cycle", "One-shot"} Value "1" Show off Tunable off TabName "Protection" } Parameter { Variable "tz2mode" Prompt "TZ2 mode" Type FixedText PossibleValues {"Disabled", "Cycle-by-cycle", "One-shot"} Value "1" Show off Tunable off TabName "Protection" } Parameter { Variable "tz3mode" Prompt "TZ3 mode" Type FixedText PossibleValues {"Disabled", "Cycle-by-cycle", "One-shot"} Value "1" Show off Tunable off TabName "Protection" } Terminal { Type Input Position [-35, -10] Direction left } Terminal { Type EventOutput Position [39, 15] Direction right } Terminal { Type EventOutput Position [39, -15] Direction right } Terminal { Type Input Position [-35, 10] Direction left } Terminal { Type EventOutput Position [39, 0] Direction right } Terminal { Type EventInput Position [0, -25] Direction up } Terminal { Type Input Position [-35, 0] Direction left } Schematic { Location [2143, 155; 2713, 390] ZoomFactor 1.00225 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Component { Type TargetOutput Name "1" Show on Position [445, 70] Direction right Flipped off Parameter { Variable "Width" Value "2*num_pwm" Show off } } Component { Type Input Name "m" Show on Position [60, 40] Direction right Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "InitialOutput" Value "[]" Show off } Parameter { Variable "HasDirectFeedthrough" Value "2" Show off } Parameter { Variable "Width" Value "num_pwm" Show off } } Component { Type EventOutput Name "Task" Show on Position [445, 95] Direction right Flipped off Parameter { Variable "Index" Value "2" Show on } } Component { Type EventOutput Name "ADC" Show on Position [445, 125] Direction right Flipped off Parameter { Variable "Index" Value "3" Show on } } Component { Type Input Name "ph'" Show on Position [60, 120] Direction right Flipped off Parameter { Variable "Index" Value "4" Show on } Parameter { Variable "InitialOutput" Value "[]" Show off } Parameter { Variable "HasDirectFeedthrough" Value "2" Show off } Parameter { Variable "Width" Value "num_pwm" Show off } } Component { Type EventOutput Name "synco" Show off Position [445, 155] Direction right Flipped off Parameter { Variable "Index" Value "5" Show on } } Component { Type EventInput Name "synci" Show off Position [60, 160] Direction right Flipped off Parameter { Variable "Index" Value "6" Show on } } Component { Type LogicalOperator Name "Logical\nOperator" Show off Position [220, 125] Direction up Flipped off Parameter { Variable "Operator" Value "2" Show off } Parameter { Variable "Inputs" Value "2" Show off } } Component { Type SignalSelector Name "Cont\nSelector" Show off Position [320, 95] Direction right Flipped off Parameter { Variable "InputWidth" Value "4" Show off } Parameter { Variable "OutputIndices" Value "[intsel]" Show off } } Component { Type SignalMux Name "Mux" Show off Position [270, 95] Direction right Flipped off Parameter { Variable "Width" Value "4" Show off } } Component { Type SignalSelector Name "Cont\nSelector1" Show off Position [320, 125] Direction right Flipped off Parameter { Variable "InputWidth" Value "4" Show off } Parameter { Variable "OutputIndices" Value "[socsel]" Show off } } Component { Type Subsystem Name "synco\nselect" Show on Position [220, 155] Direction up Flipped off Frame [-15, -15; 15, 15] LabelPosition [0, 18] LabelAlign up SampleTime "-1" CodeGenDiscretizationMethod "2" CodeGenTarget "Generic" MaskDisplayLang "2" MaskIconFrame on MaskIconOpaque off MaskIconRotates on Terminal { Type Input Position [-15, -5] Direction left } Terminal { Type Output Position [19, 0] Direction right } Terminal { Type Input Position [-15, 5] Direction left } Schematic { Location [415, 55; 672, 241] ZoomFactor 1 SliderPosition [0, 79] ShowBrowser off BrowserWidth 100 Component { Type Input Name "self" Show on Position [60, 55] Direction right Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Output Name "o" Show on Position [180, 60] Direction right Flipped off Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Input Name "other" Show on Position [60, 95] Direction right Flipped off Parameter { Variable "Index" Value "3" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type SignalSwitch Name "Switch" Show off Position [130, 60] Direction left Flipped on Parameter { Variable "Criteria" Value "1" Show off } Parameter { Variable "Threshold" Value "0" Show off } } Component { Type Constant Name "Constant" Show off Position [110, 95] Direction right Flipped off Frame [-10, -10; 10, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "Value" Value "sync_src-2" Show off } Parameter { Variable "DataType" Value "10" Show off } } Connection { Type Signal SrcComponent "Constant" SrcTerminal 1 Points [130, 95] DstComponent "Switch" DstTerminal 4 } Connection { Type Signal SrcComponent "Switch" SrcTerminal 1 DstComponent "o" DstTerminal 1 } Connection { Type Signal SrcComponent "other" SrcTerminal 1 Points [90, 95; 90, 65] DstComponent "Switch" DstTerminal 2 } Connection { Type Signal SrcComponent "self" SrcTerminal 1 DstComponent "Switch" DstTerminal 3 } } } Component { Type Input Name "f'" Show on Position [60, 80] Direction right Flipped off Parameter { Variable "Index" Value "7" Show on } Parameter { Variable "InitialOutput" Value "[]" Show off } Parameter { Variable "HasDirectFeedthrough" Value "2" Show off } Parameter { Variable "Width" Value "1" Show off } } Component { Type Subsystem Name "Pulse Divider1" Show off Position [385, 95] Direction up Flipped off Frame [-25, -15; 25, 15] LabelPosition [0, 18] LabelAlign up SampleTime "-1" CodeGenDiscretizationMethod "2" CodeGenTarget "Generic" MaskDisplayLang "2" MaskIconFrame on MaskIconOpaque off MaskIconRotates on MaskInit "if isnan(N) || N < 2\n" "\timp = 1\n" "else\n" "\timp = 2\n" "end" Parameter { Variable "N" Prompt "Period" Type FreeText Value "intsel_prd" Show off Tunable off TabName "" } Terminal { Type Input Position [-25, 0] Direction left } Terminal { Type Output Position [29, 0] Direction right } Schematic { Location [415, 55; 1080, 354] ZoomFactor 1 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Component { Type Input Name "In1" Show off Position [65, 80] Direction right Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Output Name "Out1" Show off Position [220, 80] Direction right Flipped off Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type ConfigurableSubsystem Name "Implementation" Show on Position [145, 80] Direction up Flipped off Frame [-25, -15; 25, 15] LabelPosition [0, 18] LabelAlign up 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 [1726, 819; 2167, 1017] ZoomFactor 1 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Configurations { Name "No Divider" Schematic { Component { Type Input Name "In1" Show off Position [120, 40] Direction right Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Output Name "Out1" Show off Position [195, 40] Direction right Flipped off 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 "Divider" Schematic { Component { Type Input Name "In1" Show off Position [145, 35] Direction right Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Output Name "Out1" Show off Position [255, 75] Direction right Flipped off Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Subsystem Name "Triggered\nSubsystem" Show off Position [195, 75] Direction up Flipped off Frame [-25, -15; 25, 15] LabelPosition [0, 18] LabelAlign up TreatAsAtomicUnit on SampleTime "-1" CodeGenDiscretizationMethod "2" CodeGenTarget "Generic" MaskDisplayLang "2" MaskIconFrame on MaskIconOpaque off MaskIconRotates on Terminal { Type Output Position [29, 0] Direction right Index "1" } Terminal { Type Input Position [0, -15] Direction up Index "1" } Schematic { Location [2032, 1123; 2519, 1321] ZoomFactor 1 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Component { Type Output Name "Out1" Show off Position [335, 80] Direction right Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "InitialOutput" Value "[]" Show off } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Trigger Name "Trigger" Show on Position [140, 20] Direction right Flipped off Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "-1" Show off } Parameter { Variable "TriggerType" Value "1" Show off } Parameter { Variable "ShowOutput" Value "1" Show off } } Component { Type Offset Name "Offset" Show off Position [140, 80] Direction right Flipped off Frame [-20, -10; 20, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "Offset" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type SignalSwitch Name "Switch" Show on Position [195, 130] Direction right Flipped on Parameter { Variable "Criteria" Value "1" Show off } Parameter { Variable "Threshold" Value "N" Show on } } Component { Type ConstantRelationalOperator Name "Compare to\nConstant" Show off Position [275, 80] Direction right Flipped off Frame [-20, -10; 20, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "Operator" Value "1" Show off } Parameter { Variable "Threshold" Value "N" Show off } } Component { Type Memory Name "Memory" Show off Position [140, 130] Direction right Flipped on Parameter { Variable "X0" Value "0" Show off } } Connection { Type Signal SrcComponent "Offset" SrcTerminal 2 Points [195, 80] Branch { Points [230, 80] Branch { DstComponent "Compare to\nConstant" DstTerminal 1 } Branch { Points [230, 135] DstComponent "Switch" DstTerminal 3 } } Branch { DstComponent "Switch" DstTerminal 4 } } Connection { Type Signal SrcComponent "Compare to\nConstant" SrcTerminal 2 DstComponent "Out1" DstTerminal 1 } Connection { Type Signal SrcComponent "Switch" SrcTerminal 1 DstComponent "Memory" DstTerminal 1 } Connection { Type Signal SrcComponent "Memory" SrcTerminal 2 Points [95, 130; 95, 80] DstComponent "Offset" DstTerminal 1 } } } Connection { Type Signal SrcComponent "In1" SrcTerminal 1 Points [195, 35] DstComponent "Triggered\nSubsystem" DstTerminal 2 } Connection { Type Signal SrcComponent "Triggered\nSubsystem" SrcTerminal 1 DstComponent "Out1" DstTerminal 1 } } } Parameter { Variable "Configuration" Value "imp" Show off } } Connection { Type Signal SrcComponent "In1" SrcTerminal 1 DstComponent "Implementation" DstTerminal 1 } Connection { Type Signal SrcComponent "Implementation" SrcTerminal 2 DstComponent "Out1" DstTerminal 1 } } } Component { Type Subsystem Name "Pulse Divider" Show on Position [385, 125] Direction up Flipped off Frame [-25, -15; 25, 15] LabelPosition [0, 18] LabelAlign up SampleTime "-1" CodeGenDiscretizationMethod "2" CodeGenTarget "Generic" MaskDisplayLang "2" MaskIconFrame on MaskIconOpaque off MaskIconRotates on MaskInit "if isnan(N) || N < 2\n" "\timp = 1\n" "else\n" "\timp = 2\n" "end" Parameter { Variable "N" Prompt "Period" Type FreeText Value "socsel_prd" Show off Tunable off TabName "" } Terminal { Type Input Position [-25, 0] Direction left } Terminal { Type Output Position [29, 0] Direction right } Schematic { Location [415, 55; 1080, 354] ZoomFactor 1 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Component { Type Input Name "In1" Show off Position [65, 80] Direction right Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Output Name "Out1" Show off Position [220, 80] Direction right Flipped off Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type ConfigurableSubsystem Name "Implementation" Show on Position [145, 80] Direction up Flipped off Frame [-25, -15; 25, 15] LabelPosition [0, 18] LabelAlign up 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 [2017, 828; 2458, 1026] ZoomFactor 1 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Configurations { Name "No Divider" Schematic { Component { Type Input Name "In1" Show off Position [120, 40] Direction right Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Output Name "Out1" Show off Position [195, 40] Direction right Flipped off 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 "Divider" Schematic { Component { Type Input Name "In1" Show off Position [145, 35] Direction right Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Output Name "Out1" Show off Position [255, 75] Direction right Flipped off Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Subsystem Name "Triggered\nSubsystem" Show off Position [195, 75] Direction up Flipped off Frame [-25, -15; 25, 15] LabelPosition [0, 18] LabelAlign up TreatAsAtomicUnit on SampleTime "-1" CodeGenDiscretizationMethod "2" CodeGenTarget "Generic" MaskDisplayLang "2" MaskIconFrame on MaskIconOpaque off MaskIconRotates on Terminal { Type Output Position [29, 0] Direction right Index "1" } Terminal { Type Input Position [0, -15] Direction up Index "1" } Schematic { Location [2032, 1123; 2519, 1321] ZoomFactor 1 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Component { Type Output Name "Out1" Show off Position [335, 80] Direction right Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "InitialOutput" Value "[]" Show off } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Trigger Name "Trigger" Show on Position [140, 20] Direction right Flipped off Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "-1" Show off } Parameter { Variable "TriggerType" Value "1" Show off } Parameter { Variable "ShowOutput" Value "1" Show off } } Component { Type Offset Name "Offset" Show off Position [140, 80] Direction right Flipped off Frame [-20, -10; 20, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "Offset" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type SignalSwitch Name "Switch" Show on Position [195, 130] Direction right Flipped on Parameter { Variable "Criteria" Value "1" Show off } Parameter { Variable "Threshold" Value "N" Show on } } Component { Type ConstantRelationalOperator Name "Compare to\nConstant" Show off Position [275, 80] Direction right Flipped off Frame [-20, -10; 20, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "Operator" Value "1" Show off } Parameter { Variable "Threshold" Value "N" Show off } } Component { Type Memory Name "Memory" Show off Position [140, 130] Direction right Flipped on Parameter { Variable "X0" Value "0" Show off } } Connection { Type Signal SrcComponent "Offset" SrcTerminal 2 Points [195, 80] Branch { Points [230, 80] Branch { DstComponent "Compare to\nConstant" DstTerminal 1 } Branch { Points [230, 135] DstComponent "Switch" DstTerminal 3 } } Branch { DstComponent "Switch" DstTerminal 4 } } Connection { Type Signal SrcComponent "Compare to\nConstant" SrcTerminal 2 DstComponent "Out1" DstTerminal 1 } Connection { Type Signal SrcComponent "Switch" SrcTerminal 1 DstComponent "Memory" DstTerminal 1 } Connection { Type Signal SrcComponent "Memory" SrcTerminal 2 Points [95, 130; 95, 80] DstComponent "Offset" DstTerminal 1 } } } Connection { Type Signal SrcComponent "In1" SrcTerminal 1 Points [195, 35] DstComponent "Triggered\nSubsystem" DstTerminal 2 } Connection { Type Signal SrcComponent "Triggered\nSubsystem" SrcTerminal 1 DstComponent "Out1" DstTerminal 1 } } } Parameter { Variable "Configuration" Value "imp" Show off } } Connection { Type Signal SrcComponent "In1" SrcTerminal 1 DstComponent "Implementation" DstTerminal 1 } Connection { Type Signal SrcComponent "Implementation" SrcTerminal 2 DstComponent "Out1" DstTerminal 1 } } } Component { Type Subsystem Name "PWM" Show on Position [150, 85] Direction up Flipped off Frame [-20, -25; 20, 25] LabelPosition [0, 28] LabelAlign up SampleTime "-1" CodeGenDiscretizationMethod "2" CodeGenTarget "Generic" MaskIconFrame on MaskIconOpaque off MaskIconRotates on Terminal { Type Output Position [24, -15] 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, -5] Direction right } Terminal { Type Output Position [24, 5] Direction right } Schematic { Location [2104, 589; 2851, 970] ZoomFactor 0.995515 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Component { Type Product Name "Divide" Show off Position [185, 155] Direction up Flipped on Parameter { Variable "Inputs" Value "*/" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Constant Name "Constant3" Show off Position [130, 190] Direction right Flipped off Frame [-10, -10; 10, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "Value" Value "prd" Show off } Parameter { Variable "DataType" Value "10" Show off } } Component { Type Product Name "Product2" Show off Position [245, 115] Direction up Flipped on Parameter { Variable "Inputs" Value "2" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type ConfigurableSubsystem Name "Configurable\nSubsystem" Show off Position [300, 115] Direction up Flipped on Frame [-20, -10; 20, 10] LabelPosition [0, -13] LabelAlign down 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 [787, 674; 1192, 910] 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 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 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 Parameter { Variable "Index" Value "3" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type CScript Name "Vectroised\nTrigger" Show on Position [165, 75] Direction up Flipped off Parameter { Variable "DialogGeometry" Value "[707 618 588 359]" Show off } Parameter { Variable "NumInputs" Value "num_channel*2" Show off } Parameter { Variable "NumOutputs" Value "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" Show off } Parameter { Variable "Parameters" Value "num_channel" 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 "Declarations" Value "#include \n" "#include \n" "#include \n" "#include \n" "#include \n" "\n" "static int num_channel;\n" "static int* sync_pre;" Show off } Parameter { Variable "StartFcn" Value "num_channel = ParamRealData(0,0);\n" "sync_pre = (int*) malloc(num_channel*sizeof(int));" 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 && sync_pre[id] == 0)\n" "\t\t{\n" "\t\t\tOutput(id) = Input(num_channel+id);\n" "\t\t}\n" "\t\tsync_pre[id] = Input(id);\n" "\t}\n" "}" Show off } Parameter { Variable "UpdateFcn" Value "" Show off } Parameter { Variable "DerivativeFcn" Value "" Show off } Parameter { Variable "TerminateFcn" Value "free(sync_pre);" 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 Parameter { Variable "Width" Value "[num_channel num_channel]" Show off } } Connection { Type Signal SrcComponent "mi" SrcTerminal 1 DstComponent "Mux" DstTerminal 3 } Connection { Type Signal SrcComponent "Mux" SrcTerminal 1 DstComponent "Vectroised\nTrigger" DstTerminal 1 } Connection { Type Signal SrcComponent "Vectroised\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 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 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 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 "1" Show off } } Component { Type ConstantRelationalOperator Name "Compare to\nConstant" Show off Position [150, 235] Direction right Flipped off Frame [-20, -10; 20, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "Operator" Value "1" Show off } Parameter { Variable "Threshold" Value "0" Show off } } Component { Type Sum Name "Sum1" Show off Position [185, 210] Direction up Flipped off Parameter { Variable "IconShape" Value "2" Show off } Parameter { Variable "Inputs" Value "|++" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Output Name "s" Show on Position [645, 205] Direction right Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Input Name "ph'" Show on Position [40, 210] Direction right Flipped off 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 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 Parameter { Variable "Index" Value "4" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Comparator Name "Comparator" Show off Position [360, 205] Direction right Flipped off } Component { Type Output Name "z" Show on Position [645, 250] Direction right Flipped off Parameter { Variable "Index" Value "6" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Output Name "p" Show on Position [645, 290] Direction right Flipped off Parameter { Variable "Index" Value "7" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Sum Name "Sum" Show off Position [150, 110] Direction up Flipped on Parameter { Variable "IconShape" Value "2" Show off } Parameter { Variable "Inputs" Value "|++" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Constant Name "Constant" Show off Position [130, 80] Direction left Flipped on Frame [-10, -10; 10, 10] LabelPosition [0, -13] LabelAlign down Parameter { Variable "Value" Value "offset" Show off } Parameter { Variable "DataType" Value "10" Show off } } Component { Type Gain Name "Gain1" Show off Position [195, 110] Direction right Flipped off Parameter { Variable "K" Value "gain_offline" Show off } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Input Name "sync_i" Show on Position [40, 280] Direction right Flipped off Parameter { Variable "Index" Value "5" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Subsystem Name "init" Show on Position [100, 150] Direction up Flipped off Frame [-20, -10; 20, 10] LabelPosition [0, 0] 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 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 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 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 "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 "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 Frame [-15, -15; 15, 15] LabelPosition [0, 18] LabelAlign up 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 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 Subsystem Name "synco\nselect" Show on Position [220, 210] Direction up Flipped off Frame [-10, -10; 10, 10] LabelPosition [0, 13] LabelAlign up SampleTime "-1" CodeGenDiscretizationMethod "2" CodeGenTarget "Generic" MaskDisplayLang "2" MaskIconFrame on MaskIconOpaque off MaskIconRotates on Terminal { Type Input Position [-10, 0] Direction left } Terminal { Type Output Position [14, 0] Direction right } Schematic { Location [0, 1046; 283, 1214] ZoomFactor 1 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Component { Type Input Name "i" Show on Position [60, 80] Direction right Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Output Name "o" Show on Position [180, 80] Direction right Flipped off Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type CScript Name "C-Script" Show on Position [120, 80] Direction up Flipped off Parameter { Variable "DialogGeometry" Value "[1644 701 622 399]" Show off } Parameter { Variable "NumInputs" Value "num_channel" Show off } Parameter { Variable "NumOutputs" Value "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" Show off } Parameter { Variable "Parameters" Value "sync_src" 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 "Declarations" Value "" Show off } Parameter { Variable "StartFcn" Value "" Show off } Parameter { Variable "OutputFcn" Value "for(int id_channel=0; id_channel\n" "\n" "#define clk_cntr ParamRealData(0,0)\n" "\n" "#define num_channel NumInputSignals(1)\n" "\n" "static double cntr_max_buf;\n" "typedef struct\n" "{\n" "\tdouble cntr;\n" "\tdouble time;\n" "\tdouble dirc;\n" "} samplehit;\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 double *ph_buf;\n" "static int samplehit_update;\n" "static int slave_started;\n" "static int update_option;\n" "static double sync_ext_pre;\n" "\n" "void update_samplehit(int id_channel, double cntr_max, double ph, double clk," " double currenttime, \n" "\tsamplehit* buf_pre, samplehit* buf_1st, samplehit* buf_2nd, samplehit* buf_" "3rd)\n" "{\n" "\tdouble cntr_out;\n" "\t\n" "\tif(ph == 0.)\n" "\t{\n" "\t\tcntr_out = 0.;\t\n" "\t\t(buf_pre+id_channel)->cntr = cntr_out;\n" "\t\t(buf_pre+id_channel)->time = currenttime + 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)->time = currenttime + cntr_max*clk;\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)->time = currenttime + 2*cntr_max*clk;\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)->time = currenttime + 3*cntr_max*clk;\n" "\t\t(buf_3rd+id_channel)->dirc = 1.;\n" "\t}\n" "\telse\n" "\t{\n" "\t\tcntr_out = (1-ph)*cntr_max;\n" "\t\t(buf_pre+id_channel)->cntr = cntr_out;\n" "\t\t(buf_pre+id_channel)->time = currenttime + 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)->time = currenttime + (cntr_max-cntr_out)*clk;\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)->time = currenttime + (2.*cntr_max-cntr_out)*clk;\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)->time = currenttime + (3.*cntr_max-cntr_out)*clk;\n" "\t\t(buf_3rd+id_channel)->dirc = 1.;\n" "\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" "ph_buf = (double*) malloc(num_channel*sizeof(double));\n" "samplehit_update = 0;\n" "slave_started = 0;\n" "update_option = ParamRealData(1,0);\n" "sync_ext_pre = 0;\n" "\n" Show off } Parameter { Variable "OutputFcn" Value "if(IsMajorStep)\n" "{\n" "\tsamplehit_update = 0;\n" "\tOutputSignal(0,0) = 0.;\t\t\n" "\tOutputSignal(1,0) = 0.;\n" "\tif(IsSampleHit(1))\n" "\t{\t\t\t\t\n" "\t\tif(samplehit_1st_buf[0].dirc == 1.)\n" "\t\t{\t\n" "\t\t\tsamplehit_update = 1;\t\t\t\t\n" "\t\t}\t\n" "\t\tif(samplehit_1st_buf[0].cntr == 0.)\n" "\t\t{\n" "\t\t\tOutputSignal(0,0) = 1.;\t\t\n" "\t\t\tOutputSignal(1,0) = 0.;\t\n" "\t\t}\n" "\t\telse if(samplehit_1st_buf[0].cntr == cntr_max_buf)\n" "\t\t{\n" "\t\t\tOutputSignal(0,0) = 0.;\t\t\n" "\t\t\tOutputSignal(1,0) = 1.;\t\n" "\t\t}\n" "\t\telse\n" "\t\t{\n" "\t\t\tOutputSignal(0,0) = 0.;\t\t\n" "\t\t\tOutputSignal(1,0) = 0.;\t\n" "\t\t}\n" "\t\t\n" "\t\tsamplehit_pre_buf[0].cntr = samplehit_1st_buf[0].cntr;\n" "\t\tsamplehit_pre_buf[0].time = samplehit_1st_buf[0].time;\n" "\t\tsamplehit_pre_buf[0].dirc = samplehit_1st_buf[0].dirc;\n" "\t\tsamplehit_1st_buf[0].cntr = samplehit_2nd_buf[0].cntr;\n" "\t\tsamplehit_1st_buf[0].time = samplehit_2nd_buf[0].time;\n" "\t\tsamplehit_1st_buf[0].dirc = samplehit_2nd_buf[0].dirc;\t\n" "\t\tsamplehit_2nd_buf[0].cntr = samplehit_3rd_buf[0].cntr;\n" "\t\tsamplehit_2nd_buf[0].time = samplehit_3rd_buf[0].time;\n" "\t\tsamplehit_2nd_buf[0].dirc = samplehit_3rd_buf[0].dirc;\n" "\t}\n" "\telse\n" "\t{\n" "\t\tsamplehit_update = 0;\n" "\t}\t\n" "}\n" "\n" "\n" Show off } Parameter { Variable "UpdateFcn" Value "cntr_max_buf = InputSignal(0,0);\n" "if(CurrentTime == 0.)\n" "{\n" "\tph_buf[0] = InputSignal(1,0);\n" "}\n" "else\n" "{\n" "\tph_buf[0] = 0.;\n" "}\n" "if(samplehit_update==1 || CurrentTime == 0. || (InputSignal(2,0)==1. && sync_" "ext_pre == 0.))\n" "{\n" "\tupdate_samplehit(0, cntr_max_buf, ph_buf[0], clk_cntr, CurrentTime, \n" "\t\tsamplehit_pre_buf, samplehit_1st_buf, samplehit_2nd_buf, samplehit_3rd_bu" "f);\t\n" "}\n" "\n" "if(samplehit_1st_buf[0].time > CurrentTime)\n" "{\n" "\tNextSampleHit = samplehit_1st_buf[0].time;\n" "}\n" "else\n" "{\n" "\tNextSampleHit = DBL_MAX;\n" "}\n" "sync_ext_pre = InputSignal(2,0);" 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" "free(ph_buf);" Show off } Parameter { Variable "StoreCustomStateFcn" Value "" Show off } Parameter { Variable "RestoreCustomStateFcn" Value "" Show off } } Component { Type Output Name "z" Show on Position [340, 170] Direction right Flipped off Parameter { Variable "Index" Value "5" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Output Name "p" Show on Position [340, 200] Direction right Flipped off Parameter { Variable "Index" Value "6" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Input Name "sync_i" Show on Position [60, 140] Direction right Flipped off Parameter { Variable "Index" Value "7" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type EdgeDetection Name "Edge Detection" Show off Position [115, 140] Direction right Flipped off Parameter { Variable "Direction" Value "1" Show off } } Component { Type CScript Name "Carrier" Show on Position [210, 100] Direction up Flipped off Parameter { Variable "DialogGeometry" Value "[192 99 1373 937]" Show off } Parameter { Variable "NumInputs" Value "[1 num_channel+1 1]" Show off } Parameter { Variable "NumOutputs" Value "[num_channel+1 num_channel+1]" 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,0]" Show off } Parameter { Variable "Parameters" Value "clk_cntr, update, sync_src" 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 "Declarations" Value "#include \"float.h\"\n" "#include \n" "\n" "#define clk_cntr ParamRealData(0,0)\n" "\n" "#define num_channel NumInputSignals(1)\n" "\n" "static double cntr_max_buf;\n" "typedef struct\n" "{\n" "\tdouble cntr;\n" "\tdouble time;\n" "\tdouble dirc;\n" "} samplehit;\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 double *ph_buf;\n" "static int update_option;\n" "static int sync_src_option;\n" "\n" "void update_samplehit(int id_channel, double cntr_max, double ph, double clk," " double currenttime, \n" "\tsamplehit* buf_pre, samplehit* buf_1st, samplehit* buf_2nd, samplehit* buf_" "3rd)\n" "{\n" "\tdouble cntr_out;\n" "\t\n" "\tif(ph == 0.)\n" "\t{\n" "\t\tcntr_out = 0.;\t\n" "\t\t(buf_pre+id_channel)->cntr = cntr_out;\n" "\t\t(buf_pre+id_channel)->time = currenttime + 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)->time = currenttime + cntr_max*clk;\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)->time = currenttime + 2*cntr_max*clk;\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)->time = currenttime + 3*cntr_max*clk;\n" "\t\t(buf_3rd+id_channel)->dirc = 1.;\n" "\t}\n" "\telse\n" "\t{\n" "\t\tcntr_out = (1-ph)*cntr_max;\n" "\t\t(buf_pre+id_channel)->cntr = cntr_out;\n" "\t\t(buf_pre+id_channel)->time = currenttime + 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)->time = currenttime + (cntr_max-cntr_out)*clk;\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)->time = currenttime + (2.*cntr_max-cntr_out)*clk;\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)->time = currenttime + (3.*cntr_max-cntr_out)*clk;\n" "\t\t(buf_3rd+id_channel)->dirc = 1.;\n" "\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" "ph_buf = (double*) malloc(num_channel*sizeof(double));\n" "update_option = ParamRealData(1,0);\n" "sync_src_option = ParamRealData(2,0);\n" "\n" "samplehit_1st_buf[0].dirc = 1.;\n" "samplehit_1st_buf[0].time = 0.;\n" "\n" "for (int id_channel = 0.; id_channel= CurrentTime-1e-10)\n" "\t\t\t\t{\n" "\t\t\t\t\tif(id_channel == 0 && samplehit_1st_buf[0].dirc == 1.)\n" "\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\t\n" "\t\t\t\t\t\tfor(int id_channel_tmp = 0; id_channel_tmp < num_channel; id_chan" "nel_tmp++)\n" "\t\t\t\t\t\t{\n" "\t\t\t\t\t\t if(id_channel_tmp > 1 && sync_src_option == 1)\n" "\t\t\t\t\t\t {\n" "\t\t\t\t\t\t\t\tph_buf[id_channel_tmp] = InputSignal(1,id_channel_tmp);\n" "\t\t\t\t\t\t\t}\n" "\t\t\t\t\t\t\tupdate_samplehit(id_channel_tmp, cntr_max_buf, ph_buf[id_channe" "l_tmp], clk_cntr, CurrentTime, \n" "\t\t\t\t\t\t\t\tsamplehit_pre_buf, samplehit_1st_buf, samplehit_2nd_buf, samp" "lehit_3rd_buf);\n" "\t\t\t\t\t\t}\n" "\t\t\t\t\t}\n" "\t\t\t\t\telse\n" "\t\t\t\t\t{\n" "\t\t\t\t\t\tsamplehit_pre_buf[id_channel].cntr = samplehit_1st_buf[id_channel" "].cntr;\n" "\t\t\t\t\t\tsamplehit_pre_buf[id_channel].time = samplehit_1st_buf[id_channel" "].time;\n" "\t\t\t\t\t\tsamplehit_pre_buf[id_channel].dirc = samplehit_1st_buf[id_channel" "].dirc;\n" "\t\t\t\t\t\tsamplehit_1st_buf[id_channel].cntr = samplehit_2nd_buf[id_channel" "].cntr;\n" "\t\t\t\t\t\tsamplehit_1st_buf[id_channel].time = samplehit_2nd_buf[id_channel" "].time;\n" "\t\t\t\t\t\tsamplehit_1st_buf[id_channel].dirc = samplehit_2nd_buf[id_channel" "].dirc;\t\n" "\t\t\t\t\t\tsamplehit_2nd_buf[id_channel].cntr = samplehit_3rd_buf[id_channel" "].cntr;\n" "\t\t\t\t\t\tsamplehit_2nd_buf[id_channel].time = samplehit_3rd_buf[id_channel" "].time;\n" "\t\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\t\n" "\t\t\t\t}\t\t\t\n" "\t\t\t}\t\t\n" "\t\t}\t\t\t\n" "\t}\n" "\t// Configure the closest sample hit in the future\n" "\tdouble next_event = samplehit_1st_buf[0].time;\n" "\tfor (int id_channel = 1; id_channel < num_channel; id_channel++)\n" "\t{\t\t\n" "\t\tif(samplehit_1st_buf[id_channel].time < next_event && samplehit_1st_buf[i" "d_channel].time > CurrentTime)\n" "\t\t{\n" "\t\t\tnext_event = samplehit_1st_buf[id_channel].time;\n" "\t\t}\t\t\t\n" "\t}\n" "\t\n" "\tNextSampleHit = next_event;\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" "\tif(CurrentTime == 0.)\n" "\t{\n" "\t\tOutputSignal(0,id_channel) = 0.;\n" "\t}\n" "\telse\n" "\t{\n" "\n" "\t double output;\n" "\t\toutput = samplehit_pre_buf[id_channel].cntr + \n" "\t\t\t\t\t(CurrentTime - samplehit_pre_buf[id_channel].time)\n" "\t\t\t\t\t/clk_cntr;\n" "\t\tOutputSignal(0,id_channel) = output;\n" "\t\tif(update_option!=2)\n" "\t\t{\n" "\t\t\tif(output == 0. || output == cntr_max_buf)\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}\n" "\t}\n" "}\n" "\n" "\n" Show off } Parameter { Variable "UpdateFcn" Value "" 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" "free(ph_buf);" Show off } Parameter { Variable "StoreCustomStateFcn" Value "" Show off } Parameter { Variable "RestoreCustomStateFcn" Value "" Show off } } Component { Type LogicalOperator Name "Logical\nOperator" Show off Position [295, 170] Direction up Flipped off Parameter { Variable "Operator" Value "2" Show off } Parameter { Variable "Inputs" Value "2" Show off } } Component { Type SignalSelector Name "Cont\nSelector" Show off Position [295, 85] Direction right Flipped off Parameter { Variable "InputWidth" Value "num_channel+1" Show off } Parameter { Variable "OutputIndices" Value "[2:num_channel+1]" Show off } } Component { Type SignalSelector Name "Cont\nSelector1" Show off Position [295, 115] Direction right Flipped off Parameter { Variable "InputWidth" Value "num_channel+1" Show off } Parameter { Variable "OutputIndices" Value "[2:num_channel+1]" Show off } } Component { Type SignalMux Name "Mux" Show off Position [125, 100] Direction right Flipped off Parameter { Variable "Width" Value "[1 num_channel]" Show off } } Component { Type Scope Name "Scope" Show off Position [415, 45] Direction up Flipped off Location [640, 300; 990, 527] State "AAAA/wAAAAD9AAAAAgAAAAEAAAAAAAAAAPwCAAA" "AA/sAAAAQAFoAbwBvAG0AQQByAGUAYQAAAAAA/////wAAADQA////+wAAABQAUwBhAHYAZQBkAFYA" "aQBlAHcAcwAAAAAA/////wAAAGYA////+wAAAAwAVAByAGEAYwBlAHMAAAAAAP////8AAABmAP///" "wAAAAMAAAAAAAAAAPwBAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQAAAAAAP////8AAABQAP" "///wAAAV4AAADIAAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHI" "BAAAAAP////8AAAAAAAAAAA==" SavedViews "AAAAAgAAAAA=" HeaderState "AAAA/wAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAA" "AAAAL/gMAAAAJAAAACAAAAGQAAAAJAAAAZAAAAAIAAABkAAAAAwAAAGQAAAABAAAAZAAAAAYAAABk" "AAAABwAAAGQAAAAEAAAAZAAAAAUAAABkAAAAmAAAAAsBAAABAAAAAAAAAAAAAAAAZP////8AAACBA" "AAAAAAAAAsAAAB0AAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAA" "AAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAA" "AAAAAAAAAAQAAAAAAAAAkAAAAAQAAAAAAAAPoAAAAACQ=" PlotPalettes "AAAAAQAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAA" "AAAAAAAAA" Axes "1" TimeRange "0.0" ScrollingMode "1" SingleTimeAxis "1" Open "0" Ts "-1" SampleLimit "0" XAxisLabel "" ShowLegend "1" Axis { Name "" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Fourier { SingleXAxis on AxisLabel "Frequency" Scaling 0 PhaseDisplay 0 ShowFourierLegend off Axis { Name "" AutoScale 1 MinValue 0 MaxValue 1 Signals {} Untangle 0 KeepBaseline off BaselineValue 0 } } } Connection { Type Signal SrcComponent "sync_i" SrcTerminal 1 DstComponent "Edge Detection" DstTerminal 1 } Connection { Type Signal SrcComponent "Logical\nOperator" SrcTerminal 1 DstComponent "z" DstTerminal 1 } Connection { Type Signal SrcComponent "Edge Detection" SrcTerminal 2 Points [140, 140] Branch { Points [140, 110] DstComponent "Carrier" DstTerminal 3 } Branch { Points [140, 180] Branch { Points [140, 220; 260, 220; 260, 175] DstComponent "Logical\nOperator" DstTerminal 3 } Branch { DstComponent "Sync Pulse" DstTerminal 3 } } } Connection { Type Signal SrcComponent "prd" SrcTerminal 1 Points [140, 60; 140, 90; 160, 90] Branch { DstComponent "Carrier" DstTerminal 1 } Branch { Points [160, 160] DstComponent "Sync Pulse" DstTerminal 1 } } Connection { Type Signal SrcComponent "Carrier" SrcTerminal 5 Points [260, 105; 260, 115] DstComponent "Cont\nSelector1" DstTerminal 1 } Connection { Type Signal SrcComponent "Cont\nSelector1" SrcTerminal 2 DstComponent "sync" DstTerminal 1 } Connection { Type Signal SrcComponent "Mux" SrcTerminal 1 Points [150, 100] Branch { DstComponent "Carrier" DstTerminal 2 } Branch { Points [150, 170] DstComponent "Sync Pulse" DstTerminal 2 } } Connection { Type Signal SrcComponent "ph" SrcTerminal 1 DstComponent "Mux" DstTerminal 3 } Connection { Type Signal SrcComponent "Carrier" SrcTerminal 4 Points [260, 95; 260, 85] DstComponent "Cont\nSelector" DstTerminal 1 } Connection { Type Signal SrcComponent "Sync Pulse" SrcTerminal 4 DstComponent "Logical\nOperator" DstTerminal 2 } Connection { Type Signal SrcComponent "Sync Pulse" SrcTerminal 5 Points [250, 175; 250, 200] DstComponent "p" DstTerminal 1 } Connection { Type Signal SrcComponent "Cont\nSelector" SrcTerminal 2 Points [350, 85] Branch { DstComponent "cntr" DstTerminal 1 } Branch { Points [350, 45] DstComponent "Scope" DstTerminal 1 } } } Name "Symmetrical" Schematic { Component { Type Input Name "prd" Show on Position [60, 60] Direction right Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Output Name "cntr" Show on Position [405, 85] Direction right Flipped off Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Output Name "sync" Show on Position [340, 115] Direction right Flipped off Parameter { Variable "Index" Value "3" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Input Name "ph" Show on Position [60, 105] Direction right Flipped off 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 Parameter { Variable "K" Value "0.5" Show off } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Output Name "z" Show on Position [340, 170] Direction right Flipped off Parameter { Variable "Index" Value "5" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Output Name "p" Show on Position [340, 200] Direction right Flipped off Parameter { Variable "Index" Value "6" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Input Name "sync_i" Show on Position [60, 140] Direction right Flipped off Parameter { Variable "Index" Value "7" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type EdgeDetection Name "Edge Detection" Show off Position [115, 140] Direction right Flipped off Parameter { Variable "Direction" Value "1" Show off } } Component { Type LogicalOperator Name "Logical\nOperator" Show off Position [295, 170] Direction up Flipped off Parameter { Variable "Operator" Value "2" Show off } Parameter { Variable "Inputs" Value "2" Show off } } Component { Type CScript Name "Sync Pulse" Show on Position [210, 170] Direction up Flipped off Parameter { Variable "DialogGeometry" Value "[916 536 732 314]" Show off } Parameter { Variable "NumInputs" Value "[1 num_channel+1 1]" Show off } Parameter { Variable "NumOutputs" Value "[1 1]" 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 "0" Show off } Parameter { Variable "Ts" Value "[0,0;-2,0]" Show off } Parameter { Variable "Parameters" Value "clk_cntr, update" 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 "Declarations" Value "#include \"float.h\"\n" "#include \n" "\n" "#define clk_cntr ParamRealData(0,0)\n" "\n" "#define num_channel NumInputSignals(1)\n" "\n" "static double cntr_max_buf;\n" "typedef struct\n" "{\n" "\tdouble cntr;\n" "\tdouble time;\n" "\tdouble dirc;\n" "} samplehit;\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 double *ph_buf;\n" "static int samplehit_update;\n" "static int slave_started;\n" "static int update_option;\n" "static double sync_ext_pre;\n" "\n" "void update_samplehit(int id_channel, double cntr_max, double ph, double clk," " double currenttime, \n" "\tsamplehit* buf_pre, samplehit* buf_1st, samplehit* buf_2nd, samplehit* buf_" "3rd)\n" "{\n" "\tdouble cntr_out;\n" "\tif(ph <= 0.5 && ph > 0.)\n" "\t{\n" "\t\tcntr_out = ph/0.5*cntr_max;\n" "\t\t(buf_pre+id_channel)->cntr = cntr_out;\n" "\t\t(buf_pre+id_channel)->time = currenttime + 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)->time = currenttime + cntr_out*clk;\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)->time = currenttime + (cntr_out+cntr_max)*clk;\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)->time = currenttime + (cntr_out+2*cntr_max)*clk;\n" "\t\t(buf_3rd+id_channel)->dirc = 1.;\n" "\n" "\t}\n" "\telse if(ph == 0.)\n" "\t{\n" "\t\tcntr_out = 0.;\t\n" "\t\t(buf_pre+id_channel)->cntr = cntr_out;\n" "\t\t(buf_pre+id_channel)->time = currenttime + 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)->time = currenttime + cntr_max*clk;\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)->time = currenttime + 2*cntr_max*clk;\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)->time = currenttime + 3*cntr_max*clk;\n" "\t\t(buf_3rd+id_channel)->dirc = -1.;\n" "\t}\n" "\telse\n" "\t{\n" "\t\tdouble cntr_out = (1. - (ph-0.5)/0.5)*cntr_max;\n" "\t\t(buf_pre+id_channel)->cntr = cntr_out;\n" "\t\t(buf_pre+id_channel)->time = currenttime + 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)->time = currenttime + (cntr_max-cntr_out)*clk;\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)->time = currenttime + (cntr_max-cntr_out+cntr_max)*c" "lk;\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)->time = currenttime + (cntr_max-cntr_out+2*cntr_max)" "*clk;\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" "ph_buf = (double*) malloc(num_channel*sizeof(double));\n" "samplehit_update = 0;\n" "slave_started = 0;\n" "update_option = ParamRealData(1,0);\n" "sync_ext_pre = 0;\n" "\n" Show off } Parameter { Variable "OutputFcn" Value "if(IsMajorStep)\n" "{\n" "\tsamplehit_update = 0;\n" "\tOutputSignal(0,0) = 0.;\t\t\n" "\tOutputSignal(1,0) = 0.;\n" "\tif(IsSampleHit(1))\n" "\t{\t\t\t\t\n" "\t\tif(samplehit_1st_buf[0].dirc == 1.)\n" "\t\t{\t\n" "\t\t\tsamplehit_update = 1;\t\t\t\t\n" "\t\t}\t\n" "\t\tif(samplehit_1st_buf[0].cntr == 0.)\n" "\t\t{\n" "\t\t\tOutputSignal(0,0) = 1.;\t\t\n" "\t\t\tOutputSignal(1,0) = 0.;\t\n" "\t\t}\n" "\t\telse if(samplehit_1st_buf[0].cntr == cntr_max_buf)\n" "\t\t{\n" "\t\t\tOutputSignal(0,0) = 0.;\t\t\n" "\t\t\tOutputSignal(1,0) = 1.;\t\n" "\t\t}\n" "\t\telse\n" "\t\t{\n" "\t\t\tOutputSignal(0,0) = 0.;\t\t\n" "\t\t\tOutputSignal(1,0) = 0.;\t\n" "\t\t}\n" "\t\t\n" "\t\tsamplehit_pre_buf[0].cntr = samplehit_1st_buf[0].cntr;\n" "\t\tsamplehit_pre_buf[0].time = samplehit_1st_buf[0].time;\n" "\t\tsamplehit_pre_buf[0].dirc = samplehit_1st_buf[0].dirc;\n" "\t\tsamplehit_1st_buf[0].cntr = samplehit_2nd_buf[0].cntr;\n" "\t\tsamplehit_1st_buf[0].time = samplehit_2nd_buf[0].time;\n" "\t\tsamplehit_1st_buf[0].dirc = samplehit_2nd_buf[0].dirc;\t\n" "\t\tsamplehit_2nd_buf[0].cntr = samplehit_3rd_buf[0].cntr;\n" "\t\tsamplehit_2nd_buf[0].time = samplehit_3rd_buf[0].time;\n" "\t\tsamplehit_2nd_buf[0].dirc = samplehit_3rd_buf[0].dirc;\n" "\t}\n" "\telse\n" "\t{\n" "\t\tsamplehit_update = 0;\n" "\t}\t\n" "}\n" "\n" "\n" Show off } Parameter { Variable "UpdateFcn" Value "cntr_max_buf = InputSignal(0,0);\n" "if(CurrentTime == 0.)\n" "{\n" "\tph_buf[0] = InputSignal(1,0);\n" "}\n" "else\n" "{\n" "\tph_buf[0] = 0.;\n" "}\n" "if(samplehit_update==1 || CurrentTime == 0. || (InputSignal(0,0)==1. && sync_" "ext_pre == 0.))\n" "{\n" "\tupdate_samplehit(0, cntr_max_buf, ph_buf[0], clk_cntr, CurrentTime, \n" "\t\tsamplehit_pre_buf, samplehit_1st_buf, samplehit_2nd_buf, samplehit_3rd_bu" "f);\t\n" "}\n" "\n" "if(samplehit_1st_buf[0].time > CurrentTime)\n" "{\n" "\tNextSampleHit = samplehit_1st_buf[0].time;\n" "}\n" "else\n" "{\n" "\tNextSampleHit = DBL_MAX;\n" "}\n" "sync_ext_pre = InputSignal(2,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" "free(ph_buf);" Show off } Parameter { Variable "StoreCustomStateFcn" Value "" Show off } Parameter { Variable "RestoreCustomStateFcn" Value "" Show off } } Component { Type SignalSelector Name "Cont\nSelector" Show off Position [295, 85] Direction right Flipped off Parameter { Variable "InputWidth" Value "num_channel+1" Show off } Parameter { Variable "OutputIndices" Value "[2:num_channel+1]" Show off } } Component { Type SignalSelector Name "Cont\nSelector1" Show off Position [295, 115] Direction right Flipped off Parameter { Variable "InputWidth" Value "num_channel+1" Show off } Parameter { Variable "OutputIndices" Value "[2:num_channel+1]" Show off } } Component { Type CScript Name "Carrier" Show on Position [210, 100] Direction up Flipped off Parameter { Variable "DialogGeometry" Value "[359 45 1560 992]" Show off } Parameter { Variable "NumInputs" Value "[1 num_channel+1 1]" Show off } Parameter { Variable "NumOutputs" Value "[num_channel+1 num_channel+1]" 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,0]" Show off } Parameter { Variable "Parameters" Value "clk_cntr, update, sync_src" 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 "Declarations" Value "#include \"float.h\"\n" "#include \n" "\n" "#define clk_cntr ParamRealData(0,0)\n" "\n" "#define num_channel NumInputSignals(1)\n" "\n" "static double cntr_max_buf;\n" "typedef struct\n" "{\n" "\tdouble cntr;\n" "\tdouble time;\n" "\tdouble dirc;\n" "} samplehit;\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 double *ph_buf;\n" "static int update_option;\n" "static int sync_src_option;\n" "\n" "void update_samplehit(int id_channel, double cntr_max, double ph, double clk," " double currenttime, \n" "\tsamplehit* buf_pre, samplehit* buf_1st, samplehit* buf_2nd, samplehit* buf_" "3rd)\n" "{\n" "\tdouble cntr_out;\n" "\tif(ph <= 0.5 && ph > 0.)\n" "\t{\n" "\t\tcntr_out = ph/0.5*cntr_max;\n" "\t\t(buf_pre+id_channel)->cntr = cntr_out;\n" "\t\t(buf_pre+id_channel)->time = currenttime + 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)->time = currenttime + cntr_out*clk;\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)->time = currenttime + (cntr_out+cntr_max)*clk;\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)->time = currenttime + (cntr_out+2*cntr_max)*clk;\n" "\t\t(buf_3rd+id_channel)->dirc = 1.;\n" "\n" "\t}\n" "\telse if(ph == 0.)\n" "\t{\n" "\t\tcntr_out = 0.;\t\n" "\t\t(buf_pre+id_channel)->cntr = cntr_out;\n" "\t\t(buf_pre+id_channel)->time = currenttime + 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)->time = currenttime + cntr_max*clk;\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)->time = currenttime + 2*cntr_max*clk;\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)->time = currenttime + 3*cntr_max*clk;\n" "\t\t(buf_3rd+id_channel)->dirc = -1.;\n" "\t}\n" "\telse\n" "\t{\n" "\t\tdouble cntr_out = (1. - (ph-0.5)/0.5)*cntr_max;\n" "\t\t(buf_pre+id_channel)->cntr = cntr_out;\n" "\t\t(buf_pre+id_channel)->time = currenttime + 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)->time = currenttime + (cntr_max-cntr_out)*clk;\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)->time = currenttime + (cntr_max-cntr_out+cntr_max)*c" "lk;\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)->time = currenttime + (cntr_max-cntr_out+2*cntr_max)" "*clk;\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" "ph_buf = (double*) malloc(num_channel*sizeof(double));\n" "update_option = ParamRealData(1,0);\n" "sync_src_option = ParamRealData(2,0);\n" "\n" "samplehit_1st_buf[0].dirc = 1.;\n" "samplehit_1st_buf[0].time = 0.;\n" "\n" "for (int id_channel = 0.; id_channel= CurrentTime-1e-10)\n" "\t\t\t\t{\n" "\t\t\t\t\tif(id_channel == 0 && samplehit_1st_buf[0].dirc == 1.)\n" "\t\t\t\t\t{\t\t\t\t\n" "\t\t\t\t\t\tfor(int id_channel_tmp = 0; id_channel_tmp < num_channel; id_chan" "nel_tmp++)\n" "\t\t\t\t\t\t{\n" "\t\t\t\t\t\t\tif(id_channel_tmp > 1 && sync_src_option == 1)\n" "\t\t\t\t\t\t {\n" "\t\t\t\t\t\t\t\tph_buf[id_channel_tmp] = InputSignal(1,id_channel_tmp);\n" "\t\t\t\t\t\t\t}\n" "\t\t\t\t\t\t\tupdate_samplehit(id_channel_tmp, cntr_max_buf, ph_buf[id_channe" "l_tmp], clk_cntr, CurrentTime, \n" "\t\t\t\t\t\t\t\tsamplehit_pre_buf, samplehit_1st_buf, samplehit_2nd_buf, samp" "lehit_3rd_buf);\n" "\t\t\t\t\t\t}\n" "\t\t\t\t\t}\n" "\t\t\t\t\telse\n" "\t\t\t\t\t{\n" "\t\t\t\t\t\tsamplehit_pre_buf[id_channel].cntr = samplehit_1st_buf[id_channel" "].cntr;\n" "\t\t\t\t\t\tsamplehit_pre_buf[id_channel].time = samplehit_1st_buf[id_channel" "].time;\n" "\t\t\t\t\t\tsamplehit_pre_buf[id_channel].dirc = samplehit_1st_buf[id_channel" "].dirc;\n" "\t\t\t\t\t\tsamplehit_1st_buf[id_channel].cntr = samplehit_2nd_buf[id_channel" "].cntr;\n" "\t\t\t\t\t\tsamplehit_1st_buf[id_channel].time = samplehit_2nd_buf[id_channel" "].time;\n" "\t\t\t\t\t\tsamplehit_1st_buf[id_channel].dirc = samplehit_2nd_buf[id_channel" "].dirc;\t\n" "\t\t\t\t\t\tsamplehit_2nd_buf[id_channel].cntr = samplehit_3rd_buf[id_channel" "].cntr;\n" "\t\t\t\t\t\tsamplehit_2nd_buf[id_channel].time = samplehit_3rd_buf[id_channel" "].time;\n" "\t\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\t\n" "\t\t\t\t}\t\t\t\n" "\t\t\t} \t\t\n" " \t\t}\n" " \t}\n" " \t// Configure the closest sample hit in the future\n" " double next_event = samplehit_1st_buf[0].time;\n" " for (int id_channel = 1; id_channel < num_channel; id_channel++)\n" "\t{\t\t\n" " \t\tif(samplehit_1st_buf[id_channel].time < next_event && samplehit_1st_buf" "[id_channel].time > CurrentTime)\n" " \t\t{\n" " \t\t\tnext_event = samplehit_1st_buf[id_channel].time;\n" " \t\t}\t\t\t\n" " \t}\n" " \t\n" " \tNextSampleHit = next_event;\t\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" "\tif(CurrentTime == 0.)\n" "\t{\n" "\t\tOutputSignal(0,id_channel) = 0.;\n" "\t}\n" "\telse\n" "\t{\n" "\t double output;\n" "\t\toutput = samplehit_pre_buf[id_channel].cntr + \n" "\t\t\t\t\t(CurrentTime - samplehit_pre_buf[id_channel].time)\n" "\t\t\t\t\t/(samplehit_1st_buf[id_channel].time - samplehit_pre_buf[id_channel" "].time)\n" "\t\t\t\t\t*(samplehit_1st_buf[id_channel].cntr-samplehit_pre_buf[id_channel]." "cntr);\n" "\t\tOutputSignal(0,id_channel) = output;\n" "\t\tswitch(update_option)\n" "\t\t{\n" "\t\t\tcase 1:\n" "\t\t\t\tif(output == 0.)\n" "\t\t\t\t{\n" "\t\t\t\t\tOutputSignal(1,id_channel) = 1.;\t\t\t\t\t\t\t\n" "\t\t\t\t}\n" "\t\t\t\telse\n" "\t\t\t\t{\n" "\t\t\t\t\tOutputSignal(1,id_channel) = 0.;\n" "\t\t\t\t}\n" "\t\t\t\tbreak;\n" "\t\t\tcase 3:\n" "\t\t\t\tif(output == cntr_max_buf)\n" "\t\t\t\t{\n" "\t\t\t\t\tOutputSignal(1,id_channel) = 1.;\n" "\t\t\t\t}\n" "\t\t\t\telse\n" "\t\t\t\t{\n" "\t\t\t\t\tOutputSignal(1,id_channel) = 0.;\n" "\t\t\t\t}\n" "\t\t\t\tbreak;\n" "\t\t\tcase 4:\n" "\t\t\t\tif(output == cntr_max_buf||output == 0.)\n" "\t\t\t\t{\n" "\t\t\t\t\tOutputSignal(1,id_channel) = 1.;\n" "\t\t\t\t}\n" "\t\t\t\telse\n" "\t\t\t\t{\n" "\t\t\t\t\tOutputSignal(1,id_channel) = 0.;\n" "\t\t\t\t}\n" "\t\t\t\tbreak;\n" "\t\t\tdefault:\n" "\t\t\t\tbreak;\n" "\t\t}\n" "\t}\n" "}\n" "\n" "\n" Show off } Parameter { Variable "UpdateFcn" Value "" 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" "free(ph_buf);" Show off } Parameter { Variable "StoreCustomStateFcn" Value "" Show off } Parameter { Variable "RestoreCustomStateFcn" Value "" Show off } } Component { Type SignalMux Name "Mux" Show off Position [125, 100] Direction right Flipped off Parameter { Variable "Width" Value "[1 num_channel]" Show off } } Component { Type Scope Name "Scope" Show off Position [425, 45] Direction up Flipped off Location [0, 0; 0, 0] State "" SavedViews "" HeaderState "" PlotPalettes "" Axes "1" TimeRange "0.0" ScrollingMode "1" SingleTimeAxis "1" Open "0" Ts "-1" SampleLimit "0" XAxisLabel "" ShowLegend "1" Axis { Name "" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Fourier { SingleXAxis on AxisLabel "Frequency" Scaling 0 PhaseDisplay 0 ShowFourierLegend off Axis { Name "" AutoScale 1 MinValue 0 MaxValue 1 Signals {} Untangle 0 KeepBaseline off BaselineValue 0 } } } Connection { Type Signal SrcComponent "prd" SrcTerminal 1 DstComponent "Gain" DstTerminal 1 } Connection { Type Signal SrcComponent "sync_i" SrcTerminal 1 DstComponent "Edge Detection" DstTerminal 1 } Connection { Type Signal SrcComponent "Logical\nOperator" SrcTerminal 1 DstComponent "z" DstTerminal 1 } Connection { Type Signal SrcComponent "Edge Detection" SrcTerminal 2 Points [140, 140] Branch { Points [140, 110] DstComponent "Carrier" DstTerminal 3 } Branch { Points [140, 180] Branch { Points [140, 220; 260, 220; 260, 175] DstComponent "Logical\nOperator" DstTerminal 3 } Branch { DstComponent "Sync Pulse" DstTerminal 3 } } } Connection { Type Signal SrcComponent "Gain" SrcTerminal 2 Points [140, 60; 140, 90; 160, 90] Branch { DstComponent "Carrier" DstTerminal 1 } Branch { Points [160, 160] DstComponent "Sync Pulse" DstTerminal 1 } } Connection { Type Signal SrcComponent "Cont\nSelector1" SrcTerminal 2 DstComponent "sync" DstTerminal 1 } Connection { Type Signal SrcComponent "Sync Pulse" SrcTerminal 4 DstComponent "Logical\nOperator" DstTerminal 2 } Connection { Type Signal SrcComponent "Sync Pulse" SrcTerminal 5 Points [250, 175; 250, 200] DstComponent "p" DstTerminal 1 } Connection { Type Signal SrcComponent "Mux" SrcTerminal 1 Points [150, 100] Branch { DstComponent "Carrier" DstTerminal 2 } Branch { Points [150, 170] DstComponent "Sync Pulse" DstTerminal 2 } } Connection { Type Signal SrcComponent "ph" SrcTerminal 1 DstComponent "Mux" DstTerminal 3 } Connection { Type Signal SrcComponent "Carrier" SrcTerminal 5 Points [260, 105; 260, 115] DstComponent "Cont\nSelector1" DstTerminal 1 } Connection { Type Signal SrcComponent "Carrier" SrcTerminal 4 Points [260, 95; 260, 85] DstComponent "Cont\nSelector" DstTerminal 1 } Connection { Type Signal SrcComponent "Cont\nSelector" SrcTerminal 2 Points [355, 85] Branch { DstComponent "cntr" DstTerminal 1 } Branch { Points [355, 45] DstComponent "Scope" DstTerminal 1 } } } } Parameter { Variable "Configuration" Value "type" Show off } } Component { Type Reference SrcComponent "Components/Control/Modulators/Blanking Time" Name "Blanking Time" Show on Position [540, 205] Direction up Flipped off Frame [-20, -20; 20, 20] LabelPosition [0, 23] LabelAlign up Parameter { Variable "tb" Value "delay" Show off } Terminal { Type Output Position [24, 0] Direction right } Terminal { Type Input Position [-20, 0] Direction left } } Component { Type ConfigurableSubsystem Name "sw" Show on Position [595, 205] Direction up Flipped off Frame [-15, -15; 15, 15] LabelPosition [0, 18] LabelAlign up SampleTime "-1" CodeGenDiscretizationMethod "2" CodeGenTarget "Generic" MaskDisplayLang "2" MaskIconFrame on MaskIconOpaque off MaskIconRotates on Terminal { Type Input Position [-15, 0] Direction left } Terminal { Type Output Position [19, 0] Direction right } TerminalNames { "In1", "Out1" } Location [468, 133; 780, 319] ZoomFactor 1 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Configurations { Name "Active High" Schematic { Component { Type Input Name "In1" Show off Position [20, 60] Direction right Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Output Name "Out1" Show off Position [240, 60] Direction right Flipped off Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type ConstantRelationalOperator Name "Compare to\nConstant" Show off Position [100, 50] Direction right Flipped off Frame [-20, -10; 20, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "Operator" Value "6" Show off } Parameter { Variable "Threshold" Value "0" Show off } } Component { Type ConstantRelationalOperator Name "Compare to\nConstant1" Show off Position [100, 70] Direction right Flipped off Frame [-20, -10; 20, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "Operator" Value "3" Show off } Parameter { Variable "Threshold" Value "0" Show off } } Component { Type SignalSelector Name "Cont\nSelector" Show off Position [180, 60] Direction right Flipped off Parameter { Variable "InputWidth" Value "num_pwm*2" Show off } Parameter { Variable "OutputIndices" Value "reshape([1:num_pwm; (num_pwm+1):num_p" "wm*2], [1 num_pwm*2])" Show off } } Component { Type SignalMux Name "Mux" Show off Position [140, 60] Direction right Flipped off Parameter { Variable "Width" Value "[num_pwm num_pwm]" Show off } } Connection { Type Signal SrcComponent "Compare to\nConstant" SrcTerminal 2 DstComponent "Mux" DstTerminal 2 } Connection { Type Signal SrcComponent "Compare to\nConstant1" SrcTerminal 2 DstComponent "Mux" DstTerminal 3 } Connection { Type Signal SrcComponent "Mux" SrcTerminal 1 DstComponent "Cont\nSelector" DstTerminal 1 } Connection { Type Signal SrcComponent "Cont\nSelector" SrcTerminal 2 DstComponent "Out1" DstTerminal 1 } Connection { Type Signal SrcComponent "In1" SrcTerminal 1 Points [65, 60] Branch { DstComponent "Compare to\nConstant1" DstTerminal 1 } Branch { DstComponent "Compare to\nConstant" DstTerminal 1 } } } Name "Active Low" Schematic { Component { Type Input Name "In1" Show off Position [20, 60] Direction right Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Output Name "Out1" Show off Position [240, 60] Direction right Flipped off Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type ConstantRelationalOperator Name "Compare to\nConstant" Show off Position [100, 50] Direction right Flipped off Frame [-20, -10; 20, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "Operator" Value "4" Show off } Parameter { Variable "Threshold" Value "0" Show off } } Component { Type ConstantRelationalOperator Name "Compare to\nConstant1" Show off Position [100, 70] Direction right Flipped off Frame [-20, -10; 20, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "Operator" Value "5" Show off } Parameter { Variable "Threshold" Value "0" Show off } } Component { Type SignalSelector Name "Cont\nSelector" Show off Position [180, 60] Direction right Flipped off Parameter { Variable "InputWidth" Value "num_pwm*2" Show off } Parameter { Variable "OutputIndices" Value "reshape([1:num_pwm; (num_pwm+1):num_p" "wm*2], [1 num_pwm*2])" Show off } } Component { Type SignalMux Name "Mux" Show off Position [140, 60] Direction right Flipped off Parameter { Variable "Width" Value "[num_pwm num_pwm]" Show off } } Connection { Type Signal SrcComponent "Compare to\nConstant" SrcTerminal 2 DstComponent "Mux" DstTerminal 2 } Connection { Type Signal SrcComponent "Compare to\nConstant1" SrcTerminal 2 DstComponent "Mux" DstTerminal 3 } Connection { Type Signal SrcComponent "Mux" SrcTerminal 1 DstComponent "Cont\nSelector" DstTerminal 1 } Connection { Type Signal SrcComponent "Cont\nSelector" SrcTerminal 2 DstComponent "Out1" DstTerminal 1 } Connection { Type Signal SrcComponent "In1" SrcTerminal 1 Points [65, 60] Branch { DstComponent "Compare to\nConstant1" DstTerminal 1 } Branch { DstComponent "Compare to\nConstant" DstTerminal 1 } } } } Parameter { Variable "Configuration" Value "polarity" Show off } } Component { Type Offset Name "Offset" Show on Position [480, 205] Direction right Flipped off Frame [-20, -10; 20, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "Offset" Value "-0.5" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type DataType Name "Data Type" Show off Position [420, 205] Direction right Flipped off Parameter { Variable "DataType" Value "10" Show off } } Connection { Type Signal SrcComponent "Constant3" SrcTerminal 1 Points [150, 190; 150, 160] DstComponent "Divide" DstTerminal 2 } Connection { Type Signal SrcComponent "Product2" SrcTerminal 1 DstComponent "Configurable\nSubsystem" DstTerminal 1 } Connection { Type Signal SrcComponent "Compare to\nConstant" SrcTerminal 2 DstComponent "Sum1" DstTerminal 3 } Connection { Type Signal SrcComponent "Sum" SrcTerminal 1 DstComponent "Gain1" DstTerminal 1 } Connection { Type Signal SrcComponent "Gain1" SrcTerminal 2 DstComponent "Product2" DstTerminal 3 } Connection { Type Signal SrcComponent "Constant" SrcTerminal 1 Points [150, 80] DstComponent "Sum" DstTerminal 3 } Connection { Type Signal SrcComponent "Divide" SrcTerminal 1 Points [210, 155] Branch { Points [210, 190] DstComponent "Carrier" DstTerminal 1 } Branch { Points [210, 120] DstComponent "Product2" DstTerminal 2 } } Connection { Type Signal SrcComponent "m" SrcTerminal 1 DstComponent "Sum" DstTerminal 2 } Connection { Type Signal SrcComponent "init" SrcTerminal 1 DstComponent "Divide" DstTerminal 3 } Connection { Type Signal SrcComponent "fc'" SrcTerminal 1 DstComponent "init" DstTerminal 2 } Connection { Type Signal SrcComponent "ph'" SrcTerminal 1 Points [115, 210] Branch { DstComponent "Compare to\nConstant" DstTerminal 1 } Branch { DstComponent "Sum1" DstTerminal 2 } } Connection { Type Signal SrcComponent "Sum1" SrcTerminal 1 DstComponent "synco\nselect" DstTerminal 1 } Connection { Type Signal SrcComponent "synco\nselect" SrcTerminal 2 DstComponent "Carrier" DstTerminal 4 } Connection { Type Signal SrcComponent "Carrier" SrcTerminal 5 Points [310, 230; 310, 250] DstComponent "z" DstTerminal 1 } Connection { Type Signal SrcComponent "Carrier" SrcTerminal 6 Points [300, 250; 300, 290] DstComponent "p" DstTerminal 1 } Connection { Type Signal SrcComponent "Configurable\nSubsystem" SrcTerminal 2 Points [330, 115] DstComponent "Comparator" DstTerminal 1 } Connection { Type Signal SrcComponent "Blanking Time" SrcTerminal 1 DstComponent "sw" DstTerminal 1 } Connection { Type Signal SrcComponent "Offset" SrcTerminal 2 DstComponent "Blanking Time" DstTerminal 2 } Connection { Type Signal SrcComponent "Data Type" SrcTerminal 2 DstComponent "Offset" DstTerminal 1 } Connection { Type Signal SrcComponent "sw" SrcTerminal 2 DstComponent "s" DstTerminal 1 } Connection { Type Signal SrcComponent "sync_i" SrcTerminal 1 Points [235, 280] DstComponent "Carrier" DstTerminal 7 } Connection { Type Signal SrcComponent "Carrier" SrcTerminal 3 Points [300, 190] DstComponent "Configurable\nSubsystem" DstTerminal 3 } Connection { Type Signal SrcComponent "Comparator" SrcTerminal 3 DstComponent "Data Type" DstTerminal 1 } Connection { Type Signal SrcComponent "Carrier" SrcTerminal 2 DstComponent "Comparator" DstTerminal 2 } } } Connection { Type Signal SrcComponent "f'" SrcTerminal 1 DstComponent "PWM" DstTerminal 3 } Connection { Type Signal SrcComponent "PWM" SrcTerminal 1 DstComponent "1" DstTerminal 1 } Connection { Type Signal SrcComponent "ph'" SrcTerminal 1 Points [90, 120; 90, 90] DstComponent "PWM" DstTerminal 2 } Connection { Type Signal SrcComponent "Logical\nOperator" SrcTerminal 1 Points [245, 125; 245, 110] DstComponent "Mux" DstTerminal 5 } Connection { Type Signal SrcComponent "Mux" SrcTerminal 1 Points [285, 95] Branch { DstComponent "Cont\nSelector" DstTerminal 1 } Branch { Points [285, 125] DstComponent "Cont\nSelector1" DstTerminal 1 } } Connection { Type Signal SrcComponent "PWM" SrcTerminal 6 Points [190, 80; 190, 90] Branch { Points [190, 120] Branch { DstComponent "Logical\nOperator" DstTerminal 2 } Branch { DstComponent "synco\nselect" DstTerminal 1 } } Branch { DstComponent "Mux" DstTerminal 3 } } Connection { Type Signal SrcComponent "PWM" SrcTerminal 7 Points [180, 90; 180, 100] Branch { Points [180, 130] DstComponent "Logical\nOperator" DstTerminal 3 } Branch { DstComponent "Mux" DstTerminal 4 } } Connection { Type Signal SrcComponent "synco\nselect" SrcTerminal 2 DstComponent "synco" DstTerminal 1 } Connection { Type Signal SrcComponent "m" SrcTerminal 1 Points [90, 40; 90, 70] DstComponent "PWM" DstTerminal 4 } Connection { Type Signal SrcComponent "synci" SrcTerminal 1 Points [100, 160] Branch { DstComponent "synco\nselect" DstTerminal 3 } Branch { Points [100, 100] DstComponent "PWM" DstTerminal 5 } } Connection { Type Signal SrcComponent "Cont\nSelector" SrcTerminal 2 DstComponent "Pulse Divider1" DstTerminal 1 } Connection { Type Signal SrcComponent "Pulse Divider1" SrcTerminal 2 DstComponent "Task" DstTerminal 1 } Connection { Type Signal SrcComponent "Cont\nSelector1" SrcTerminal 2 DstComponent "Pulse Divider" DstTerminal 1 } Connection { Type Signal SrcComponent "Pulse Divider" SrcTerminal 2 DstComponent "ADC" DstTerminal 1 } } } Component { Type Reference SrcComponent "TIC2000_Lib/PWM (Variable)" Name "PWM (Variable)2" Show on Position [1225, 430] Direction up Flipped off Frame [-35, -25; 35, 25] LabelPosition [0, 28] LabelAlign up Parameter { Variable "num_pwm" Value "2" Show off } Parameter { Variable "pwm_3" Value "1" Show off } Parameter { Variable "pwm_2" Value "2" Show off } Parameter { Variable "pwm_1" Value "4" Show off } Parameter { Variable "type" Value "1" Show off } Parameter { Variable "fc" Value "20e3" Show off } Parameter { Variable "fc_tol" Value "1" Show off } Parameter { Variable "delay" Value "0.1e-6" Show off } Parameter { Variable "polarity" Value "1" Show off } Parameter { Variable "fvar" Value "1" Show off } Parameter { Variable "sync_src" Value "1" Show off } Parameter { Variable "socsel" Value "1" Show off } Parameter { Variable "socsel_prd" Value "" Show off } Parameter { Variable "intsel" Value "1" Show off } Parameter { Variable "intsel_prd" Value "" Show off } Parameter { Variable "tz1mode" Value "1" Show off } Parameter { Variable "tz2mode" Value "1" Show off } Parameter { Variable "tz3mode" Value "1" Show off } Parameter { Variable "TargetPortIndices" Value "15" Show off } Terminal { Type Input Position [-35, -10] Direction left } Terminal { Type EventOutput Position [39, 15] Direction right } Terminal { Type EventOutput Position [39, -15] Direction right } Terminal { Type Input Position [-35, 10] Direction left } Terminal { Type EventOutput Position [39, 0] Direction right } Terminal { Type EventInput Position [0, -25] Direction up } Terminal { Type Input Position [-35, 0] Direction left } } Component { Type Constant Name "Constant7" Show off Position [1120, 440] Direction right Flipped off Frame [-35, -10; 35, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "Value" Value "[0 0.028]" Show off } Parameter { Variable "DataType" Value "10" Show off } } Component { Type Constant Name "Constant8" Show off Position [1120, 420] Direction right Flipped off Frame [-35, -10; 35, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "Value" Value "[0 0.5]" Show off } Parameter { Variable "DataType" Value "10" Show off } } Connection { Type Signal SrcComponent "Mux1" SrcTerminal 1 DstComponent "Gate Signals" DstTerminal 1 } Connection { Type Signal SrcComponent "Constant3" SrcTerminal 1 DstComponent "V*->d" DstTerminal 2 } Connection { Type Signal SrcComponent "En" SrcTerminal 1 DstComponent "Power" DstTerminal 1 } Connection { Type Signal SrcComponent "V*->d" SrcTerminal 1 Points [525, 240] Branch { Points [525, 270] DstComponent "Mux1" DstTerminal 2 } Branch { DstComponent "Display1" DstTerminal 1 } } Connection { Type Signal SrcComponent "Hall Signals1" SrcTerminal 1 DstComponent "IC" DstTerminal 1 } Connection { Type Signal SrcComponent "IC" SrcTerminal 2 Points [290, 290] Branch { DstComponent "Hall Evaluation1" DstTerminal 2 } Branch { Points [290, 350] DstComponent "Scope2" DstTerminal 1 } } Connection { Type Signal SrcComponent "Constant1" SrcTerminal 1 DstComponent "Subtract" DstTerminal 2 } Connection { Type Signal SrcComponent "Switch" SrcTerminal 1 Points [1025, 810; 1025, 755] DstComponent "PWM3" DstTerminal 4 } Connection { Type Signal SrcComponent "Switch1" SrcTerminal 1 Points [1025, 635; 1025, 745] DstComponent "PWM3" DstTerminal 1 } Connection { Type Signal SrcComponent "Constant5" SrcTerminal 1 Points [860, 800; 860, 805] DstComponent "Switch" DstTerminal 2 } Connection { Type Signal SrcComponent "Constant2" SrcTerminal 1 Points [860, 830; 860, 815] DstComponent "Switch" DstTerminal 3 } Connection { Type Signal SrcComponent "Demux1" SrcTerminal 5 DstComponent "Goto" DstTerminal 1 } Connection { Type Signal SrcComponent "Subtract" SrcTerminal 1 Points [955, 490] Branch { Points [985, 490; 985, 475] DstComponent "PWM2" DstTerminal 1 } Branch { Points [955, 560; 840, 560; 840, 630] DstComponent "Switch1" DstTerminal 3 } } Connection { Type Signal SrcComponent "Gate Signals" SrcTerminal 2 DstComponent "Demux1" DstTerminal 1 } Connection { Type Signal SrcComponent "Demux1" SrcTerminal 3 DstComponent "INH1" DstTerminal 1 } Connection { Type Signal SrcComponent "Demux1" SrcTerminal 2 Points [820, 265; 820, 330] Branch { Points [960, 330; 960, 310] DstComponent "PWM1" DstTerminal 1 } Branch { Points [820, 510] Branch { Points [820, 640] DstComponent "Switch1" DstTerminal 2 } Branch { Points [885, 510; 885, 495] DstComponent "Subtract" DstTerminal 3 } } } Connection { Type Signal SrcComponent "Demux1" SrcTerminal 4 Points [780, 285; 780, 535; 805, 535] Branch { Points [805, 755; 895, 755] Branch { DstComponent "Switch" DstTerminal 4 } Branch { DstComponent "Switch1" DstTerminal 4 } } Branch { Points [805, 420] DstComponent "INH2" DstTerminal 1 } } Connection { Type Signal SrcComponent "From" SrcTerminal 1 DstComponent "INH3" DstTerminal 1 } Connection { Type Signal SrcComponent "Power" SrcTerminal 2 Points [530, 440; 530, 425] Branch { Points [530, 290] DstComponent "Mux1" DstTerminal 4 } Branch { DstComponent "Scope" DstTerminal 1 } } Connection { Type Event SrcComponent "ADC" SrcTerminal 2 DstComponent "Control Task\nTrigger" DstTerminal 1 } Connection { Type Signal SrcComponent "Demux3" SrcTerminal 2 DstComponent "Scope1" DstTerminal 1 } Connection { Type Signal SrcComponent "Demux3" SrcTerminal 3 DstComponent "Scope1" DstTerminal 2 } Connection { Type Signal SrcComponent "Demux3" SrcTerminal 4 DstComponent "Scope1" DstTerminal 3 } Connection { Type Signal SrcComponent "ADC" SrcTerminal 1 Points [380, 160] Branch { DstComponent "Meas. Processing" DstTerminal 1 } Branch { Points [380, 80] Branch { DstComponent "Demux3" DstTerminal 1 } Branch { Points [380, 75] DstComponent "IabcUa" DstTerminal 1 } } } Connection { Type Signal SrcComponent "Meas. Processing" SrcTerminal 2 Points [580, 160; 580, 155] Branch { Points [580, 100] DstComponent "Scope1" DstTerminal 4 } Branch { DstComponent "IDC_M" DstTerminal 1 } } Connection { Type Signal SrcComponent "Hall Evaluation1" SrcTerminal 1 Points [400, 285] Branch { Points [550, 285] DstComponent "Mux1" DstTerminal 3 } Branch { Points [400, 175] DstComponent "Meas. Processing" DstTerminal 3 } } Connection { Type Signal SrcComponent "Constant" SrcTerminal 1 DstComponent "PWM (Variable)1" DstTerminal 1 } Connection { Type Signal SrcComponent "Constant6" SrcTerminal 1 DstComponent "PWM (Variable)1" DstTerminal 4 } Connection { Type Event SrcComponent "External Sync" SrcTerminal 1 Points [1225, 270] DstComponent "PWM (Variable)1" DstTerminal 6 } Connection { Type Signal SrcComponent "Constant7" SrcTerminal 1 DstComponent "PWM (Variable)2" DstTerminal 4 } Connection { Type Signal SrcComponent "Constant8" SrcTerminal 1 DstComponent "PWM (Variable)2" DstTerminal 1 } Connection { Type Event SrcComponent "PWM (Variable)1" SrcTerminal 3 Points [1275, 340; 1275, 20; 280, 20] DstComponent "ADC" DstTerminal 3 } } } Component { Type Scope Name "Scope" Show on Position [825, 380] Direction up Flipped off Location [0, 27; 1920, 1064] State "AAAA/wAAAAD9AAAAAgAAAAEAAAAAAAAAAPwCAAAAA/sAAAAQAFoAbwBvA" "G0AQQByAGUAYQAAAAAA/////wAAADQA////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwAAAAAA//" "///wAAAGYA////+wAAAAwAVAByAGEAYwBlAHMAAAAAAP////8AAABmAP///wAAAAMAAAeAAAAAY/w" "BAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQBAAAAAAAAB4AAAABQAP///wAAB4AAAAOLAAAA" "BAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP////8AAAAAA" "AAAAA==" SavedViews "AAAAAgAAAAA=" HeaderState "AAAA/wAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAL/gMAAAAJAAAAC" "QAAAGQAAAAIAAAAZAAAAAUAAABkAAAABAAAAGQAAAAHAAAAZAAAAAYAAABkAAAAAQAAAGQAAAADAA" "AAZAAAAAIAAABkAAAHgAAAAAsBAAABAAAAAAAAAAAAAAAAZP////8AAACBAAAAAAAAAAsAAABtAAA" "AAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAA" "AAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAA" "AcTAAAAAQAAAAAAAAPoAAAAACQ=" PlotPalettes "AAAAAQAAAAEAAAABAAAAAQAAAAEC//8u4P//zMwAAAAAAAEAAAABAAAAA" "AEAAAABAAAAAQAAAAEAAAABAAAAAAEAAAABQAAAAAAAAAAAAAABAAAAAQE=" Axes "1" TimeRange "0.0" ScrollingMode "1" SingleTimeAxis "1" Open "0" Ts "-1" SampleLimit "0" XAxisLabel "" ShowLegend "1" Axis { Name "" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Fourier { SingleXAxis on AxisLabel "Frequency" Scaling 0 PhaseDisplay 0 ShowFourierLegend off Axis { Name "" AutoScale 1 MinValue 0 MaxValue 1 Signals {} Untangle 0 KeepBaseline off BaselineValue 0 } } } Component { Type Step Name "Step" Show off Position [740, 355] Direction right Flipped off Parameter { Variable "Time" Value "0.1" Show on } Parameter { Variable "Before" Value "0" Show on } Parameter { Variable "After" Value "1" Show on } Parameter { Variable "DataType" Value "10" Show off } } Component { Type Scope Name "Scope2" Show on Position [1465, 455] Direction up Flipped off Location [0, 23; 1920, 1060] State "AAAA/wAAAAD9AAAAAgAAAAEAAAC0AAADfvwCAAAAA/sAAAAQAFoAbwBvA" "G0AQQByAGUAYQAAAAAA/////wAAAIQA////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwAAAAAA//" "///wAAAGYA////+wAAAAwAVAByAGEAYwBlAHMBAAAALwAAA34AAABmAP///wAAAAMAAAeAAAAAcPw" "BAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQBAAAAAAAAB4AAAABQAP///wAABsgAAAN+AAAA" "BAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP////8AAAAAA" "AAAAA==" SavedViews "AAAAAgAAAAA=" HeaderState "AAAA/wAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAL/gMAAAAJAAAAC" "QAAAkwAAAAIAAACTAAAAAUAAAJMAAAABAAAAkwAAAAHAAACTAAAAAYAAAJMAAAAAQAAAk0AAAADAA" "ACTAAAAAIAAAJMAAAHbwAAAAsBAAABAAAAAAAAAAAAAAAAZP////8AAACBAAAAAAAAAAsAAADTAAA" "AAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAA" "AAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAA" "AacAAAAAQAAAAAAAAPoAAAAACQ=" PlotPalettes "AAAAAQAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAA" "AEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" "==" Axes "3" TimeRange "0" ScrollingMode "1" SingleTimeAxis "1" Open "1" Ts "-1" SampleLimit "0" XAxisLabel "" ShowLegend "1" Axis { Name "Istdrehzahl" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "Rotorposition" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "elektromagnetisches Drehmoment" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Fourier { SingleXAxis on AxisLabel "Frequency" 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 Display Name "Display" Show off Position [1445, 380] Direction up Flipped off Frame [-41, -11; 41, 11] LabelPosition [0, 14] LabelAlign up Parameter { Variable "Notation" Value "1" Show off } Parameter { Variable "Precision" Value "4" Show off } } Component { Type SignalDemux Name "Demux3" Show off Position [1280, 280] Direction right Flipped on Parameter { Variable "Width" Value "3" Show off } } Component { Type SignalDemux Name "Demux5" Show off Position [1280, 310] Direction right Flipped on Parameter { Variable "Width" Value "3" Show off } } Component { Type Scope Name "Scope1" Show on Position [1380, 300] Direction up Flipped off Location [1920, 23; 3840, 1060] State "AAAA/wAAAAD9AAAAAgAAAAEAAAC0AAADSvwCAAAAA/sAAAAQAFoAbwBvA" "G0AQQByAGUAYQAAAAAA/////wAAASQA////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwAAAAAA//" "///wAAAGYA////+wAAAAwAVAByAGEAYwBlAHMBAAAALwAAA0oAAABmAP///wAAAAMAAAeAAAAApPw" "BAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQBAAAAAAAAB4AAAABQAP///wAABsgAAANKAAAA" "BAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP////8AAAAAA" "AAAAA==" SavedViews "AAAAAgAAAAA=" HeaderState "AAAA/wAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAL+AMAAAAHAAAAC" "QAAAGQAAAAIAAAAZAAAAAUAAABkAAAABAAAAGQAAAAHAAAAZAAAAAYAAABkAAAAAwAAAGQAAAdvAA" "AACwEAAAEAAAAAAAAAAAAAAABk/////wAAAIEAAAAAAAAACwAAAKIAAAABAAAAAAAAAGQAAAABAAA" "AAAAAAGQAAAABAAAAAAAAAAAAAAABAAAAAAAAAAAAAAABAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAB" "AAAAAAAAAAAAAAABAAAAAAAAAAAAAAABAAAAAAAAAAAAAAABAAAAAAAABgUAAAABAAAAAAAAA+gAA" "AAAJA==" PlotPalettes "AAAAAQAAAAIAAAACAAAAAQAAAAIB//8AAMzMAAAAAAH//6qqVVX//wAAA" "AAAAQAAAAIBAQAAAAEAAAACAAAAAQAAAAEAAAABAAAAAgAAAAAAAQAAAAI/8AAAAAAAAD/wAAAAAA" "AAAAAAAQAAAAIAAAAAAAIAAAACAAAAAQAAAAIB//8AAFVV//8AAAH//6qqAAD//wAAAAAAAQAAAAI" "BAQAAAAEAAAACAAAAAQAAAAEAAAABAAAAAgAAAAAAAQAAAAI/8AAAAAAAAD/wAAAAAAAAAAAAAQAA" "AAIAAAAAAAIAAAACAAAAAQAAAAIB/////wAAAAAAAAH//6qqAAD//wAAAAAAAQAAAAIBAQAAAAEAA" "AACAAAAAQAAAAEAAAABAAAAAgAAAAAAAQAAAAI/8AAAAAAAAD/wAAAAAAAAAAAAAQAAAAIAAAAAAA" "IAAAACAAAAAQAAAAIB//8AAMzMAAAAAAH//6qqAAD//wAAAAAAAQAAAAIBAQAAAAEAAAACAAAAAQA" "AAAEAAAABAAAAAgAAAAAAAQAAAAI/8AAAAAAAAD/wAAAAAAAAAAAAAQAAAAIAAAAAAAIAAAACAAAA" "AQAAAAIB//8AAFVV//8AAAH//6qqAAD//wAAAAAAAQAAAAIBAQAAAAEAAAACAAAAAQAAAAEAAAABA" "AAAAgAAAAAAAQAAAAI/8AAAAAAAAD/wAAAAAAAAAAAAAQAAAAIAAAAAAAIAAAACAAAAAQAAAAIB//" "///wAAAAAAAAH//6qqAAD//wAAAAAAAQAAAAIBAQAAAAEAAAACAAAAAQAAAAEAAAABAAAAAgAAAAA" "AAQAAAAI/8AAAAAAAAD/wAAAAAAAAAAAAAQAAAAIAAAAAAAIAAAACAAAAAQAAAAIB//+qqgAAAAAA" "AAH//6qqAAD//wAAAAAAAQAAAAIBAQAAAAEAAAACAAAAAQAAAAEAAAABAAAAAgAAAAAAAQAAAAI/8" "AAAAAAAAD/wAAAAAAAAAAAAAQAAAAIAAA==" Axes "7" TimeRange "0" ScrollingMode "1" SingleTimeAxis "1" Open "1" Ts "-1" SampleLimit "0" XAxisLabel "" ShowLegend "1" Axis { Name "i_u" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "i_v" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "i_w" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "e_a" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "e_b" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "e_c" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "Zwischenkreisstrom i_DC" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Fourier { SingleXAxis on AxisLabel "Frequency" 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 } 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 SignalDemux Name "Demux4" Show off Position [1340, 620] Direction right Flipped on Parameter { Variable "Width" Value "3" Show off } } Component { Type Scope Name "Scope7" Show off Position [1400, 570] Direction up Flipped off Location [0, 27; 1920, 1064] State "AAAA/wAAAAD9AAAAAgAAAAEAAAC0AAADk/wCAAAAA/sAAAAQAFoAbwBvA" "G0AQQByAGUAYQAAAAAA/////wAAASQA////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwAAAAAA//" "///wAAAGYA////+wAAAAwAVAByAGEAYwBlAHMBAAAALwAAA5MAAABmAP///wAAAAMAAAeAAAAAW/w" "BAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQBAAAAAAAAB4AAAABQAP///wAABsgAAAOTAAAA" "BAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP////8AAAAAA" "AAAAA==" SavedViews "AAAAAgAAAAA=" HeaderState "AAAA/wAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAL/gMAAAAJAAAAC" "QAAAGQAAAAIAAAAZAAAAAUAAABkAAAABAAAAGQAAAAHAAAAZAAAAAYAAABkAAAAAQAAAGQAAAADAA" "AAZAAAAAIAAABkAAAHbwAAAAsBAAABAAAAAAAAAAAAAAAAZP////8AAACBAAAAAAAAAAsAAAC/AAA" "AAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAA" "AAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAA" "AawAAAAAQAAAAAAAAPoAAAAACQ=" PlotPalettes "AAAAAQAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAA" "AEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" "AAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAA" "AAAAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAA" "AAAAAAAAAAAAAAAA" Axes "7" TimeRange "0" ScrollingMode "1" SingleTimeAxis "1" Open "1" Ts "-1" SampleLimit "0" XAxisLabel "" ShowLegend "2" Axis { Name "Zwischenkreisspannung U_DC" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "u_UG" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "u_VG" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "u_WG" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "u_UV" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "u_VW" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "u_WU" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Fourier { SingleXAxis on AxisLabel "Frequency" 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 } 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 off Position [1400, 700] Direction up Flipped off Location [0, 27; 1920, 1064] State "AAAA/wAAAAD9AAAAAgAAAAEAAAC0AAADk/wCAAAAA/sAAAAQAFoAbwBvA" "G0AQQByAGUAYQAAAAAA/////wAAAIQA////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwAAAAAA//" "///wAAAGYA////+wAAAAwAVAByAGEAYwBlAHMBAAAALwAAA5MAAABmAP///wAAAAMAAAeAAAAAW/w" "BAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQBAAAAAAAAB4AAAABQAP///wAABsgAAAOTAAAA" "BAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP////8AAAAAA" "AAAAA==" SavedViews "AAAAAgAAAAA=" HeaderState "AAAA/wAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAL/gMAAAAJAAAAC" "QAAAGQAAAAIAAAAZAAAAAUAAABkAAAABAAAAGQAAAAHAAAAZAAAAAYAAABkAAAAAQAAAGQAAAADAA" "AAZAAAAAIAAABkAAAHbwAAAAsBAAABAAAAAAAAAAAAAAAAZP////8AAACBAAAAAAAAAAsAAACGAAA" "AAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAA" "AAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAA" "AbpAAAAAQAAAAAAAAPoAAAAACQ=" PlotPalettes "AAAAAQAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAA" "AEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" "==" Axes "3" TimeRange "0" ScrollingMode "1" SingleTimeAxis "1" Open "1" Ts "-1" SampleLimit "0" XAxisLabel "" ShowLegend "2" Axis { Name "Rotorwinkel" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 1 KeepBaseline off BaselineValue 0 } Axis { Name "Hall Signale" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 1 KeepBaseline off BaselineValue 0 } Axis { Name "Back EMF" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 1 KeepBaseline off BaselineValue 0 } Fourier { SingleXAxis on AxisLabel "Frequency" 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 SignalDemux Name "Demux" Show off Position [705, 40] Direction right Flipped on Parameter { Variable "Width" Value "2" Show off } } Component { Type SignalDemux Name "Demux1" Show off Position [705, 60] Direction right Flipped on Parameter { Variable "Width" Value "2" Show off } } Component { Type SignalDemux Name "Demux2" Show off Position [705, 80] Direction right Flipped on Parameter { Variable "Width" Value "2" Show off } } Component { Type LogicalOperator Name "Logical\nOperator" Show off Position [845, 40] Direction up Flipped off Parameter { Variable "Operator" Value "1" Show off } Parameter { Variable "Inputs" Value "2" Show off } } Component { Type Scope Name "Gate Signals" Show on Position [1045, 105] Direction up Flipped off Location [0, 27; 1920, 1064] State "AAAA/wAAAAD9AAAAAgAAAAEAAAC0AAADk/wCAAAAA/sAAAAQAFoAbwBvA" "G0AQQByAGUAYQAAAAAA/////wAAASQA////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwAAAAAA//" "///wAAAGYA////+wAAAAwAVAByAGEAYwBlAHMBAAAALwAAA5MAAABmAP///wAAAAMAAAeAAAAAW/w" "BAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQBAAAAAAAAB4AAAABQAP///wAABsgAAAOTAAAA" "BAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP////8AAAAAA" "AAAAA==" SavedViews "AAAAAgAAAAA=" HeaderState "AAAA/wAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAL8AMAAAAGAAAAC" "QAAAGQAAAAIAAAAZAAAAAUAAABkAAAABAAAAGQAAAAHAAAAZAAAAAYAAABkAAAHbwAAAAsBAAABAA" "AAAAAAAAAAAAAAZP////8AAACBAAAAAAAAAAsAAACcAAAAAQAAAAAAAABkAAAAAQAAAAAAAABkAAA" "AAQAAAAAAAABkAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAA" "AAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAWnAAAAAQAAAAAAAAPoAAAAACQ=" PlotPalettes "AAAAAQAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAA" "AIAAAABAAAAAgL//y7g///MzAAAAf//qqoAAP//AAAAAAABAAAAAgABAAAAAQAAAAIAAAABAAAAAQ" "AAAAEAAAACAAAAAAABAAAAAkAAAAAAAAAAQAAAAAAAAAAAAAABAAAAAgEBAAAAAgAAAAIAAAABAAA" "AAgL//y7g///MzAAAAf//qqoAAP//AAAAAAABAAAAAgABAAAAAQAAAAIAAAABAAAAAQAAAAEAAAAC" "AAAAAAABAAAAAkAAAAAAAAAAQAAAAAAAAAAAAAABAAAAAgEBAAAAAgAAAAIAAAABAAAAAgL//y7g/" "//MzAAAAf//qqoAAP//AAAAAAABAAAAAgABAAAAAQAAAAIAAAABAAAAAQAAAAEAAAACAAAAAAABAA" "AAAkAAAAAAAAAAQAAAAAAAAAAAAAABAAAAAgEBAAAAAgAAAAIAAAABAAAAAgL//y7g///MzAAAAf/" "/qqoAAP//AAAAAAABAAAAAgABAAAAAQAAAAIAAAABAAAAAQAAAAEAAAACAAAAAAABAAAAAkAAAAAA" "AAAAQAAAAAAAAAAAAAABAAAAAgEBAAAAAgAAAAIAAAABAAAAAgL//y7g///MzAAAAf//qqoAAP//A" "AAAAAABAAAAAgABAAAAAQAAAAIAAAABAAAAAQAAAAEAAAACAAAAAAABAAAAAkAAAAAAAAAAQAAAAA" "AAAAAAAAABAAAAAgEBAAAAAgAAAAIAAAABAAAAAgL//y7g///MzAAAAf//qqoAAP//AAAAAAABAAA" "AAgABAAAAAQAAAAIAAAABAAAAAQAAAAEAAAACAAAAAAABAAAAAkAAAAAAAAAAQAAAAAAAAAAAAAAB" "AAAAAgEB" Axes "7" TimeRange "0" ScrollingMode "1" SingleTimeAxis "1" Open "1" Ts "-1" SampleLimit "0" XAxisLabel "" ShowLegend "1" Axis { Name base64 "UGhhc2Vuc3Ryw7ZtZSBJX3Vfdl93" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "Gatesignal Tu+" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "Gatesignal Tu-" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "Gatesignal Tv+" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "Gatesignal Tv-" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "Gatesignal Tw+" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "Gatesignal Tw-" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Fourier { SingleXAxis on AxisLabel "Frequency" 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 } 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 LogicalOperator Name "Logical\nOperator1" Show off Position [845, 70] Direction up Flipped off Parameter { Variable "Operator" Value "1" Show off } Parameter { Variable "Inputs" Value "2" Show off } } Component { Type LogicalOperator Name "Logical\nOperator2" Show off Position [845, 100] Direction up Flipped off Parameter { Variable "Operator" Value "1" Show off } Parameter { Variable "Inputs" Value "2" Show off } } Component { Type LogicalOperator Name "Logical\nOperator3" Show off Position [845, 130] Direction up Flipped off Parameter { Variable "Operator" Value "1" Show off } Parameter { Variable "Inputs" Value "2" Show off } } Component { Type LogicalOperator Name "Logical\nOperator4" Show off Position [845, 160] Direction up Flipped off Parameter { Variable "Operator" Value "1" Show off } Parameter { Variable "Inputs" Value "2" Show off } } Component { Type LogicalOperator Name "Logical\nOperator5" Show off Position [845, 190] Direction up Flipped off Parameter { Variable "Operator" Value "1" Show off } Parameter { Variable "Inputs" Value "2" Show off } } Component { Type Scope Name "Scope4" Show off Position [1380, 205] Direction up Flipped off Location [0, 27; 1920, 1064] State "AAAA/wAAAAD9AAAAAgAAAAEAAAC0AAADZPwCAAAAA/sAAAAQAFoAbwBvA" "G0AQQByAGUAYQAAAAAA/////wAAANQA////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwAAAAAA//" "///wAAAGYA////+wAAAAwAVAByAGEAYwBlAHMBAAAALwAAA2QAAABmAP///wAAAAMAAAeAAAAAivw" "BAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQBAAAAAAAAB4AAAABQAP///wAABsgAAANkAAAA" "BAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP////8AAAAAA" "AAAAA==" SavedViews "AAAAAgAAAAA=" HeaderState "AAAA/wAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAL8AMAAAAGAAAAC" "QAAAGQAAAAIAAAAZAAAAAUAAABkAAAABAAAAGQAAAAHAAAAZAAAAAYAAABkAAAHbwAAAAsBAAABAA" "AAAAAAAAAAAAAAZP////8AAACBAAAAAAAAAAsAAAELAAAAAQAAAAAAAABkAAAAAQAAAAAAAABkAAA" "AAQAAAAAAAABkAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAA" "AAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAU4AAAAAQAAAAAAAAPoAAAAACQ=" PlotPalettes "AAAAAQAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAA" "AEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" "AAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAA" "AAAAAAAA=" Axes "5" TimeRange "0" ScrollingMode "1" SingleTimeAxis "1" Open "1" Ts "-1" SampleLimit "0" XAxisLabel "" ShowLegend "1" Axis { Name "Triangular Wave Generator mit Phase Delay" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "Triangular Wave Generator ohne Phase Delay" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "I_U" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "I_V" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "I_W" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Fourier { SingleXAxis on AxisLabel "Frequency" 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 } } } Component { Type SignalDemux Name "Demux6" Show off Position [1315, 210] Direction right Flipped on Parameter { Variable "Width" Value "3" Show off } } Component { Type TriangleGenerator Name "Triangular Wave" Show off Position [1260, 190] Direction right Flipped off Parameter { Variable "Min" Value "0" Show off } Parameter { Variable "Max" Value "1" Show off } Parameter { Variable "f" Value "20000" Show off } Parameter { Variable "DutyCycle" Value "1" Show off } Parameter { Variable "Delay" Value "0" Show off } } Component { Type Scope Name "Scope6" Show off Position [370, 400] Direction down Flipped on Location [0, 27; 1920, 1064] State "AAAA/wAAAAD9AAAAAgAAAAEAAAC0AAADcfwCAAAAA/sAAAAQAFoAbwBvA" "G0AQQByAGUAYQAAAAAA/////wAAAKwA////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwAAAAAA//" "///wAAAGYA////+wAAAAwAVAByAGEAYwBlAHMBAAAALwAAA3EAAABmAP///wAAAAMAAAeAAAAAffw" "BAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQBAAAAAAAAB4AAAABQAP///wAABsgAAANxAAAA" "BAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP////8AAAAAA" "AAAAA==" SavedViews "AAAAAgAAAAA=" HeaderState "AAAA/wAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAL+AMAAAAHAAAAC" "QAAAGQAAAAIAAAAZAAAAAUAAABkAAAABAAAAGQAAAAHAAAAZAAAAAYAAABkAAAAAwAAAGQAAAdvAA" "AACwEAAAEAAAAAAAAAAAAAAABk/////wAAAIEAAAAAAAAACwAAAIYAAAABAAAAAAAAAGQAAAABAAA" "AAAAAAGQAAAABAAAAAAAAAAAAAAABAAAAAAAAAAAAAAABAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAB" "AAAAAAAAAAAAAAABAAAAAAAAAAAAAAABAAAAAAAAAAAAAAABAAAAAAAABiEAAAABAAAAAAAAA+gAA" "AAAJA==" PlotPalettes "AAAAAQAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAA" "AEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" "AAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" Axes "4" TimeRange "0" ScrollingMode "1" SingleTimeAxis "1" Open "1" Ts "-1" SampleLimit "0" XAxisLabel "" ShowLegend "1" Axis { Name "Iu_uA nach ADC" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "Iv_uA nach ADC" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "Iw_uA nach ADC" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "IDC_m" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Fourier { SingleXAxis on AxisLabel "Frequency" 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 } } } Component { Type SignalDemux Name "Demux7" Show off Position [415, 395] Direction right Flipped off Parameter { Variable "Width" Value "3" Show off } } Component { Type SignalSelector Name "Cont\nSelector" Show off Position [400, 455] Direction right Flipped on Parameter { Variable "InputWidth" Value "4" Show off } Parameter { Variable "OutputIndices" Value "[3]" Show off } } Component { Type PlecsProbe Name "Probe" Show off Position [1255, 160] Direction right Flipped off } Component { Type Goto Name "Goto" Show off Position [1180, 260] Direction up Flipped off Parameter { Variable "Tag" Value "I_UVW" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type From Name "From" Show off Position [975, 55] Direction right Flipped off Parameter { Variable "Tag" Value "I_UVW" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Connection { Type Signal SrcComponent "Plant" SrcTerminal 1 Points [1135, 280; 1135, 220; 425, 220; 425, 280] DstComponent "Controller" DstTerminal 1 } Connection { Type Signal SrcComponent "Plant" SrcTerminal 3 DstComponent "Controller" DstTerminal 3 } Connection { Type Signal SrcComponent "Controller" SrcTerminal 2 DstComponent "Plant" DstTerminal 5 } Connection { Type Signal SrcComponent "Demux3" SrcTerminal 2 DstComponent "Scope1" DstTerminal 1 } Connection { Type Signal SrcComponent "Demux3" SrcTerminal 3 DstComponent "Scope1" DstTerminal 2 } Connection { Type Signal SrcComponent "Demux3" SrcTerminal 4 DstComponent "Scope1" DstTerminal 3 } Connection { Type Signal SrcComponent "Demux5" SrcTerminal 2 DstComponent "Scope1" DstTerminal 4 } Connection { Type Signal SrcComponent "Demux5" SrcTerminal 3 DstComponent "Scope1" DstTerminal 5 } Connection { Type Signal SrcComponent "Demux5" SrcTerminal 4 DstComponent "Scope1" DstTerminal 6 } Connection { Type Signal SrcComponent "Demux4" SrcTerminal 4 Points [1360, 630; 1360, 600] DstComponent "Scope7" DstTerminal 7 } Connection { Type Signal SrcComponent "Demux4" SrcTerminal 3 Points [1355, 620; 1355, 590] DstComponent "Scope7" DstTerminal 6 } Connection { Type Signal SrcComponent "Demux4" SrcTerminal 2 Points [1350, 610; 1350, 580] DstComponent "Scope7" DstTerminal 5 } Connection { Type Signal SrcComponent "Plant" SrcTerminal 23 Points [1185, 400; 1185, 700] DstComponent "Scope3" DstTerminal 2 } Connection { Type Signal SrcComponent "Plant" SrcTerminal 22 Points [1190, 390; 1190, 620] DstComponent "Demux4" DstTerminal 1 } Connection { Type Signal SrcComponent "Plant" SrcTerminal 21 Points [1195, 380; 1195, 585; 1345, 585; 1345, 570] DstComponent "Scope7" DstTerminal 4 } Connection { Type Signal SrcComponent "Plant" SrcTerminal 20 Points [1200, 370; 1200, 565; 1340, 565; 1340, 560] DstComponent "Scope7" DstTerminal 3 } Connection { Type Signal SrcComponent "Plant" SrcTerminal 19 Points [1205, 360; 1205, 545; 1345, 545; 1345, 550] DstComponent "Scope7" DstTerminal 2 } Connection { Type Signal SrcComponent "Plant" SrcTerminal 18 Points [1210, 350; 1210, 510; 1350, 510; 1350, 540] DstComponent "Scope7" DstTerminal 1 } Connection { Type Signal SrcComponent "Plant" SrcTerminal 17 Points [1215, 340; 1215, 490; 1385, 490; 1385, 465] DstComponent "Scope2" DstTerminal 3 } Connection { Type Signal SrcComponent "Plant" SrcTerminal 16 Points [1220, 330; 1220, 460; 1290, 460] Branch { Points [1380, 460; 1380, 455] DstComponent "Scope2" DstTerminal 2 } Branch { Points [1290, 665; 1335, 665; 1335, 690] DstComponent "Scope3" DstTerminal 1 } } Connection { Type Signal SrcComponent "Plant" SrcTerminal 15 Points [1225, 320; 1225, 405; 1375, 405] Branch { Points [1395, 405; 1395, 445] DstComponent "Scope2" DstTerminal 1 } Branch { Points [1375, 380] DstComponent "Display" DstTerminal 1 } } Connection { Type Signal SrcComponent "Plant" SrcTerminal 14 Points [1230, 310; 1230, 330] DstComponent "Scope1" DstTerminal 7 } Connection { Type Signal SrcComponent "Plant" SrcTerminal 13 Points [1115, 300] Branch { Points [1240, 300; 1240, 310] DstComponent "Demux5" DstTerminal 1 } Branch { Points [1115, 710] DstComponent "Scope3" DstTerminal 3 } } Connection { Type Signal SrcComponent "Step" SrcTerminal 1 Points [785, 355] Branch { DstComponent "Plant" DstTerminal 4 } Branch { Points [785, 380] DstComponent "Scope" DstTerminal 1 } } Connection { Type Signal SrcComponent "Controller" SrcTerminal 7 Points [650, 270] Branch { DstComponent "Plant" DstTerminal 2 } Branch { Points [650, 40] DstComponent "Demux" DstTerminal 1 } } Connection { Type Signal SrcComponent "Controller" SrcTerminal 9 Points [660, 280] Branch { DstComponent "Plant" DstTerminal 8 } Branch { Points [660, 60] DstComponent "Demux1" DstTerminal 1 } } Connection { Type Signal SrcComponent "Controller" SrcTerminal 8 Points [675, 290] Branch { DstComponent "Plant" DstTerminal 10 } Branch { Points [675, 80] DstComponent "Demux2" DstTerminal 1 } } Connection { Type Signal SrcComponent "Demux" SrcTerminal 2 DstComponent "Logical\nOperator" DstTerminal 2 } Connection { Type Signal SrcComponent "Controller" SrcTerminal 6 Points [795, 300] Branch { DstComponent "Plant" DstTerminal 7 } Branch { Points [795, 75] Branch { Points [795, 45] DstComponent "Logical\nOperator" DstTerminal 3 } Branch { DstComponent "Logical\nOperator1" DstTerminal 3 } } } Connection { Type Signal SrcComponent "Demux" SrcTerminal 3 Points [765, 45; 765, 65] DstComponent "Logical\nOperator1" DstTerminal 2 } Connection { Type Signal SrcComponent "Demux1" SrcTerminal 2 Points [755, 55; 755, 95] DstComponent "Logical\nOperator2" DstTerminal 2 } Connection { Type Signal SrcComponent "Controller" SrcTerminal 5 Points [805, 310] Branch { DstComponent "Plant" DstTerminal 9 } Branch { Points [805, 135] Branch { Points [805, 105] DstComponent "Logical\nOperator2" DstTerminal 3 } Branch { DstComponent "Logical\nOperator3" DstTerminal 3 } } } Connection { Type Signal SrcComponent "Demux1" SrcTerminal 3 Points [740, 65; 740, 125] DstComponent "Logical\nOperator3" DstTerminal 2 } Connection { Type Signal SrcComponent "Demux2" SrcTerminal 2 Points [725, 75; 725, 155] DstComponent "Logical\nOperator4" DstTerminal 2 } Connection { Type Signal SrcComponent "Controller" SrcTerminal 4 Points [815, 320] Branch { DstComponent "Plant" DstTerminal 11 } Branch { Points [815, 195] Branch { DstComponent "Logical\nOperator4" DstTerminal 3 } Branch { DstComponent "Logical\nOperator5" DstTerminal 3 } } } Connection { Type Signal SrcComponent "Demux2" SrcTerminal 3 Points [715, 85; 715, 185] DstComponent "Logical\nOperator5" DstTerminal 2 } Connection { Type Signal SrcComponent "Logical\nOperator" SrcTerminal 1 Points [880, 40; 880, 85] DstComponent "Gate Signals" DstTerminal 2 } Connection { Type Signal SrcComponent "Logical\nOperator1" SrcTerminal 1 Points [875, 70; 875, 95] DstComponent "Gate Signals" DstTerminal 3 } Connection { Type Signal SrcComponent "Logical\nOperator2" SrcTerminal 1 Points [940, 100; 940, 105] DstComponent "Gate Signals" DstTerminal 4 } Connection { Type Signal SrcComponent "Logical\nOperator3" SrcTerminal 1 Points [880, 130; 880, 115] DstComponent "Gate Signals" DstTerminal 5 } Connection { Type Signal SrcComponent "Logical\nOperator4" SrcTerminal 1 Points [885, 160; 885, 125] DstComponent "Gate Signals" DstTerminal 6 } Connection { Type Signal SrcComponent "Logical\nOperator5" SrcTerminal 1 Points [890, 190; 890, 135] DstComponent "Gate Signals" DstTerminal 7 } Connection { Type Signal SrcComponent "Plant" SrcTerminal 24 Points [1120, 270; 1120, 230; 435, 230; 435, 270] DstComponent "Controller" DstTerminal 10 } Connection { Type Signal SrcComponent "Demux6" SrcTerminal 2 Points [1330, 200; 1330, 205] DstComponent "Scope4" DstTerminal 3 } Connection { Type Signal SrcComponent "Demux6" SrcTerminal 3 Points [1325, 210; 1325, 215] DstComponent "Scope4" DstTerminal 4 } Connection { Type Signal SrcComponent "Demux6" SrcTerminal 4 Points [1320, 225] DstComponent "Scope4" DstTerminal 5 } Connection { Type Signal SrcComponent "Triangular Wave" SrcTerminal 1 Points [1335, 190; 1335, 195] DstComponent "Scope4" DstTerminal 2 } Connection { Type Signal SrcComponent "Demux7" SrcTerminal 2 DstComponent "Scope6" DstTerminal 1 } Connection { Type Signal SrcComponent "Demux7" SrcTerminal 3 DstComponent "Scope6" DstTerminal 2 } Connection { Type Signal SrcComponent "Demux7" SrcTerminal 4 DstComponent "Scope6" DstTerminal 3 } Connection { Type Signal SrcComponent "Controller" SrcTerminal 12 DstComponent "Scope6" DstTerminal 4 } Connection { Type Signal SrcComponent "Controller" SrcTerminal 11 DstComponent "Demux7" DstTerminal 1 } Connection { Type Signal SrcComponent "Probe" SrcTerminal 1 Points [1340, 160; 1340, 185] DstComponent "Scope4" DstTerminal 1 } Connection { Type Signal SrcComponent "Cont\nSelector" SrcTerminal 2 Points [355, 455; 355, 435] DstComponent "Controller" DstTerminal 13 } Connection { Type Signal SrcComponent "Controller" SrcTerminal 15 DstComponent "Cont\nSelector" DstTerminal 1 } Connection { Type Signal SrcComponent "Plant" SrcTerminal 12 Points [1180, 290] Branch { Points [1230, 290; 1230, 280] Branch { DstComponent "Demux3" DstTerminal 1 } Branch { Points [1230, 210] DstComponent "Demux6" DstTerminal 1 } } Branch { DstComponent "Goto" DstTerminal 1 } } Connection { Type Signal SrcComponent "From" SrcTerminal 1 Points [984, 75] DstComponent "Gate Signals" DstTerminal 1 } } ProbeBlock { Tag "211123 HIL BLDC_Hallsensor ohne Regelung aber mit ADC und P" "ower Protection INH_IN Ersatz EN PWM Variabel SIL sawtooth/Plant/Probe" Probe { Component "BLDC Machine\n(Simple)" Path "Plant" Signals {"Electrical torque"} } } ProbeBlock { Tag "211123 HIL BLDC_Hallsensor ohne Regelung aber mit ADC und P" "ower Protection INH_IN Ersatz EN PWM Variabel SIL sawtooth/Plant/Back EMF" Probe { Component "BLDC Machine\n(Simple)" Path "Plant" Signals {"Back EMF"} } } ProbeBlock { Tag "211123 HIL BLDC_Hallsensor ohne Regelung aber mit ADC und P" "ower Protection INH_IN Ersatz EN PWM Variabel SIL sawtooth/Plant/Probe6" Probe { Component "Vm1" Path "Plant" Signals {"Measured voltage"} } } ProbeBlock { Tag "211123 HIL BLDC_Hallsensor ohne Regelung aber mit ADC und P" "ower Protection INH_IN Ersatz EN PWM Variabel SIL sawtooth/Plant/Probe7" Probe { Component "Vm2" Path "Plant" Signals {"Measured voltage"} } } ProbeBlock { Tag "211123 HIL BLDC_Hallsensor ohne Regelung aber mit ADC und P" "ower Protection INH_IN Ersatz EN PWM Variabel SIL sawtooth/Plant/Probe8" Probe { Component "Vm3" Path "Plant" Signals {"Measured voltage"} } } ProbeBlock { Tag "211123 HIL BLDC_Hallsensor ohne Regelung aber mit ADC und P" "ower Protection INH_IN Ersatz EN PWM Variabel SIL sawtooth/Plant/Probe3" Probe { Component "BLDC Machine\n(Simple)" Path "Plant" Signals {"Back EMF"} } } ProbeBlock { Tag "211123 HIL BLDC_Hallsensor ohne Regelung aber mit ADC und P" "ower Protection INH_IN Ersatz EN PWM Variabel SIL sawtooth/Probe" Probe { Component "cntr" Path "Controller/PWM (Variable)1/PWM/Carrier/Sawtooth" Signals {"Input"} } } }