📄 salib.mdl
字号:
ZoomFactor "100" Block { BlockType Inport Name "raw_current" Position [25, 48, 55, 62] Port "1" LatchInput off Interpolate on } Block { BlockType Reference Name "3.5 / (2^(bits-1))" Ports [1, 1] Position [90, 36, 165, 74] ForegroundColor "gray" SourceBlock "fixpt_lib_3p1/Math/Gain" SourceType "Fixed-Point Gain" gainval "0.02734375" GainDataTypeScalingMode "Inherit via internal rule" GainDataType "sfix( 8 )" GainScaling "2^-12" VecRadixGroup "Best Precision: Matrix-wise" OutputDataTypeScalingMode "Specify via dialog" OutDataType "sfix(16)" OutScaling "2^-6" LockScale off RndMeth "Floor" DoSatur off DblOver off dolog on ElevsMatrix "Element-wise(K.*u)" } Block { BlockType Reference Name "Abs" Ports [1, 1] Position [255, 35, 295, 75] ForegroundColor "gray" SourceBlock "fixpt_lib_3p1/Math/Abs" SourceType "Fixed-Point Absolute Value" DoSatur off } Block { BlockType Reference Name "gain" Ports [1, 1] Position [190, 35, 230, 75] ForegroundColor "gray" SourceBlock "fixpt_lib_3p1/Math/Gain" SourceType "Fixed-Point Gain" gainval "5" GainDataTypeScalingMode "Inherit via internal rule" GainDataType "sfix( 8 )" GainScaling "2^-4" VecRadixGroup "Best Precision: Matrix-wise" OutputDataTypeScalingMode "Specify via dialog" OutDataType "sfix(16)" OutScaling "2^-5" LockScale off RndMeth "Floor" DoSatur off DblOver off dolog on ElevsMatrix "Element-wise(K.*u)" } Block { BlockType Outport Name "processed_current" Position [350, 48, 380, 62] Port "1" OutputWhenDisabled "held" InitialOutput "[]" } Line { SrcBlock "raw_current" SrcPort 1 DstBlock "3.5 / (2^(bits-1))" DstPort 1 } Line { SrcBlock "Abs" SrcPort 1 DstBlock "processed_current" DstPort 1 } Line { SrcBlock "gain" SrcPort 1 DstBlock "Abs" DstPort 1 } Line { SrcBlock "3.5 / (2^(bits-1))" SrcPort 1 DstBlock "gain" DstPort 1 } } } Block { BlockType Outport Name "reset" Position [555, 108, 585, 122] Port "1" OutputWhenDisabled "held" InitialOutput "[]" } Block { BlockType Outport Name "obstacle" Position [555, 47, 585, 63] Port "2" OutputWhenDisabled "held" InitialOutput "[]" } Block { BlockType Outport Name "endstop" Position [555, 163, 585, 177] Port "3" OutputWhenDisabled "held" InitialOutput "[]" } Line { SrcBlock "armature_current" SrcPort 1 DstBlock "process_current" DstPort 1 } Line { SrcBlock "detect_obstacle" SrcPort 1 Points [0, 0; 15, 0] Branch { Points [0, 50] DstBlock "either" DstPort 1 } Branch { DstBlock "obstacle" DstPort 1 } } Line { SrcBlock "detect_endstop" SrcPort 1 Points [0, 0; 15, 0] Branch { DstBlock "endstop" DstPort 1 } Branch { Points [0, -50] DstBlock "either" DstPort 2 } } Line { SrcBlock "either" SrcPort 1 DstBlock "reset" DstPort 1 } Line { SrcBlock "move_up" SrcPort 1 DstBlock "detect_obstacle" DstPort 1 } Line { SrcBlock "process_current" SrcPort 1 Points [15, 0] Branch { Points [0, -50] DstBlock "detect_obstacle" DstPort 2 } Branch { Points [0, 50] DstBlock "detect_endstop" DstPort 1 } } } } Block { BlockType SubSystem Name "power_window_control" Ports [7, 2] Position [405, 30, 565, 210] ShowPortLabels on TreatAsAtomicUnit off RTWSystemCode "Auto" RTWFcnNameOpts "Auto" RTWFileNameOpts "Auto" System { Name "power_window_control" Location [76, 390, 848, 795] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" ZoomFactor "100" Block { BlockType Inport Name "position" Position [685, 38, 715, 52] Orientation "left" Port "1" LatchInput off Interpolate on } Block { BlockType Inport Name "driver_neutral" Position [60, 83, 90, 97] Port "2" LatchInput off Interpolate on } Block { BlockType Inport Name "driver_up" Position [100, 113, 130, 127] Port "3" LatchInput off Interpolate on } Block { BlockType Inport Name "driver_down" Position [140, 143, 170, 157] Port "4" LatchInput off Interpolate on } Block { BlockType Inport Name "passenger_neutral" Position [55, 238, 85, 252] Port "5" LatchInput off Interpolate on } Block { BlockType Inport Name "passenger_up" Position [95, 268, 125, 282] Port "6" LatchInput off Interpolate on } Block { BlockType Inport Name "passenger_down" Position [140, 298, 170, 312] Port "7" LatchInput off Interpolate on } Block { BlockType DiscretePulseGenerator Name "10 ms" Position [419, 95, 451, 115] Orientation "down" ForegroundColor "magenta" PulseType "Sample-based" Amplitude "1" Period "2" PulseWidth "1" PhaseDelay "0" SampleTime "10e-3" VectorParams1D on } Block { BlockType SubSystem Name "control" Ports [4, 2, 0, 1] Position [370, 137, 505, 238] ForegroundColor "magenta" ShowPortLabels on TreatAsAtomicUnit on RTWSystemCode "Auto" RTWFcnNameOpts "Auto" RTWFileNameOpts "Auto" MaskType "Stateflow" MaskDescription "Stateflow diagram" MaskDisplay "plot(sf('Private','sfblk','xIcon'),sf('Priv""ate','sfblk','yIcon'));text(0.5,0,sf('Private', 'sfblk', 'tIcon'),'Horizontal""Al','Center','VerticalAl','Bottom');" MaskSelfModifiable on MaskIconFrame off MaskIconOpaque off MaskIconRotate "none" MaskIconUnits "autoscale" System { Name "control" Location [257, 457, 812, 717] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" ZoomFactor "100" Block { BlockType Inport Name "endstop" Position [20, 101, 40, 119] Port "1" LatchInput off PortDimensions "1" Interpolate on } Block { BlockType Inport Name "obstacle" Position [20, 136, 40, 154] Port "2" LatchInput off PortDimensions "1" Interpolate on } Block { BlockType Inport Name "driver" Position [20, 171, 40, 189] Port "3" LatchInput off PortDimensions "3" Interpolate on } Block { BlockType Inport Name "passenger" Position [20, 206, 40, 224] Port "4" LatchInput off PortDimensions "3" Interpolate on } Block { BlockType TriggerPort Name "ticks" Ports [0, 1] Position [20, 246, 40, 264] TriggerType "either" ShowOutputPort on OutputDataType "auto" ZeroCross off } Block { BlockType Demux Name " Demux " Ports [1, 1] Position [270, 220, 320, 260] Outputs "1" BusSelectionMode off } Block { BlockType "S-Function" Name " SFunction " Tag "Stateflow S-Function salib 2" Ports [5, 3] Position [180, 100, 230, 220] FunctionName "sf_sfun" PortCounts "[5 3]" SFunctionModules "''" Port { PortNumber 2 Name "moveUp" TestPoint off LinearAnalysisOutput off LinearAnalysisInput off RTWStorageClass "Auto" } Port { PortNumber 3 Name "moveDown" TestPoint off LinearAnalysisOutput off LinearAnalysisInput off RTWStorageClass "Auto" } } Block { BlockType Terminator Name " Terminator " Position [460, 231, 480, 249] } Block { BlockType Outport Name "moveUp" Position [460, 101, 480, 119] Port "1" OutputWhenDisabled "held" InitialOutput "[]" } Block { BlockType Outport Name "moveDown" Position [460, 136, 480, 154] Port "2" OutputWhenDisabled "held" InitialOutput "[]" } Line { SrcBlock " SFunction " SrcPort 1 Points [0, 120] DstBlock " Demux " DstPort 1 } Line { SrcBlock " Demux " SrcPort 1 DstBlock " Terminator " DstPort 1 } Line { SrcBlock "endstop" SrcPort 1 DstBlock " SFunction " DstPort 1 } Line { SrcBlock "obstacle" SrcPort 1 Points [120, 0] DstBlock " SFunction " DstPort 2 } Line { SrcBlock "driver" SrcPort 1 DstBlock " SFunction " DstPort 3 } Line { SrcBlock "passenger" SrcPort 1 DstBlock " SFunction " DstPort 4 } Line { SrcBlock "ticks" SrcPort 1 DstBlock " SFunction " DstPort 5 } Line { Name "moveUp" Labels [0, 0] SrcBlock " SFunction " SrcPort 2 DstBlock "moveUp" DstPort 1 } Line { Name "moveDown" Labels [0, 0] SrcBlock " SFunction " SrcPort 3 DstBlock "moveDown" DstPort 1 } } } Block { BlockType Reference Name "detect_obstacle_endstop" Ports [2, 3] Position [510, 24, 635, 96] Orientation "left" AncestorBlock "salib/detect_obstacle_endstop" SourceBlock "salib/verify_position" SourceType "SubSystem" ShowPortLabels on TreatAsAtomicUnit off RTWSystemCode "Auto" RTWFcnNameOpts "Auto" RTWFileNameOpts "Auto" } Block { BlockType From Name "driver_reset" Position [45, 172, 110, 188] ForegroundColor "darkGreen" CloseFcn "tagdialog Close" GotoTag "reset" } Block { BlockType From Name "passenger_reset" Position [50, 327, 115, 343] ForegroundColor "darkGreen" CloseFcn "tagdialog Close" GotoTag "reset" } Block { BlockType Goto Name "reset" Position [425, 27, 485, 43] Orientation "left" ForegroundColor "darkGreen" GotoTag "reset" TagVisibility "local" } Block { BlockType Outport Name "move_up" Position [685, 158, 715, 172] Port "1" OutputWhenDisabled "held" InitialOutput "[]" } Block { BlockType Outport Name "move_down" Position [685, 208, 715, 222] Port "2" OutputWhenDisabled "held" InitialOutput "[]" } Line { SrcBlock "control" SrcPort 2 DstBlock "move_down" DstPort 1 } Line { SrcBlock "control" SrcPort 1 Points [145, 0] Branch { DstBlock "move_up" DstPort 1 } Branch { Points [0, -85] DstBlock "detect_obstacle_endstop" DstPort 2 } }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -