STT Tutorial

Embed Size (px)

DESCRIPTION

STT Tutorial

Citation preview

  • Confidential Prerelease Documentation -- Subject to Nondisclosure Agreement

    Stateflow

    R2012b Prerelease

  • Confidential Prerelease Documentation -- Subject to Nondisclosure Agreement

    MathWorks

    www. mat hwor ks. co. j p Webcomp. sof t -sys. mat l ab Newsgroupwww. mat hwor ks. co. j p/cont act _ TS. html

    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

    TEL: 03-6367-6700 ()

    FAX: 03-6367-6710

    The MathWorks GK107-0052 415-1MathWorks Web

    COPYRIGHT 20042012 by The MathWorks, Inc.The software described in this document is furnished under a license agreement. The software may be used or copiedonly under the terms of the license agreement. No part of this manual may be photocopied or reproduced in any formwithout prior written consent from The MathWorks, Inc.

    FEDERAL ACQUISITION: This provision applies to all acquisitions of the Program and Documentation by, for, orthrough the federal government of the United States. By accepting delivery of the Program or Documentation,the government hereby agrees that this software or documentation qualifies as commercial computer software orcommercial computer software documentation as such terms are used or defined in FAR 12.212, DFARS Part 227.72,and DFARS 252.227-7014. Accordingly, the terms and conditions of this Agreement and only those rights specified inthis Agreement, shall pertain to and govern the use, modification, reproduction, release, performance, display, anddisclosure of the Program and Documentation by the federal government (or other entity acquiring for or throughthe federal government) and shall supersede any conflicting contractual terms or conditions. If this License fails tomeet the governments needs or is inconsistent in any respect with federal procurement law, the government agreesto return the Program and Documentation, unused, to The MathWorks, Inc.

    MATLAB and Simulink are registered trademarks of The MathWorks, Inc. See www. mat hwor ks. com/t r ademar ksfor a list of additional trademarks. Other product or brand names may be trademarks or registeredtrademarks of their respective holders.

    MathWorks products are protected by one or more U.S. patents. Please see www. mat hwor ks. com/pat ent sfor more information.

  • Confidential Prerelease Documentation -- Subject to Nondisclosure Agreement

    2004 6 1 Version 6.0 (Release 14)2004 10 Version 6.1 (Release 14SP1)2005 3 Version 6.2 (Release 14SP2)2005 9 Version 6.3 (Release 14SP3)2005 10 Version 6.02006 3 2 Version 6.4 (Release 2006a)2006 9 Version 6.5 (Release 2006b)2007 3 Version 6.6 (Release 2007a)2007 9 3 Version 7.0 (Release 2007b)2008 3 4 Version 7.1 (Release 2008a)2008 10 5 Version 7.2 (Release 2008b)2009 3 6 Version 7.3 (Release 2009a)2009 9 Version 7.4 (Release 2009b)2010 3 Version 7.5 (Release 2010a)2010 9 Version 7.6 (Release 2010b)2011 4 7 Version 7.7 (Release 2011a)2011 9 Version 7.8 (Release 2011b)2012 3 Version 7.9 (Release 2012a)

  • Confidential Prerelease Documentation -- Subject to Nondisclosure Agreement

  • 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

    v

  • vi

  • 1Confidential Prerelease Documentation -- Subject to Nondisclosure Agreement

  • 1 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

  • 1 Confidential Prerelease Documentation -- Subject to Nondisclosure Agreement

    reference_ high

    reference_ low

    ALARM

    CLEAR

    temp

    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 State Transition Table

    5

    1-5

  • 1 Confidential Prerelease Documentation -- Subject to Nondisclosure Agreement

    1

    MATLAB

    [] [ ]

    2 ( )

    a st at e1 Normal

    b st at e2 Al arm

    3 3 Normal

    a Normal [] [] Of f

    b a 2 Warmup On

    (OR) Normal Of f

    []

    1-6

  • Confidential Prerelease Documentation -- Subject to Nondisclosure Agreement

    boi l er _ cmd doneWarmup ( (p. 1-3)) Normal Alarm

    1-7

  • 1 Confidential Prerelease Documentation -- Subject to Nondisclosure Agreement

    1 Enter entry

    : :

    Of fent r y:boi l er _ cmd = 0;doneWarmup = f al se;

    Warmupent r y:boi l er _ cmd = 2;

    Onent r y:boi l er _ cmd = 1;

    Al arment r y:boi l er _ cmd = 0;

    2

    1-8

  • Confidential Prerelease Documentation -- Subject to Nondisclosure Agreement

    (p. 1-3)

    1 Normal

    1-9

  • 1 Confidential Prerelease Documentation -- Subject to Nondisclosure Agreement

    if

    [ ALARM]

    Alarm

    :

    a Normal

    b ALARM Of f WarmupOn

    c ALARM Alarm

    2 Of f

    if

    [ t emp

  • Confidential Prerelease Documentation -- Subject to Nondisclosure Agreement

    if

    [ t emp >= r ef er ence_ hi gh]

    Off

    25

    5 Al arm

    if

    [ CLEAR]

    Normal

    6

    1-11

  • 1 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

  • 1 Confidential Prerelease Documentation -- Subject to Nondisclosure Agreement

    4

    5 []

    : :

    reference_low 2

    referenc 1

    t emp 5

    ALARM 3

    CLEAR 4

    6

    7

    Simulink State Transition Table Simulink

    1-14

  • Confidential Prerelease Documentation -- Subject to Nondisclosure Agreement

    1 Simulink Simulink

    2

    3 [] []

    1-15

  • 1 Confidential Prerelease Documentation -- Subject to Nondisclosure Agreement

    Scope

    Stateflow

    1 [] []

    1-16

  • Confidential Prerelease Documentation -- Subject to Nondisclosure Agreement

    Normal

    2 Normal

    1-17