📄 demo2.mdl
字号:
ShowStatePort off AbsoluteTolerance "auto" IgnoreLimit off ZeroCross on ContinuousStateAttributes "''" } Block { BlockType Mux Inputs "4" DisplayOption "none" UseBusObject off BusObject "BusObject" NonVirtualBus off } Block { BlockType Outport Port "1" UseBusObject off BusObject "BusObject" BusOutputAsStruct off PortDimensions "-1" SampleTime "-1" OutMin "[]" OutMax "[]" DataType "auto" OutDataType "fixdt(1,16,0)" OutScaling "[]" OutDataTypeStr "Inherit: auto" SignalType "auto" SamplingMode "auto" OutputWhenDisabled "held" InitialOutput "[]" } Block { BlockType RateLimiter RisingSlewLimit "1" FallingSlewLimit "-1" SampleTimeMode "continuous" InitialCondition "0" LinearizeAsGain on } Block { BlockType Scope ModelBased off TickLabels "OneTimeTick" ZoomMode "on" Grid "on" TimeRange "auto" YMin "-5" YMax "5" SaveToWorkspace off SaveName "ScopeData" LimitDataPoints on MaxDataPoints "5000" Decimation "1" SampleInput off SampleTime "-1" } Block { BlockType "S-Function" FunctionName "system" SFunctionModules "''" PortCounts "[]" SFunctionDeploymentMode off } Block { BlockType Step Time "1" Before "0" After "1" SampleTime "-1" VectorParams1D on ZeroCross on } Block { BlockType SubSystem ShowPortLabels "FromPortIcon" Permissions "ReadWrite" PermitHierarchicalResolution "All" TreatAsAtomicUnit off CheckFcnCallInpInsideContextMsg off SystemSampleTime "-1" RTWFcnNameOpts "Auto" RTWFileNameOpts "Auto" RTWMemSecFuncInitTerm "Inherit from model" RTWMemSecFuncExecute "Inherit from model" RTWMemSecDataConstants "Inherit from model" RTWMemSecDataInternal "Inherit from model" RTWMemSecDataParameters "Inherit from model" SimViewingDevice off DataTypeOverride "UseLocalSettings" MinMaxOverflowLogging "UseLocalSettings" } Block { BlockType Sum IconShape "rectangular" Inputs "++" CollapseMode "All dimensions" CollapseDim "1" InputSameDT on AccumDataTypeStr "Inherit: Inherit via internal rule" OutMin "[]" OutMax "[]" OutDataTypeMode "Same as first input" OutDataType "fixdt(1,16,0)" OutScaling "[]" OutDataTypeStr "Inherit: Same as first input" LockScale off RndMeth "Floor" SaturateOnIntegerOverflow on SampleTime "-1" } Block { BlockType ToWorkspace VariableName "simulink_output" MaxDataPoints "1000" Decimation "1" SampleTime "0" FixptAsFi off } Block { BlockType Terminator } Block { BlockType Constant Value "1" VectorParams1D on SamplingMode "Sample based" OutMin "[]" OutMax "[]" OutDataTypeMode "Inherit from 'Constant value'" OutDataType "fixdt(1,16,0)" ConRadixGroup "Use specified scaling" OutScaling "[]" OutDataTypeStr "Inherit: Inherit from 'Constant value'" SampleTime "inf" FramePeriod "inf" } } AnnotationDefaults { HorizontalAlignment "center" VerticalAlignment "middle" ForegroundColor "black" BackgroundColor "white" DropShadow off FontName "Helvetica" FontSize 10 FontWeight "normal" FontAngle "normal" UseDisplayTextAsClickCallback off } LineDefaults { FontName "Helvetica" FontSize 9 FontWeight "normal" FontAngle "normal" } System { Name "demo2" Location [746, 65, 1440, 315] Open on ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "portrait" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000] TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" ReportName "simulink-default.rpt" Block { BlockType Gain Name "B" Position [275, 135, 305, 165] ForegroundColor "blue" Gain "20" } Block { BlockType Clock Name "Clock" Position [360, 166, 430, 194] DisplayTime on Decimation "10" } Block { BlockType Constant Name "Constant" Position [25, 105, 55, 135] Value "0" } Block { BlockType Derivative Name "Derivative" Position [225, 135, 255, 165] ForegroundColor "blue" } Block { BlockType Gain Name "K" Position [235, 80, 265, 110] ForegroundColor "blue" Gain "100" } Block { BlockType Reference Name "Model Info" Ports [] Position [9, 199, 176, 244] ShowName off FontName "Arial" SourceBlock "simulink/Model-Wide\nUtilities/Model Info" SourceType "CMBlock" ShowPortLabels "FromPortIcon" SystemSampleTime "-1" FunctionWithSeparateData off RTWMemSecFuncInitTerm "Inherit from model" RTWMemSecFuncExecute "Inherit from model" RTWMemSecDataConstants "Inherit from model" RTWMemSecDataInternal "Inherit from model" RTWMemSecDataParameters "Inherit from model" InitialBlockCM "none" BlockCM "none" Frame "on" DisplayStringWithTags "2-link demo\n%<Creator>\n%<ModifiedDate>" MaskDisplayString "2-link demo\\npic\\nWed Apr 23 21:52:46 2008" HorizontalTextAlignment "Left" LeftAlignmentValue "0.02" SourceBlockDiagram "demo2" TagMaxNumber "20" } Block { BlockType Mux Name "Mux" Ports [3, 1] Position [570, 168, 575, 232] ShowName off Inputs "3" DisplayOption "bar" } Block { BlockType Mux Name "Mux1" Ports [2, 1] Position [130, 45, 135, 145] ShowName off Inputs "2" DisplayOption "bar" Port { PortNumber 1 Name "motor\nposition" PropagatedSignals ", " RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType RateLimiter Name "Rate Limiter" Position [80, 54, 110, 86] RisingSlewLimit "50" FallingSlewLimit "-50" } Block { BlockType Reference Name "Robot" Ports [1, 3] Position [355, 59, 470, 131] BackgroundColor "red" DropShadow on SourceBlock "roblocks/Robot" SourceType "" ShowPortLabels "FromPortIcon" SystemSampleTime "-1" FunctionWithSeparateData off RTWMemSecFuncInitTerm "Inherit from model" RTWMemSecFuncExecute "Inherit from model" RTWMemSecDataConstants "Inherit from model" RTWMemSecDataInternal "Inherit from model" RTWMemSecDataParameters "Inherit from model" robot "tl" q0 "[0 0]" } Block { BlockType Scope Name "Scope" Ports [1] Position [625, 119, 655, 151] Floating off Location [188, 365, 512, 604] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%<SignalLabel>" } YMin "-0.5" YMax "1.5" DataFormat "StructureWithTime" SampleTime "0" } Block { BlockType Step Name "Step" Position [25, 55, 55, 85] SampleTime "0" } Block { BlockType Sum Name "Sum" Ports [2, 1] Position [175, 85, 195, 105] ShowName off IconShape "round" Inputs "-+|" } Block { BlockType Sum Name "Sum1" Ports [2, 1] Position [320, 85, 340, 105] ForegroundColor "blue" ShowName off IconShape "round" Inputs "|++" } Block { BlockType Terminator Name "Terminator" Position [490, 110, 510, 130] ShowName off } Block { BlockType ToWorkspace Name "To Workspace" Position [600, 185, 660, 215] VariableName "simout" MaxDataPoints "inf" SampleTime "-1" SaveFormat "Array" } Block { BlockType Reference Name "plot" Ports [1] Position [575, 42, 655, 98] BackgroundColor "red" SourceBlock "roblocks/plot" SourceType "" ShowPortLabels "FromPortIcon" SystemSampleTime "-1" FunctionWithSeparateData off RTWMemSecFuncInitTerm "Inherit from model" RTWMemSecFuncExecute "Inherit from model" RTWMemSecDataConstants "Inherit from model" RTWMemSecDataInternal "Inherit from model" RTWMemSecDataParameters "Inherit from model" robot "tl" } Line { SrcBlock "Constant" SrcPort 1 DstBlock "Mux1" DstPort 2 } Line { SrcBlock "Step" SrcPort 1 DstBlock "Rate Limiter" DstPort 1 } Line { SrcBlock "Rate Limiter" SrcPort 1 DstBlock "Mux1" DstPort 1 } Line { SrcBlock "Sum" SrcPort 1 Points [5, 0] Branch { DstBlock "K" DstPort 1 } Branch { Points [0, 55] DstBlock "Derivative" DstPort 1 } } Line { SrcBlock "Robot" SrcPort 1 Points [55, 0] Branch { DstBlock "plot" DstPort 1 } Branch { Points [0, -25; -345, 0] DstBlock "Sum" DstPort 1 } Branch { Points [0, 65] Branch { Points [0, 65] DstBlock "Mux" DstPort 2 } Branch { DstBlock "Scope" DstPort 1 } } } Line { SrcBlock "Sum1" SrcPort 1 DstBlock "Robot" DstPort 1 } Line { SrcBlock "K" SrcPort 1 DstBlock "Sum1" DstPort 1 } Line { SrcBlock "B" SrcPort 1 Points [20, 0] DstBlock "Sum1" DstPort 2 } Line { SrcBlock "Derivative" SrcPort 1 DstBlock "B" DstPort 1 } Line { Name "motor\nposition" Labels [0, 0] SrcBlock "Mux1" SrcPort 1 DstBlock "Sum" DstPort 2 } Line { SrcBlock "Mux" SrcPort 1 DstBlock "To Workspace" DstPort 1 } Line { SrcBlock "Clock" SrcPort 1 DstBlock "Mux" DstPort 1 } Line { SrcBlock "Robot" SrcPort 2 Points [45, 0; 0, 125] DstBlock "Mux" DstPort 3 } Line { SrcBlock "Robot" SrcPort 3 DstBlock "Terminator" DstPort 1 } Annotation { Name "2-link robot with flexible transmission" Position [176, 18] FontSize 18 FontWeight "bold" } Annotation { Name "load position" Position [228, 52] } Annotation { Name "transmission comprises\nspring + damper" Position [251, 198] ForegroundColor "blue" } Annotation { Name "assume the motor\nis infinitely \"stiff\"" Position [79, 168] } }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -