Stateflow
R2012b Prerelease
MathWorks
www. mat hwor ks. co. j p
comp. sof t -sys. mat l ab
www. mat hwor ks. co. j p/cont act _ TS. ht ml
suppor t @mat hwor ks. com
suppor t @mat hwor ks. com
doc@mat hwor ks. co. j p
ser vi ce@mat hwor ks. co. j p
ser vi ce@mat hwor ks. co. j p
Web
Newsgroup
()
()
TEL: 03-6367-6700 ()
FAX: 03-6367-6710
The MathWorks GK
107-0052 415-1
MathWorks Web
MATLAB and Simulink are registered trademarks of The MathWorks, Inc. See www. mat hwor ks. com/t r ademar ks
for a list of additional trademarks. Other product or brand names may be trademarks or registered
trademarks of their respective holders.
MathWorks products are protected by one or more U.S. patents. Please see www. mat hwor ks. com/pat ent s
for more information.
2004
2004
2005
2005
2005
2006
2006
2007
2007
2008
2008
2009
2009
2010
2010
2011
2011
2012
6
10
3
9
10
3
9
3
9
3
10
3
9
3
9
4
9
3
3
4
5
6
Version
Version
Version
Version
Version
Version
Version
Version
Version
Version
Version
Version
Version
Version
Version
Version
Version
Version
Confidential Prerelease Documentation -- Subject to Nondisclosure Agreement
1
. . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-2
1-2
1-3
1-3
1-4
1-4
1-5
1-7
1-9
1-12
1-15
1-16
vi
Confidential Prerelease Documentation -- Subject to Nondisclosure Agreement
...
(p. 1-2)
(p. 1-3)
(p. 1-3)
(p. 1-4)
(p. 1-4)
(p. 1-5)
(p. 1-7)
(p. 1-9)
(p. 1-12)
(p. 1-15)
(p. 1-16)
Stateflow
MATLAB
1-2
Confidential Prerelease Documentation -- Subject to Nondisclosure Agreement
25
23
10
Normal () :
Alarm () :
3
Off (): 25
Warmup (): 10
On (): 23 10
1-3
Confidential Prerelease Documentation -- Subject to Nondisclosure Agreement
reference_ high
reference_ low
ALARM
CLEAR
t emp
doneWarmup
boiler_cmd
(p. 1-4)
MATLAB
addpat h ( f ul l f i l e( docr oot , ' t ool box' , ' st at ef l ow' , ' exampl es' ) )
ex_ st t _ boi l er
MATLAB
1
addpat h ( f ul l f i l e( docr oot , ' t ool box' , ' st at ef l ow' , ' exampl es' ) )
ex_ st t _ boi l er _ exer ci se
Simulink
1-4
Confidential Prerelease Documentation -- Subject to Nondisclosure Agreement
2 5 Outport 1 Inport
3 [] [ ]
4 Stateflow
1-5
Confidential Prerelease Documentation -- Subject to Nondisclosure Agreement
MATLAB
[] [
]
2 ( )
a st at e1 Nor mal
b st at e2 Al ar m
3 3 Nor mal
a Nor mal [] []
Of f
b a 2 War mup On
(OR)
Nor mal Of f
[]
1-6
Confidential Prerelease Documentation -- Subject to Nondisclosure Agreement
boi l er _ cmd doneWar mup ( (p. 1-3)
) Normal Alarm
1-7
Confidential Prerelease Documentation -- Subject to Nondisclosure Agreement
1 Enter
entry
:
Of f
ent r y:
boi l er _ cmd = 0;
doneWar mup = f al se;
War mup
ent r y:
boi l er _ cmd = 2;
On
ent r y:
boi l er _ cmd = 1;
Al ar m
ent r y:
boi l er _ cmd = 0;
2
1-8
Confidential Prerelease Documentation -- Subject to Nondisclosure Agreement
(p. 1-3)
1 Nor mal
1-9
Confidential Prerelease Documentation -- Subject to Nondisclosure Agreement
if
[ ALARM]
Alarm
:
a Nor mal
b ALARM
Of f War mup On
c ALARM Alar m
2 Of f
if
[ t emp <= reference_low]
Warmup
23
3 War mup
if
[ doneWar mup]
else-if
[ af t er ( 10, sec) ]
{ doneWarmup = t r ue; }
On
On
10 On
4 On
1-10
Confidential Prerelease Documentation -- Subject to Nondisclosure Agreement
if
[ t emp >= r ef er ence_ hi gh]
Off
25
5 Al ar m
if
[ CLEAR]
Normal
1-11
Confidential Prerelease Documentation -- Subject to Nondisclosure Agreement
MATLAB C/C++
1 MATLAB
/
1-12
Confidential Prerelease Documentation -- Subject to Nondisclosure Agreement
1 Simulink [] []
2
:
:
ALARM CLEAR
2 [ ] []
ALARM CLEAR
3 [/
] [OK]
1-13
Confidential Prerelease Documentation -- Subject to Nondisclosure Agreement
5 []
reference_low
referenc
t emp
ALARM
CLEAR
6
7
1-14
Confidential Prerelease Documentation -- Subject to Nondisclosure Agreement
1 Simulink Simulink
2
3 [] []
1-15
Confidential Prerelease Documentation -- Subject to Nondisclosure Agreement
Scope
Stateflow
1 [] []
1-16
Confidential Prerelease Documentation -- Subject to Nondisclosure Agreement
Nor mal
2 Nor mal
1-17