📄 twolinks.mdl
字号:
}
Block {
BlockType SubSystem
ShowPortLabels on
Permissions "ReadWrite"
PermitHierarchicalResolution "All"
SystemSampleTime "-1"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
SimViewingDevice off
DataTypeOverride "UseLocalSettings"
MinMaxOverflowLogging "UseLocalSettings"
}
Block {
BlockType Sum
IconShape "rectangular"
Inputs "++"
InputSameDT on
OutDataTypeMode "Same as first input"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
RndMeth "Floor"
SaturateOnIntegerOverflow on
SampleTime "-1"
}
Block {
BlockType ToWorkspace
VariableName "simulink_output"
MaxDataPoints "1000"
Decimation "1"
SampleTime "0"
FixptAsFi off
}
}
AnnotationDefaults {
HorizontalAlignment "center"
VerticalAlignment "middle"
ForegroundColor "black"
BackgroundColor "white"
DropShadow off
FontName "Helvetica"
FontSize 10
FontWeight "normal"
FontAngle "normal"
}
LineDefaults {
FontName "Helvetica"
FontSize 9
FontWeight "normal"
FontAngle "normal"
}
System {
Name "twolinks"
Location [2, 78, 1022, 717]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "111"
ReportName "simulink-default.rpt"
Block {
BlockType Demux
Name "Demux"
Ports [1, 5]
Position [475, 238, 480, 462]
BackgroundColor "black"
ShowName off
Outputs "5"
DisplayOption "bar"
}
Block {
BlockType Scope
Name "ERROR"
Ports [1]
Position [555, 469, 585, 501]
Floating off
Location [1, 52, 1017, 729]
Open off
NumInputPorts "1"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
SaveName "ScopeData2"
DataFormat "StructureWithTime"
SampleTime "0"
}
Block {
BlockType Mux
Name "Mux"
Ports [8, 1]
Position [330, 242, 335, 453]
ShowName off
Inputs "8"
DisplayOption "bar"
}
Block {
BlockType Mux
Name "Mux1"
Ports [2, 1]
Position [785, 329, 790, 416]
ShowName off
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType "S-Function"
Name "S-Function"
Ports [1, 1]
Position [375, 335, 435, 365]
FunctionName "robot"
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [190, 345, 220, 375]
ShowName off
IconShape "round"
Inputs "-|+||"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Sum
Name "Sum1"
Ports [2, 1]
Position [130, 395, 160, 425]
ShowName off
IconShape "round"
Inputs "-|+||"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Scope
Name "THETA-1"
Ports [1]
Position [795, 244, 825, 276]
Floating off
Location [1, 52, 1017, 729]
Open off
NumInputPorts "1"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
DataFormat "StructureWithTime"
SampleTime "0"
}
Block {
BlockType Scope
Name "THETA-2"
Ports [1]
Position [795, 289, 825, 321]
Floating off
Location [1, 52, 1017, 729]
Open off
NumInputPorts "1"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
SaveName "ScopeData1"
DataFormat "StructureWithTime"
SampleTime "0"
}
Block {
BlockType ToWorkspace
Name "To Workspace"
Position [850, 360, 910, 390]
VariableName "simout"
MaxDataPoints "inf"
SampleTime "-1"
SaveFormat "Array"
}
Block {
BlockType Reference
Name "XY Graph"
Ports [2]
Position [810, 440, 840, 475]
SourceBlock "simulink/Sinks/XY Graph"
SourceType "XY scope."
ShowPortLabels on
xmin "-2.0"
xmax "1.5"
ymin "-2.0"
ymax "1.0"
st "-1"
}
Block {
BlockType Gain
Name "damping-1"
Position [165, 185, 195, 215]
Gain "2"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Gain
Name "damping-2"
Position [105, 235, 135, 265]
Gain "2"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Integrator
Name "omega-1"
Ports [1, 1]
Position [595, 245, 625, 275]
IgnoreLimit off
Port {
PortNumber 1
Name "omega-1"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
}
Block {
BlockType Integrator
Name "omega-2"
Ports [1, 1]
Position [595, 290, 625, 320]
IgnoreLimit off
}
Block {
BlockType Integrator
Name "pl-x"
Ports [1, 1]
Position [690, 335, 720, 365]
InitialCondition "1.0"
IgnoreLimit off
Port {
PortNumber 1
Name "x"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
}
Block {
BlockType Integrator
Name "pl-x-det"
Ports [1, 1]
Position [595, 335, 625, 365]
IgnoreLimit off
}
Block {
BlockType Integrator
Name "pl-y"
Ports [1, 1]
Position [690, 380, 720, 410]
InitialCondition "0.8"
IgnoreLimit off
Port {
PortNumber 1
Name "y"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
}
Block {
BlockType Integrator
Name "pl-y-det"
Ports [1, 1]
Position [595, 380, 625, 410]
IgnoreLimit off
}
Block {
BlockType Integrator
Name "theta-1"
Ports [1, 1]
Position [690, 245, 720, 275]
IgnoreLimit off
Port {
PortNumber 1
Name "theta-1"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
}
Block {
BlockType Integrator
Name "theta-2"
Ports [1, 1]
Position [690, 290, 720, 320]
InitialCondition "pi/2"
IgnoreLimit off
Port {
PortNumber 1
Name "theta-2"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
}
Block {
BlockType Constant
Name "torque-1"
Position [50, 345, 80, 375]
Value "0"
}
Block {
BlockType Constant
Name "torque-2"
Position [50, 395, 80, 425]
Value "0"
}
Block {
BlockType Outport
Name "error"
Position [555, 433, 585, 447]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "S-Function"
DstPort 1
}
Line {
SrcBlock "S-Function"
SrcPort 1
DstBlock "Demux"
DstPort 1
}
Line {
SrcBlock "Demux"
SrcPort 1
DstBlock "omega-1"
DstPort 1
}
Line {
Name "omega-1"
Labels [0, 0]
SrcBlock "omega-1"
SrcPort 1
Points [15, 0]
Branch {
DstBlock "theta-1"
DstPort 1
}
Branch {
Points [0, -105; -380, 0]
Branch {
Labels [2, 0]
Points [0, 105]
DstBlock "Mux"
DstPort 1
}
Branch {
Points [-115, 0]
DstBlock "damping-1"
DstPort 1
}
}
}
Line {
SrcBlock "Demux"
SrcPort 2
DstBlock "omega-2"
DstPort 1
}
Line {
SrcBlock "omega-2"
SrcPort 1
Points [30, 0]
Branch {
DstBlock "theta-2"
DstPort 1
}
Branch {
Points [0, -180; -425, 0]
Branch {
Points [0, 185]
DstBlock "Mux"
DstPort 3
}
Branch {
Points [-145, 0]
DstBlock "damping-2"
DstPort 1
}
}
}
Line {
SrcBlock "Demux"
SrcPort 3
DstBlock "pl-x-det"
DstPort 1
}
Line {
SrcBlock "pl-x-det"
SrcPort 1
DstBlock "pl-x"
DstPort 1
}
Line {
SrcBlock "Demux"
SrcPort 4
DstBlock "pl-y-det"
DstPort 1
}
Line {
SrcBlock "pl-y-det"
SrcPort 1
DstBlock "pl-y"
DstPort 1
}
Line {
Name "y"
Labels [0, 0]
SrcBlock "pl-y"
SrcPort 1
Points [15, 0]
Branch {
DstBlock "Mux1"
DstPort 2
}
Branch {
Points [0, 70]
Branch {
DstBlock "XY Graph"
DstPort 2
}
Branch {
Points [0, 55; -465, 0; 0, -85]
DstBlock "Mux"
DstPort 8
}
}
}
Line {
Name "theta-1"
Labels [0, 0]
SrcBlock "theta-1"
SrcPort 1
Points [20, 0]
Branch {
DstBlock "THETA-1"
DstPort 1
}
Branch {
Labels [4, 0]
Points [0, -120; -495, 0; 0, 145]
DstBlock "Mux"
DstPort 2
}
}
Line {
Name "theta-2"
Labels [0, 0]
SrcBlock "theta-2"
SrcPort 1
Points [35, 0]
Branch {
DstBlock "THETA-2"
DstPort 1
}
Branch {
Labels [4, 0]
Points [0, -195; -540, 0; 0, 225]
DstBlock "Mux"
DstPort 4
}
}
Line {
SrcBlock "damping-1"
SrcPort 1
Points [5, 0]
DstBlock "Sum"
DstPort 1
}
Line {
Labels [0, 0]
SrcBlock "Sum"
SrcPort 1
DstBlock "Mux"
DstPort 5
}
Line {
SrcBlock "torque-1"
SrcPort 1
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "damping-2"
SrcPort 1
Points [5, 0]
DstBlock "Sum1"
DstPort 1
}
Line {
SrcBlock "torque-2"
SrcPort 1
DstBlock "Sum1"
DstPort 2
}
Line {
SrcBlock "Sum1"
SrcPort 1
Points [75, 0; 0, -25]
DstBlock "Mux"
DstPort 6
}
Line {
SrcBlock "Demux"
SrcPort 5
Points [25, 0]
Branch {
DstBlock "error"
DstPort 1
}
Branch {
Points [0, 45]
DstBlock "ERROR"
DstPort 1
}
}
Line {
Name "x"
Labels [0, 0]
SrcBlock "pl-x"
SrcPort 1
Points [35, 0]
Branch {
DstBlock "Mux1"
DstPort 1
}
Branch {
Points [0, 100]
Branch {
DstBlock "XY Graph"
DstPort 1
}
Branch {
Points [0, 85; -500, 0; 0, -125]
DstBlock "Mux"
DstPort 7
}
}
}
Line {
SrcBlock "Mux1"
SrcPort 1
DstBlock "To Workspace"
DstPort 1
}
Annotation {
Name "omega-2"
Position [280, 301]
UseDisplayTextAsClickCallback off
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -