📄 ch76.mdl
字号:
Interpolate on
}
Block {
BlockType Outport
Port "1"
BusObject "BusObject"
BusOutputAsStruct off
PortDimensions "-1"
SampleTime "-1"
DataType "auto"
OutDataType "sfix(16)"
OutScaling "2^0"
SignalType "auto"
SamplingMode "auto"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Block {
BlockType Scope
Floating off
ModelBased off
TickLabels "OneTimeTick"
ZoomMode "on"
Grid "on"
TimeRange "auto"
YMin "-5"
YMax "5"
SaveToWorkspace off
SaveName "ScopeData"
LimitDataPoints on
MaxDataPoints "5000"
Decimation "1"
SampleInput off
SampleTime "0"
}
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 Step
Time "1"
Before "0"
After "1"
SampleTime "-1"
VectorParams1D on
ZeroCross on
}
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"
}
}
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 "ch76"
Location [403, 119, 919, 399]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
ReportName "simulink-default.rpt"
Block {
BlockType Scope
Name "Scope"
Ports [5]
Position [465, 132, 495, 258]
Location [97, 209, 585, 643]
Open off
NumInputPorts "5"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
axes2 "%<SignalLabel>"
axes3 "%<SignalLabel>"
axes4 "%<SignalLabel>"
axes5 "%<SignalLabel>"
}
TimeRange "10"
YMin "-1~-1~-1~-1~0"
YMax "1~1~1~1~4.5"
DataFormat "StructureWithTime"
}
Block {
BlockType Sin
Name "Sine Wave"
Ports [0, 1]
Position [125, 135, 155, 165]
SineType "Time based"
Frequency "2"
SampleTime "0"
}
Block {
BlockType Step
Name "Step"
Position [15, 15, 45, 45]
Time "0"
SampleTime "0"
}
Block {
BlockType Step
Name "Step1"
Position [15, 65, 45, 95]
Time "2"
SampleTime "0"
}
Block {
BlockType Step
Name "Step2"
Position [15, 115, 45, 145]
Time "4"
SampleTime "0"
}
Block {
BlockType Step
Name "Step3"
Position [15, 170, 45, 200]
Time "6"
SampleTime "0"
}
Block {
BlockType Sum
Name "Sum"
Ports [4, 1]
Position [80, 23, 100, 67]
ShowName off
Inputs "++++"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType SwitchCase
Name "Switch Case"
Ports [1, 3]
Position [125, 13, 225, 77]
CaseConditions "{1,[2,3]}"
}
Block {
BlockType SubSystem
Name "Switch Case Action\nSubsystem"
Ports [1, 1, 0, 0, 0, 0, 0, 1]
Position [205, 83, 275, 117]
TreatAsAtomicUnit on
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
System {
Name "Switch Case Action\nSubsystem"
Location [280, 236, 592, 352]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [55, 78, 85, 92]
Port "1"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType ActionPort
Name "Action Port"
Position [125, 15, 184, 43]
ActionType "default"
}
Block {
BlockType Outport
Name "Out1"
Position [235, 78, 265, 92]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "Switch Case Action\nSubsystem1"
Ports [1, 1, 0, 0, 0, 0, 0, 1]
Position [275, 133, 345, 167]
TreatAsAtomicUnit on
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
System {
Name "Switch Case Action\nSubsystem1"
Location [237, 279, 548, 377]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [55, 63, 85, 77]
Port "1"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType ActionPort
Name "Action Port"
Position [125, 15, 184, 43]
ActionType "case"
}
Block {
BlockType Outport
Name "Out1"
Position [240, 63, 270, 77]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "Switch Case Action\nSubsystem2"
Ports [1, 1, 0, 0, 0, 0, 0, 1]
Position [350, 183, 420, 217]
TreatAsAtomicUnit on
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
System {
Name "Switch Case Action\nSubsystem2"
Location [319, 422, 817, 722]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [75, 78, 105, 92]
Port "1"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType ActionPort
Name "Action Port"
Position [170, 15, 229, 43]
ActionType "case"
}
Block {
BlockType Outport
Name "Out1"
Position [325, 78, 355, 92]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
}
}
Line {
SrcBlock "Sine Wave"
SrcPort 1
Points [-30, 0; 50, 0]
Branch {
Points [0, -50]
DstBlock "Switch Case Action\nSubsystem"
DstPort 1
}
Branch {
DstBlock "Switch Case Action\nSubsystem1"
DstPort 1
}
Branch {
Points [0, 50]
Branch {
DstBlock "Switch Case Action\nSubsystem2"
DstPort 1
}
Branch {
Points [0, 20]
DstBlock "Scope"
DstPort 4
}
}
}
Line {
SrcBlock "Sum"
SrcPort 1
Points [0, 0]
Branch {
DstBlock "Switch Case"
DstPort 1
}
Branch {
Points [0, 200]
DstBlock "Scope"
DstPort 5
}
}
Line {
SrcBlock "Step"
SrcPort 1
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "Step1"
SrcPort 1
Points [0, -40]
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "Step2"
SrcPort 1
Points [5, 0; 0, -80]
DstBlock "Sum"
DstPort 3
}
Line {
SrcBlock "Step3"
SrcPort 1
Points [10, 0; 0, -125]
DstBlock "Sum"
DstPort 4
}
Line {
SrcBlock "Switch Case"
SrcPort 2
Points [80, 0]
DstBlock "Switch Case Action\nSubsystem1"
DstPort ifaction
}
Line {
SrcBlock "Switch Case"
SrcPort 1
Points [155, 0]
DstBlock "Switch Case Action\nSubsystem2"
DstPort ifaction
}
Line {
SrcBlock "Switch Case Action\nSubsystem2"
SrcPort 1
Points [5, 0; 0, -55]
DstBlock "Scope"
DstPort 1
}
Line {
SrcBlock "Switch Case Action\nSubsystem1"
SrcPort 1
Points [55, 0; 0, 20]
DstBlock "Scope"
DstPort 2
}
Line {
SrcBlock "Switch Case Action\nSubsystem"
SrcPort 1
Points [165, 0; 0, 95]
DstBlock "Scope"
DstPort 3
}
Line {
SrcBlock "Switch Case"
SrcPort 3
Points [10, 0]
DstBlock "Switch Case Action\nSubsystem"
DstPort ifaction
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -