📄 ifsub.mdl
字号:
FontName "Helvetica"
FontSize 14
FontWeight "bold"
}
}
}
Block {
BlockType SubSystem
Name "More Info1"
Ports []
Position [20, 360, 145, 440]
DropShadow on
ShowName off
OpenFcn "simcad(bdroot);"
FontName "Helvetica"
FontSize 10
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
PropExecContextAcrossSSBoundary on
RTWSystemCode "Auto"
MaskDisplay "disp('Double click\\nhere for\\nSimulink Help')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "More Info1"
Location [128, 280, 487, 453]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
}
}
Block {
BlockType Mux
Name "Mux"
Ports [2, 1]
Position [430, 71, 435, 109]
ShowName off
FontName "Helvetica"
FontSize 10
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType Mux
Name "Mux1"
Ports [2, 1]
Position [430, 251, 435, 289]
ShowName off
FontName "Helvetica"
FontSize 10
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType DiscretePulseGenerator
Name "Pulse\nGenerator"
Ports [0, 1]
Position [75, 188, 110, 212]
ShowName off
AttributesFormatString "Period: %<period>\\nDuty cycle: %<pulsewidth>%"
FontName "Helvetica"
FontSize 10
PulseType "Time based"
Period "5"
PulseWidth "50"
Port {
PortNumber 1
Name "Input Signal"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
ShowSigGenPortName on
}
}
Block {
BlockType SubSystem
Name "Saturation between -0.75 and 0.75\nOutput held"
Ports [1, 1, 0, 0, 0, 0, 0, 1]
Position [285, 239, 365, 281]
FontName "Helvetica"
FontSize 10
TreatAsAtomicUnit on
MinAlgLoopOccurrences off
PropExecContextAcrossSSBoundary on
RTWSystemCode "Auto"
Port {
PortNumber 1
Name "Saturation - Output Held"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
ShowSigGenPortName on
}
System {
Name "Saturation between -0.75 and 0.75\nOutput hel"
"d"
Location [108, 659, 375, 794]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "In"
Position [25, 73, 55, 87]
FontName "Helvetica"
FontSize 10
Port "1"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType ActionPort
Name "Action"
Position [25, 15, 99, 36]
ActionType "else"
}
Block {
BlockType Saturate
Name "Saturation"
Position [105, 65, 135, 95]
FontName "Helvetica"
FontSize 10
UpperLimit "0.75"
LowerLimit "-0.75"
}
Block {
BlockType Outport
Name "Out"
Position [195, 73, 225, 87]
FontName "Helvetica"
FontSize 10
IconDisplay "Port number"
}
Line {
SrcBlock "Saturation"
SrcPort 1
DstBlock "Out"
DstPort 1
}
Line {
SrcBlock "In"
SrcPort 1
DstBlock "Saturation"
DstPort 1
}
}
}
Block {
BlockType Scope
Name "Scope"
Ports [3]
Position [535, 170, 570, 210]
ShowName off
StartFcn "open_system(gcbh)"
FontName "Helvetica"
FontSize 10
Location [668, 86, 1158, 787]
Open on
NumInputPorts "3"
TickLabels "on"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
axes2 "%<SignalLabel>"
axes3 "%<SignalLabel>"
}
TimeRange "10"
YMin "-1.6~-0.1~-1.5"
YMax "3.6~1.1~3.5"
DataFormat "Structure"
}
Block {
BlockType Sin
Name "Sine Wave"
Ports [0, 1]
Position [15, 122, 40, 148]
ShowName off
FontName "Helvetica"
FontSize 10
SineType "Time based"
SampleTime "0"
Port {
PortNumber 1
Name "Sin Wave"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
ShowSigGenPortName on
}
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [455, 80, 475, 100]
ShowName off
FontName "Helvetica"
FontSize 10
IconShape "round"
Inputs "++|"
Port {
PortNumber 1
Name "Output Reset"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
ShowSigGenPortName on
}
}
Block {
BlockType Sum
Name "Sum1"
Ports [2, 1]
Position [455, 260, 475, 280]
ShowName off
FontName "Helvetica"
FontSize 10
IconShape "round"
Inputs "|++"
Port {
PortNumber 1
Name "Output Held"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
ShowSigGenPortName on
}
}
Line {
Name "Sin Wave"
FontName "Helvetica"
FontSize 9
SrcBlock "Sine Wave"
SrcPort 1
Points [15, 0]
Branch {
Labels [1, 0]
DstBlock "Abs\nOutput Reset"
DstPort 1
}
Branch {
Points [0, -55]
DstBlock "Mux"
DstPort 1
}
Branch {
Points [0, 125]
Branch {
DstBlock "Saturation between -0.75 and 0.75\nOutput h"
"eld"
DstPort 1
}
Branch {
Points [0, 60; 345, 0; 0, -40]
DstBlock "Mux1"
DstPort 2
}
}
}
Line {
Name "Saturation - Output Held"
FontName "Helvetica"
FontSize 9
SrcBlock "Saturation between -0.75 and 0.75\nOutput held"
SrcPort 1
DstBlock "Mux1"
DstPort 1
}
Line {
SrcBlock "Constant"
SrcPort 1
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "Abs\nOutput Reset"
SrcPort 1
Points [30, 0; 0, -35]
DstBlock "Mux"
DstPort 2
}
Line {
Name "Output Reset"
FontName "Helvetica"
FontSize 9
Labels [0, 1]
SrcBlock "Sum"
SrcPort 1
Points [15, 0; 0, 85]
DstBlock "Scope"
DstPort 1
}
Line {
SrcBlock "Mux1"
SrcPort 1
DstBlock "Sum1"
DstPort 1
}
Line {
SrcBlock "Constant1"
SrcPort 1
DstBlock "Sum1"
DstPort 2
}
Line {
Name "Output Held"
FontName "Helvetica"
FontSize 9
Labels [0, 0]
SrcBlock "Sum1"
SrcPort 1
Points [15, 0; 0, -65]
DstBlock "Scope"
DstPort 3
}
Line {
Name "Input Signal"
Labels [0, 0]
SrcBlock "Pulse\nGenerator"
SrcPort 1
Points [35, 0]
Branch {
DstBlock "If"
DstPort 1
}
Branch {
Points [1, 0; 0, -35; 214, 0; 0, 25]
DstBlock "Scope"
DstPort 2
}
}
Line {
SrcBlock "If"
SrcPort 2
Points [25, 0]
DstBlock "Saturation between -0.75 and 0.75\nOutput held"
DstPort ifaction
}
Line {
SrcBlock "If"
SrcPort 1
Points [25, 0]
DstBlock "Abs\nOutput Reset"
DstPort ifaction
}
Annotation {
Name "If Block Demonstration"
Position [278, 17]
FontName "Helvetica"
FontSize 18
FontWeight "bold"
}
Annotation {
Name " "
Position [398, 183]
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -