📄 sim35.mdl
字号:
VectorParams1D on
}
Block {
BlockType Sin
SineType "Time based"
TimeSource "Use simulation time"
Amplitude "1"
Bias "0"
Frequency "1"
Phase "0"
Samples "10"
Offset "0"
SampleTime "-1"
VectorParams1D on
}
Block {
BlockType SubSystem
ShowPortLabels on
Permissions "ReadWrite"
PermitHierarchicalResolution "All"
SystemSampleTime "-1"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
SimViewingDevice off
DataTypeOverride "UseLocalSettings"
MinMaxOverflowLogging "UseLocalSettings"
}
Block {
BlockType TriggerPort
TriggerType "rising"
StatesWhenEnabling "inherit"
ShowOutputPort off
OutputDataType "auto"
SampleTimeType "triggered"
SampleTime "1"
ZeroCross on
}
}
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 "Sim35"
Location [2, 78, 1022, 717]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
ReportName "simulink-default.rpt"
Block {
BlockType SubSystem
Name "Either"
Ports [1, 1, 0, 1]
Position [195, 267, 265, 313]
FontName "Arial"
FontSize 12
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
Port {
PortNumber 1
Name "Either"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
ShowSigGenPortName on
}
System {
Name "Either"
Location [282, 339, 472, 461]
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]
Port "1"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType TriggerPort
Name "Trigger"
Ports []
Position [85, 15, 105, 35]
TriggerType "either"
}
Block {
BlockType Outport
Name "Out"
Position [135, 73, 165, 87]
IconDisplay "Port number"
BusOutputAsStruct off
InitialOutput "0"
}
Line {
SrcBlock "In"
SrcPort 1
DstBlock "Out"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "Falling"
Ports [1, 1, 0, 1]
Position [195, 178, 265, 222]
FontName "Arial"
FontSize 12
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
Port {
PortNumber 1
Name "Falling"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
ShowSigGenPortName on
}
System {
Name "Falling"
Location [282, 339, 472, 461]
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]
Port "1"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType TriggerPort
Name "Trigger"
Ports []
Position [85, 15, 105, 35]
TriggerType "falling"
}
Block {
BlockType Outport
Name "Out"
Position [135, 73, 165, 87]
IconDisplay "Port number"
BusOutputAsStruct off
InitialOutput "0"
}
Line {
SrcBlock "In"
SrcPort 1
DstBlock "Out"
DstPort 1
}
}
}
Block {
BlockType Ground
Name "Ground"
Position [341, 90, 359, 105]
Orientation "up"
ShowName off
FontName "Arial"
FontSize 12
}
Block {
BlockType Mux
Name "Mux1"
Ports [3, 1]
Position [380, 56, 385, 94]
ShowName off
FontName "Arial"
FontSize 12
Inputs "3"
DisplayOption "bar"
Port {
PortNumber 1
Name "Source & Trigger"
PropagatedSignals ", , "
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
ShowSigGenPortName on
}
}
Block {
BlockType Scope
Name "Outputs"
Ports [4]
Position [425, 165, 470, 220]
StartFcn "open_system(gcbh)"
FontName "Arial"
FontSize 12
Location [133, 36, 624, 744]
Open off
NumInputPorts "4"
TickLabels "on"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
axes2 "%<SignalLabel>"
axes3 "%<SignalLabel>"
axes4 "%<SignalLabel>"
}
TimeRange "8"
YMin "-1.5~-1.5~-1.5~-1.5"
YMax "1.5~1.5~1.5~1.5"
SaveToWorkspace on
SaveName "trigsubdata"
DataFormat "Structure"
LimitDataPoints off
}
Block {
BlockType SubSystem
Name "Rising"
Ports [1, 1, 0, 1]
Position [195, 88, 260, 132]
FontName "Arial"
FontSize 12
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
Port {
PortNumber 1
Name "Rising"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
ShowSigGenPortName on
}
System {
Name "Rising"
Location [284, 284, 468, 454]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "In"
Position [20, 68, 50, 82]
Port "1"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType TriggerPort
Name "Trigger"
Ports []
Position [80, 15, 100, 35]
}
Block {
BlockType Outport
Name "Out"
Position [130, 68, 160, 82]
IconDisplay "Port number"
BusOutputAsStruct off
InitialOutput "0"
}
Line {
SrcBlock "In"
SrcPort 1
DstBlock "Out"
DstPort 1
}
}
}
Block {
BlockType SignalGenerator
Name "Signal Generator"
Ports [0, 1]
Position [45, 50, 75, 80]
ShowName off
AttributesFormatString "Waveform: %<waveform>\\nFreq: %<Frequency> %<Un"
"its>"
FontName "Arial"
FontSize 12
WaveForm "square"
Amplitude "0.5"
}
Block {
BlockType Sin
Name "Sine Wave"
Ports [0, 1]
Position [45, 275, 75, 305]
AttributesFormatString "Freq: %<Frequency> rad/sec"
FontName "Arial"
FontSize 12
SineType "Time based"
Frequency "8"
SampleTime "0"
}
Block {
BlockType SubSystem
Name "SubSystem"
Ports []
Position [565, 222, 661, 270]
NamePlacement "alternate"
ShowName off
OpenFcn "if strcmp(get_param(gcb,'sch'),'on'),val='off';"
"else,val='on';end;set_param(gcb,'sch',val)"
FontName "Arial"
FontSize 12
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskType "Scope Crosshair"
MaskDescription "Turn on/off the crosshair pointer on the scope "
"named Outputs."
MaskPromptString "Scope crosshair"
MaskStyleString "checkbox"
MaskTunableValueString "on"
MaskEnableString "on"
MaskVisibilityString "on"
MaskToolTipString "on"
MaskVariables "sch=&1;"
MaskInitialization "f=get_param([gcs '/Outputs'],'Figure');\nif str"
"cmp(sch,'on'),\n ptr='fullcrosshair';\nelse,\n ptr= 'arrow';\nend\nset(f,'p"
"ointer',ptr)\n"
MaskDisplay "disp(['Scope\\nCrosshair\\n' sch])"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "off"
System {
Name "SubSystem"
Location [146, 180, 902, 673]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
}
}
Line {
SrcBlock "Signal Generator"
SrcPort 1
Points [50, 0]
Branch {
Points [95, 0]
Branch {
DstBlock "Rising"
DstPort trigger
}
Branch {
DstBlock "Mux1"
DstPort 1
}
}
Branch {
Points [0, 95]
Branch {
Points [0, 87; 100, 0]
DstBlock "Either"
DstPort trigger
}
Branch {
Points [100, 0]
DstBlock "Falling"
DstPort trigger
}
}
}
Line {
SrcBlock "Sine Wave"
SrcPort 1
Points [85, 0]
Branch {
Points [0, -90]
Branch {
DstBlock "Falling"
DstPort 1
}
Branch {
Points [0, -90]
DstBlock "Rising"
DstPort 1
}
}
Branch {
DstBlock "Either"
DstPort 1
}
Branch {
Points [0, 45; 165, 0; 0, -260]
DstBlock "Mux1"
DstPort 2
}
}
Line {
SrcBlock "Ground"
SrcPort 1
DstBlock "Mux1"
DstPort 3
}
Line {
Name "Rising"
FontName "Arial"
FontSize 12
Labels [0, 1]
SrcBlock "Rising"
SrcPort 1
Points [125, 0; 0, 75]
DstBlock "Outputs"
DstPort 2
}
Line {
Name "Falling"
FontName "Arial"
FontSize 12
Labels [0, 1]
SrcBlock "Falling"
SrcPort 1
DstBlock "Outputs"
DstPort 3
}
Line {
Name "Either"
FontName "Arial"
FontSize 12
Labels [0, 0]
SrcBlock "Either"
SrcPort 1
Points [120, 0; 0, -75]
DstBlock "Outputs"
DstPort 4
}
Line {
Name "Source & Trigger"
FontName "Arial"
FontSize 12
SrcBlock "Mux1"
SrcPort 1
Points [15, 0; 0, 95]
DstBlock "Outputs"
DstPort 1
}
Annotation {
Position [535, 78]
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -