📄 sf_intro_example.mdl
字号:
Model {
Name "sf_intro_example"
Version 3.00
SimParamPage "Solver"
SampleTimeColors off
InvariantConstants off
WideVectorLines off
ShowLineWidths off
ShowPortDataTypes off
StartTime "0.0"
StopTime "inf"
SolverMode "Auto"
Solver "ode45"
RelTol "1e-3"
AbsTol "auto"
Refine "1"
MaxStep "auto"
InitialStep "auto"
FixedStep "auto"
MaxOrder 5
OutputOption "RefineOutputTimes"
OutputTimes "[]"
LoadExternalInput off
ExternalInput "[t, u]"
SaveTime on
TimeSaveName "tout"
SaveState off
StateSaveName "xout"
SaveOutput on
OutputSaveName "yout"
LoadInitialState off
InitialState "xInitial"
SaveFinalState off
FinalStateName "xFinal"
SaveFormat "Matrix"
LimitMaxRows off
MaxRows "1000"
Decimation "1"
AlgebraicLoopMsg "warning"
MinStepSizeMsg "warning"
UnconnectedInputMsg "warning"
UnconnectedOutputMsg "warning"
UnconnectedLineMsg "warning"
InheritedTsInSrcMsg "warning"
IntegerOverflowMsg "warning"
UnnecessaryDatatypeConvMsg "none"
Int32ToFloatConvMsg "warning"
SignalLabelMismatchMsg "none"
ConsistencyChecking "off"
ZeroCross on
SimulationMode "normal"
BlockDataTips on
BlockParametersDataTip on
BlockAttributesDataTip off
BlockPortWidthsDataTip off
BlockDescriptionStringDataTip off
BlockMaskParametersDataTip off
ToolBar on
StatusBar on
BrowserShowLibraryLinks off
BrowserLookUnderMasks off
OptimizeBlockIOStorage on
BufferReuse on
BooleanDataType off
RTWSystemTargetFile "grt.tlc"
RTWInlineParameters off
RTWRetainRTWFile off
RTWTemplateMakefile "grt_default_tmf"
RTWMakeCommand "make_rtw"
RTWGenerateCodeOnly off
ExtModeMexFile "ext_comm"
ExtModeBatchMode off
ExtModeTrigType "manual"
ExtModeTrigMode "oneshot"
ExtModeTrigPort "1"
ExtModeTrigElement "any"
ExtModeTrigDuration 1000
ExtModeTrigHoldOff 0
ExtModeTrigDelay 0
ExtModeTrigDirection "rising"
ExtModeTrigLevel 0
ExtModeArchiveMode "off"
ExtModeAutoIncOneShot off
ExtModeIncDirWhenArm off
ExtModeAddSuffixToVar off
ExtModeWriteAllDataToWs off
ExtModeArmWhenConnect off
Created "Wed Jan 20 14:37:56 1999"
UpdateHistory "UpdateHistoryNever"
ModifiedByFormat "%<Auto>"
LastModifiedBy "pgoddard"
ModifiedDateFormat "%<Auto>"
LastModifiedDate "Wed Mar 10 08:23:54 1999"
ModelVersionFormat "1.%<AutoIncrement:4>"
ConfigurationManager "none"
BlockDefaults {
Orientation "right"
ForegroundColor "black"
BackgroundColor "white"
DropShadow off
NamePlacement "normal"
FontName "Helvetica"
FontSize 10
FontWeight "normal"
FontAngle "normal"
ShowName 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 "sf_intro_example"
Location [31, 83, 368, 216]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "automatic"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
AutoZoom on
ReportName "simulink-default.rpt"
Block {
BlockType Sin
Name "Event"
Position [105, 20, 135, 50]
Amplitude "1"
Frequency "1"
Phase "0"
SampleTime "0"
}
Block {
BlockType SubSystem
Name "On_Off"
Ports [0, 0, 0, 1, 0]
Position [165, 54, 225, 106]
ShowPortLabels on
MaskType "Stateflow"
MaskDescription "Stateflow diagram"
MaskDisplay "plot(sf('Private','sfblk','xIcon'),sf('Private'"
",'sfblk','yIcon'));text(0.5,0,sf('Private', 'sfblk', 'tIcon'),'HorizontalAl',"
"'Center','VerticalAl','Bottom');"
MaskSelfModifiable on
MaskIconFrame off
MaskIconOpaque off
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "On_Off"
Location [257, 457, 812, 717]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
AutoZoom on
Block {
BlockType TriggerPort
Name "Switch"
Ports [0, 1, 0, 0, 0]
Position [20, 101, 40, 119]
TriggerType "rising"
ShowOutputPort on
OutputDataType "auto"
}
Block {
BlockType Demux
Name " Demux "
Ports [1, 1, 0, 0, 0]
Position [270, 100, 320, 140]
Outputs "1"
}
Block {
BlockType "S-Function"
Name " SFunction "
Tag "Stateflow S-Function sf_intro_example 1"
Ports [1, 1, 0, 0, 0]
Position [180, 100, 230, 140]
FunctionName "sf_sfun"
PortCounts "[1 1]"
SFunctionModules "''"
}
Block {
BlockType Terminator
Name " Terminator "
Position [460, 111, 480, 129]
}
Line {
SrcBlock " Demux "
SrcPort 1
DstBlock " Terminator "
DstPort 1
}
Line {
SrcBlock " SFunction "
SrcPort 1
DstBlock " Demux "
DstPort 1
}
Line {
SrcBlock "Switch"
SrcPort 1
DstBlock " SFunction "
DstPort 1
}
}
}
Line {
SrcBlock "Event"
SrcPort 1
Points [55, 0]
DstBlock "On_Off"
DstPort trigger
}
}
}
# Finite State Machines
# -- File save dated 10-Mar-1999 08:23:55
#
# Stateflow Version 2.0 (R11) dated Jan 21 1999, 19:12:04
#
#
Stateflow {
machine {
id 1
name "sf_intro_example"
created "20-Jan-1999 14:37:57"
firstTarget 10
sfVersion 20011061
}
chart {
id 2
name "On_Off"
windowPosition [291.75 366 301.5 172.5]
viewLimits [0 258 0 136.5]
screen [1 1 1024 768 1.333333333333333]
treeNode [0 3 0 0]
firstTransition 5
visible 1
machine 1
decomposition CLUSTER_CHART
firstEvent 8
chartFileNumber 1
}
state {
id 3
labelString "Power_on"
position [17.8987723874224 42.00000000000004 90 60]
fontSize 16
chart 2
treeNode [2 0 0 4]
type OR_STATE
decomposition CLUSTER_STATE
}
state {
id 4
labelString "Power_off"
position [147.3725486111985 43.50000000000013 90 60]
fontSize 16
chart 2
treeNode [2 0 3 0]
type OR_STATE
decomposition CLUSTER_STATE
}
transition {
id 5
labelPosition [216.2010252722292 17.26625297937056 6.749999999999999 13.5]
fontSize 10
src {
intersection [0 -1 0 0 220.6392598411452 13.50000000000013]
}
dst {
id 4
intersection [1 0 -1 0.8140745692216291 220.6392598411452 43.50000000000013]
}
midPoint [216.2010252722292 17.26625297937056]
chart 2
linkNode [2 0 6]
dataLimits [214.9865784523381 223.0392598411452 13.50000000000013 43.50000000000013]
}
transition {
id 6
labelString "Switch"
labelPosition [100.3936304705158 7.500000000000071 48.75 20.25]
fontSize 16
src {
id 3
intersection [1 0 -1 0.3860054161524751 52.63925984114516 42.00000000000004]
}
dst {
id 4
intersection [1 0 -1 0.5307412358882958 195.1392598411452 43.50000000000013]
}
midPoint [131.3892598411452 24.75000000000001]
chart 2
linkNode [2 5 7]
dataLimits [52.63925984114508 197.5392598411452 22.34672058615622 43.50000000000013]
}
transition {
id 7
labelString "Switch"
labelPosition [101.8909738134474 106.5000000000001 48.75 20.25]
fontSize 16
src {
id 4
intersection [3 0 1 0.4525920974450375 196.6392598411452 103.5000000000001]
}
dst {
id 3
intersection [3 0 1 0.5389945838475249 59.38925984114516 102]
}
midPoint [123.1392598411452 124.5]
chart 2
linkNode [2 6 0]
dataLimits [56.98925984114516 196.6392598411451 102 125.4750772113725]
}
event {
id 8
name "Switch"
linkNode [2 0 0]
scope INPUT_EVENT
trigger RISING_EDGE_EVENT
machine 1
}
instance {
id 9
name "On_Off"
machine 1
chart 2
}
target {
id 10
name "sfun"
description "Default Simulink S-Function Target."
machine 1
linkNode [1 0 0]
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -