📄 triggeredsub.mdl
字号:
"ay want to turn the scope crosshair on.\nYou can do this by double clicking o"
"n the block that says Scope Crosshair. This will\nenable a set of crosshairs"
" on the scope so that s you move your mouse you can line\ncorresponding value"
"s up across the plots."
FontName "Arial"
FontSize 12
}
Annotation {
Position [218, 22]
Text "Triggered Subsystem Demonstration"
FontSize 14
FontWeight "bold"
}
}
}
Block {
BlockType SubSystem
Name "More Info1"
Ports []
Position [30, 371, 154, 450]
DropShadow on
ShowName off
OpenFcn "simcad(bdroot);"
FontName "Arial"
FontSize 12
ShowPortLabels on
TreatAsAtomicUnit off
RTWSystemCode "Auto"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "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"
AutoZoom on
}
}
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"
TestPoint off
LinearAnalysisOutput off
LinearAnalysisInput off
RTWStorageClass "Auto"
}
}
Block {
BlockType Scope
Name "Outputs"
Ports [4]
Position [425, 165, 470, 220]
StartFcn "open_system(gcbh)"
FontName "Arial"
FontSize 12
Floating off
Location [528, 53, 1019, 761]
Open on
NumInputPorts "4"
TickLabels "on"
ZoomMode "on"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
axes2 "%<SignalLabel>"
axes3 "%<SignalLabel>"
axes4 "%<SignalLabel>"
}
Grid "on"
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
MaxDataPoints "5000"
Decimation "1"
SampleInput off
SampleTime "0"
}
Block {
BlockType SubSystem
Name "Rising"
Ports [1, 1, 0, 1]
Position [195, 88, 260, 132]
FontName "Arial"
FontSize 12
ShowPortLabels on
TreatAsAtomicUnit on
RTWSystemCode "Auto"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
Port {
PortNumber 1
Name "Rising"
TestPoint off
LinearAnalysisOutput off
LinearAnalysisInput off
RTWStorageClass "Auto"
}
System {
Name "Rising"
Location [284, 341, 468, 454]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
AutoZoom on
Block {
BlockType Inport
Name "In"
Position [20, 68, 50, 82]
Port "1"
Interpolate on
}
Block {
BlockType TriggerPort
Name "Trigger"
Ports []
Position [80, 15, 100, 35]
TriggerType "rising"
ShowOutputPort off
OutputDataType "auto"
}
Block {
BlockType Outport
Name "Out"
Position [130, 68, 160, 82]
Port "1"
OutputWhenDisabled "held"
InitialOutput "0"
}
Line {
SrcBlock "In"
SrcPort 1
DstBlock "Out"
DstPort 1
}
}
}
Block {
BlockType SignalGenerator
Name "Signal Generator"
Position [45, 50, 75, 80]
ForegroundColor "red"
ShowName off
AttributesFormatString "Waveform: %<waveform>\\nFreq: %<Frequency> %<Un"
"its>"
FontName "Arial"
FontSize 12
WaveForm "square"
Amplitude "0.5"
Frequency "1"
Units "Hertz"
VectorParams1D on
}
Block {
BlockType Sin
Name "Sine Wave"
Position [45, 275, 75, 305]
ForegroundColor "orange"
AttributesFormatString "Freq: %<Frequency> rad/sec"
FontName "Arial"
FontSize 12
Amplitude "1"
Frequency "8"
Phase "0"
SampleTime "0"
VectorParams1D on
}
Block {
BlockType SubSystem
Name "SubSystem"
Ports []
Position [480, 172, 576, 220]
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
ShowPortLabels on
TreatAsAtomicUnit off
RTWSystemCode "Auto"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "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"
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"
AutoZoom on
}
}
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 [258, 27]
Text "Triggered Subsystem Demonstration"
FontName "Arial"
FontSize 18
FontWeight "bold"
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -