📄 parallelism.mdl
字号:
Before "0"
After "1"
SampleTime "0"
}
Block {
BlockType Reference
Name "fast/slow"
Ports [2, 1, 0, 0, 0]
Position [65, 31, 105, 69]
NamePlacement "alternate"
FontName "Arial"
FontSize 14
FontWeight "bold"
SourceBlock "simulink3/Nonlinear/Manual Switch"
SourceType "Manual Switch"
sw "0"
action "0"
}
Line {
SrcBlock "Constant"
SrcPort 1
DstBlock "fast/slow"
DstPort 1
}
Line {
SrcBlock "Constant1"
SrcPort 1
DstBlock "fast/slow"
DstPort 2
}
Line {
SrcBlock "fast/slow"
SrcPort 1
Points [10, 0; 0, 50]
DstBlock "Mux"
DstPort 1
}
Line {
SrcBlock "Fwd/Rev"
SrcPort 1
DstBlock "Mux"
DstPort 2
}
Line {
SrcBlock "Constant2"
SrcPort 1
DstBlock "Fwd/Rev"
DstPort 1
}
Line {
SrcBlock "Constant3"
SrcPort 1
DstBlock "Fwd/Rev"
DstPort 2
}
Line {
SrcBlock "Motor"
SrcPort 1
Points [5, 0; 0, -65]
DstBlock "Scope"
DstPort 1
}
Line {
SrcBlock "Product"
SrcPort 1
DstBlock "Motor"
DstPort 1
}
Line {
SrcBlock "Mux"
SrcPort 1
Points [5, 0; 0, -80; 55, 0]
DstBlock "Chart"
DstPort trigger
}
Line {
SrcBlock "Chart"
SrcPort 1
DstBlock "Product"
DstPort 1
}
Line {
SrcBlock "Chart"
SrcPort 2
DstBlock "Product"
DstPort 2
}
Line {
SrcBlock "Start"
SrcPort 1
Points [60, 0; 0, -50]
DstBlock "Mux"
DstPort 3
}
}
}
# Finite State Machines
# -- File save dated 10-Mar-1999 08:48:52
#
# Stateflow Version 2.0 (R11) dated Jan 21 1999, 19:12:04
#
#
Stateflow {
machine {
id 1
name "parallel"
created "26-Jan-1999 15:08:24"
firstTarget 21
sfVersion 20011061
}
chart {
id 2
name "Chart"
windowPosition [27 54.75 524.25 233.25]
viewLimits [0 480.75 0 197.25]
screen [1 1 1024 768 1.333333333333333]
treeNode [0 3 0 0]
visible 1
machine 1
decomposition SET_CHART
firstEvent 15
firstData 18
chartFileNumber 1
}
state {
id 3
labelString "Speed"
position [15.70921128938753 12.00000000000026 216.5946356079645 164.25]
fontSize 14
chart 2
treeNode [2 5 0 4]
firstTransition 9
type AND_STATE
decomposition CLUSTER_STATE
}
state {
id 4
labelString "Direction"
position [247.3019524453899 13.50000000000031 216.5946356079645 164.25]
fontSize 14
chart 2
treeNode [2 6 3 0]
firstTransition 10
type AND_STATE
decomposition CLUSTER_STATE
}
state {
id 5
labelString "Slow"
position [86.65488111347406 60.00000000000026 63.75355693021466 28.50000000000009]
fontSize 14
chart 2
treeNode [3 0 0 7]
type OR_STATE
decomposition CLUSTER_STATE
}
state {
id 6
labelString "Fwd"
position [318.2476222694765 61.50000000000031 63.75355693021466 28.50000000000009]
fontSize 14
chart 2
treeNode [4 0 0 8]
type OR_STATE
decomposition CLUSTER_STATE
}
state {
id 7
labelString "Fast"
position [110.0209404600814 132.0000000000001 63.75355693021466 28.50000000000009]
fontSize 14
chart 2
treeNode [3 0 5 0]
type OR_STATE
decomposition CLUSTER_STATE
}
state {
id 8
labelString "Rev"
position [341.6136816160839 133.5000000000002 63.75355693021466 28.50000000000009]
fontSize 14
chart 2
treeNode [4 0 6 0]
type OR_STATE
decomposition CLUSTER_STATE
}
transition {
id 9
labelString "{pow=0.5;}"
labelPosition [108.3751318737968 23.5227750956253 69.21596244131455 18]
fontSize 14
src {
intersection [0 0 0 0 83.17758554030549 28.50000000000003]
}
dst {
id 5
intersection [1 0 -1 0.4178427557666858 113.2938430311233 60.00000000000026]
}
midPoint [96.02903691634936 36.27307072096036]
chart 2
linkNode [3 0 11]
dataLimits [83.17758554030561 115.6938430311233 28.50000000000002 60.00000000000026]
}
transition {
id 10
labelString "{d=1;}"
labelPosition [343.1944319096091 23.06002974892685 39.12206572769954 18]
fontSize 14
src {
intersection [0 0 0 0 324.1637927701528 33.75000000000003]
}
dst {
id 6
intersection [1 0 -1 0.4178427557666858 344.8865841871257 61.50000000000031]
}
midPoint [333.0067888280901 40.62873763142817]
chart 2
linkNode [4 0 12]
dataLimits [324.1637927701528 347.2865841871257 33.75000000000004 61.50000000000031]
}
transition {
id 11
labelString "Switch1/\n"
"pow=0.5;"
labelPosition [33.8091543191069 127.144936100122 60.18779342723005 34.5]
fontSize 14
src {
id 7
intersection [1 0 -1 0.2259739812790951 124.4275855403055 132.0000000000001]
}
dst {
id 5
intersection [4 -1 0 0.5000000000000074 86.65488111347406 74.25000000000009]
}
midPoint [59.17758554030549 99.75000000000003]
chart 2
linkNode [3 9 13]
dataLimits [59.00339101228466 124.4275855403055 71.85000000000008 132.0000000000002]
}
transition {
id 12
labelString "Switch2/\n"
"d=1;"
labelPosition [264.8814138064715 127.8949361001221 54.92136150234742 34.5]
fontSize 14
src {
id 8
intersection [1 0 -1 0.2259739812790951 356.0203266963079 133.5000000000002]
}
dst {
id 6
intersection [4 -1 0 0.5000000000000074 318.2476222694765 75.75000000000014]
}
midPoint [290.7703266963079 101.2500000000001]
chart 2
linkNode [4 10 14]
dataLimits [290.5961321682871 356.020326696308 73.35000000000014 133.5000000000001]
}
transition {
id 13
labelString "Switch1/\n"
"pow=1;"
labelPosition [167.5061820371428 65.94907653570535 54.92136150234742 34.5]
fontSize 14
src {
id 5
intersection [3 0 1 0.2310593041813774 135.6775855403055 88.50000000000034]
}
dst {
id 7
intersection [2 1 0 0.6052631578947355 173.7744973902961 149.2500000000002]
}
midPoint [183.6775855403055 121.5]
chart 2
linkNode [3 11 0]
dataLimits [135.6775855403054 187.9667024099153 88.50000000000043 151.6500000000002]
}
transition {
id 14
labelString "Switch2/\n"
"d=-1;"
labelPosition [394.8486544048431 68.1990765357054 54.92136150234742 34.5]
fontSize 14
src {
id 6
intersection [3 0 1 0.2310593041813774 367.2703266963079 90.0000000000004]
}
dst {
id 8
intersection [2 1 0 0.6052631578947355 405.3672385462985 150.7500000000002]
}
midPoint [415.2703266963079 123.0000000000001]
chart 2
linkNode [4 12 0]
dataLimits [367.2703266963079 419.5594435659177 90.00000000000054 153.1500000000002]
}
event {
id 15
name "Switch1"
linkNode [2 0 16]
scope INPUT_EVENT
trigger EITHER_EDGE_EVENT
machine 1
}
event {
id 16
name "Switch2"
linkNode [2 15 17]
scope INPUT_EVENT
trigger EITHER_EDGE_EVENT
machine 1
}
event {
id 17
name "step"
linkNode [2 16 0]
scope INPUT_EVENT
trigger RISING_EDGE_EVENT
machine 1
}
data {
id 18
name "pow"
linkNode [2 0 19]
scope OUTPUT_DATA
machine 1
dataType "double"
}
data {
id 19
name "d"
linkNode [2 18 0]
scope OUTPUT_DATA
machine 1
dataType "double"
}
instance {
id 20
name "Chart"
machine 1
chart 2
}
target {
id 21
name "sfun"
description "Default Simulink S-Function Target."
machine 1
linkNode [1 0 0]
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -