📄 emulation.mdl
字号:
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Constant
Name "Constant"
Position [100, 25, 130, 55]
Value "m"
VectorParams1D on
}
Block {
BlockType Gain
Name "Gain"
Position [120, 85, 150, 115]
Gain "k"
Multiplication "Element-wise(K.*u)"
SaturateOnIntegerOverflow on
}
Block {
BlockType RandomNumber
Name "Random\nNumber"
Position [25, 85, 55, 115]
Mean "0"
Variance "1"
Seed "0"
SampleTime "0"
VectorParams1D on
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [225, 49, 250, 111]
ShowName off
IconShape "rectangular"
Inputs "|++"
SaturateOnIntegerOverflow on
}
Block {
BlockType Outport
Name "Out1"
Position [275, 73, 305, 87]
Port "1"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "Constant"
SrcPort 1
Points [35, 0; 0, 40]
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "Gain"
SrcPort 1
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "Random\nNumber"
SrcPort 1
DstBlock "Gain"
DstPort 1
}
}
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [435, 157, 475, 228]
ShowName off
IconShape "rectangular"
Inputs "++"
SaturateOnIntegerOverflow on
}
Block {
BlockType Outport
Name "Out1"
Position [550, 188, 580, 202]
Port "1"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "Subsystem"
SrcPort 1
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "In1"
SrcPort 1
Points [0, 20]
DstBlock "Sum"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "计数器"
Ports [3, 1]
Position [245, 312, 310, 368]
Orientation "left"
BackgroundColor "cyan"
ShowPortLabels on
TreatAsAtomicUnit off
RTWSystemCode "Auto"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
MaskDisplay "disp('COUNTER')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "计数器"
Location [2, 70, 798, 551]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "darkGreen"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [340, 133, 370, 147]
BackgroundColor "red"
Port "1"
LatchInput off
Interpolate on
}
Block {
BlockType Inport
Name "In2"
Position [340, 168, 370, 182]
BackgroundColor "red"
Port "2"
LatchInput off
Interpolate on
}
Block {
BlockType Inport
Name "In3"
Position [340, 203, 370, 217]
BackgroundColor "red"
Port "3"
LatchInput off
Interpolate on
}
Block {
BlockType SubSystem
Name "Subsystem"
Ports [3, 1]
Position [440, 125, 490, 225]
BackgroundColor "blue"
ShowPortLabels on
TreatAsAtomicUnit off
RTWSystemCode "Auto"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
System {
Name "Subsystem"
Location [67, 104, 757, 441]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "darkGreen"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [45, 83, 75, 97]
BackgroundColor "red"
Port "1"
LatchInput off
Interpolate on
}
Block {
BlockType Inport
Name "In3"
Position [255, 98, 285, 112]
BackgroundColor "red"
Port "2"
LatchInput off
Interpolate on
}
Block {
BlockType Inport
Name "In2"
Position [25, 208, 55, 222]
BackgroundColor "red"
Port "3"
LatchInput off
Interpolate on
}
Block {
BlockType Constant
Name "Constant"
Position [75, 120, 105, 150]
BackgroundColor "yellow"
Value "0"
VectorParams1D on
}
Block {
BlockType Ground
Name "Ground"
Position [415, 25, 435, 45]
BackgroundColor "lightBlue"
}
Block {
BlockType Memory
Name "Memory"
Position [385, 280, 415, 310]
Orientation "left"
BackgroundColor "magenta"
X0 "0"
InheritSampleTime off
RTWStateStorageClass "Auto"
}
Block {
BlockType RelationalOperator
Name "Relational\nOperator"
Position [145, 112, 175, 143]
BackgroundColor "lightBlue"
Operator ">"
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [265, 158, 295, 222]
BackgroundColor "lightBlue"
ShowName off
IconShape "rectangular"
Inputs "++"
SaturateOnIntegerOverflow on
}
Block {
BlockType Switch
Name "Switch"
Position [370, 225, 400, 255]
BackgroundColor "lightBlue"
Threshold "0"
}
Block {
BlockType Switch
Name "Switch1"
Position [535, 150, 565, 180]
BackgroundColor "lightBlue"
Threshold "0"
}
Block {
BlockType SubSystem
Name "edge detector"
Ports [1, 1]
Position [100, 195, 185, 235]
BackgroundColor "blue"
ShowPortLabels on
TreatAsAtomicUnit off
RTWSystemCode "Auto"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
System {
Name "edge detector"
Location [2, 74, 790, 555]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [135, 78, 165, 92]
Port "1"
LatchInput off
Interpolate on
}
Block {
BlockType Constant
Name "Constant"
Position [185, 235, 215, 265]
Value "0"
VectorParams1D on
}
Block {
BlockType Memory
Name "Memory"
Position [315, 165, 345, 195]
X0 "0"
InheritSampleTime off
RTWStateStorageClass "Auto"
}
Block {
BlockType RelationalOperator
Name "Relational\nOperator"
Position [315, 77, 345, 108]
Operator ">="
}
Block {
BlockType RelationalOperator
Name "Relational\nOperator1"
Position [440, 172, 470, 203]
Operator ">="
}
Block {
BlockType RelationalOperator
Name "Relational\nOperator2"
Position [525, 87, 555, 118]
Operator ">"
}
Block {
BlockType Outport
Name "Out1"
Position [605, 98, 635, 112]
Port "1"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Line {
SrcBlock "In1"
SrcPort 1
Points [35, 0]
Branch {
DstBlock "Relational\nOperator"
DstPort 1
}
Branch {
Points [0, 95]
DstBlock "Memory"
DstPort 1
}
}
Line {
SrcBlock "Memory"
SrcPort 1
DstBlock "Relational\nOperator1"
DstPort 1
}
Line {
SrcBlock "Constant"
SrcPort 1
Points [30, 0]
Branch {
Points [175, 0]
DstBlock "Relational\nOperator1"
DstPort 2
}
Branch {
Points [0, -150]
DstBlock "Relational\nOperator"
DstPort 2
}
}
Line {
SrcBlock "Relational\nOperator"
SrcPort 1
DstBlock "Relational\nOperator2"
DstPort 1
}
Line {
SrcBlock "Relational\nOperator1"
SrcPort 1
Points [15, 0; 0, -80]
DstBlock "Relational\nOperator2"
DstPort 2
}
Line {
SrcBlock "Relational\nOperator2"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "edge detector1"
Ports [1, 1]
Position [330, 85, 415, 125]
BackgroundColor "blue"
ShowPortLabels on
TreatAsAtomicUnit off
RTWSystemCode "Auto"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
System {
Name "edge detector1"
Location [2, 74, 790, 555]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [135, 78, 165, 92]
Port "1"
LatchInput off
Interpolate on
}
Block {
BlockType Constant
Name "Constant"
Position [185, 235, 215, 265]
Value "0"
VectorParams1D on
}
Block {
BlockType Memory
Name "Memory"
Position [315, 165, 345, 195]
X0 "0"
InheritSampleTime off
RTWStateStorageClass "Auto"
}
Block {
BlockType RelationalOperator
Name "Relational\nOperator"
Position [315, 77, 345, 108]
Operator ">="
}
Block {
BlockType RelationalOperator
Name "Relational\nOperator1"
Position [440, 172, 470, 203]
Operator ">="
}
Block {
BlockType RelationalOperator
Name "Relational\nOperator2"
Position [525, 87, 555, 118]
Operator ">"
}
Block {
BlockType Outport
Name "Out1"
Position [605, 98, 635, 112]
Port "1"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Line {
SrcBlock "In1"
SrcPort 1
Points [35, 0]
Branch {
DstBlock "Relational\nOperator"
DstPort 1
}
Branch {
Points [0, 95]
DstBlock "Memory"
DstPort 1
}
}
Line {
SrcBlock "Memory"
SrcPort 1
DstBlock "Relational\nOperator1"
DstPort 1
}
Line {
SrcBlock "Constant"
SrcPort 1
Points [30, 0]
Branch {
Points [175, 0]
DstBlock "Relational\nOperator1"
DstPort 2
}
Branch {
Points [0, -150]
DstBlock "Relational\nOperator"
DstPort 2
}
}
Line {
SrcBlock "Relational\nOperator"
SrcPort 1
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -