Control Systems With Embedded Implementation (CSEI)

Slides:



Advertisements
Similar presentations
State Charts Mehran Najafi. Reactive Systems A reactive, event-driven, object is one whose behavior is best characterized by its response to events dispatched.
Advertisements

Karolina Muszyńska Based on: S. Wrycza, B. Marcinkowski, K. Wyrzykowski „Język UML 2.0 w modelowaniu SI”
UML State chart/machine diagram State machine diagram is a behavior diagram which shows discrete behavior of a part of designed system through finite state.
Using Dataflow Diagrams
EKT 221 : Digital 2 ASM.
© 2006 ITT Educational Services Inc. SE350 System Analysis for Software Engineers: Unit 9 Slide 1 Appendix 3 Object-Oriented Analysis and Design.
Chapter 9 Using Data Flow Diagrams
Statecharts: A Visual Formalism for Complex Systems Jeff Peng Model-based Design Lab.
Modeling the Processes and Logic
SE-565 Software System Requirements More UML Diagrams.
© Richard Welke 2002 CIS 4120 Fa13: Define/Innovate BP’s Richard Welke Director, CEPRIN Professor, CIS Robinson College of Business Georgia State University.
State Machine Diagram Chapter 10. State Machine Diagram Used to describe system behavior.
Lecture 4 Finite State Machine CS6133 Software Specification and Verification.
Chapter 10 State Machine Diagrams
Chapter 7 Structuring System Process Requirements
Chapter 7 Using Data Flow Diagrams
1 Object-Oriented Modeling Using UML (2) CS 3331 Fall 2009.
Control Systems With Embedded Implementation (CSEI) Dr. Imtiaz Hussain Assistant Professor
Guide to State Transition Diagram. 2 Contents  What is state transition diagram?  When is state transition diagram used?  What are state transition.
Behavioral diagrams Lecture p4 T120B pavasario sem.
Session 22 Modeling the Extended Features of the Statechart Written by Thomas A. Pender Published by Wiley Publishing, Inc. October 27, 2011 Presented.
UML -Part 3. Dynamic Diagram Types Interaction Diagrams - Set of objects or roles and the messages that can be passed among them. – Sequence Diagrams.
CSIS3600 System Analysis and Design Statechart Diagrams.
7 Systems Analysis and Design in a Changing World, Fifth Edition.
Information System Design IT60105
Software Engineering Design & Modeling Statechart Diagram.
State Modeling. Introduction A state model describes the sequences of operations that occur in response to external stimuli. As opposed to what the operations.
Object Oriented Analysis & Design & UML (Unified Modeling Language)1 Part VI: Design Continuous Activity Diagams State Diagrams.
Sections © Copyright by Pearson Education, Inc. All Rights Reserved.
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1 UML State Diagrams.
Systems Analysis and Design in a Changing World, Fourth Edition
States.
CS3773 Software Engineering Lecture 06 UML State Machines.
Interaction Diagram An interaction diagram is a graphical representation of interactions between objects. Sequence diagram: shows the sequence in which.
COMPONENT DIAGRAM in UML 2.0 Veronica Carrega. PLAN OF TALK  Introduction about components  Components and component diagrams in uml 2.0  Case study.
Datapath - performs data transfer and processing operations The control unit sends: – Control signals – Control outputs The control unit receives: – External.
Using Dataflow Diagrams – Part 1 Systems Analysis and Design, 7e Kendall & Kendall 7 © 2008 Pearson Prentice Hall.
Digital System Design using VHDL
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 PRACTICAL OBJECT-ORIENTED DESIGN WITH UML 2e Chapter 10: Statecharts.
Modeling Object Lifecycles and State-Dependent Behavior ©SoftMoore ConsultingSlide 1.
Control Systems With Embedded Implementation (CSEI) Dr. Imtiaz Hussain Assistant Professor
McGraw-Hill/Irwin Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 5 Modeling the Processes and Logic.
Test Generation from UML Specifications Michael A. Gray American University Washington, DC.
Course Instructor: Kashif I hsan 1. Chapter # 6 2.
State Modeling. Introduction A state model describes the sequences of operations that occur in response to external stimuli. As opposed to what the operations.
® IBM Software Group © 2009 IBM Corporation Module 11: Creating State Machine Diagrams Essentials of Modeling with IBM Rational Software Architect V7.5.
Information Delivery Manuals: Process Mapping
UML Diagrams By Daniel Damaris Novarianto S..
State Machine Diagram.
TIM 58 Chapter 6, continued: Behavioral Modeling
COMPONENT & DEPLOYMENT DIAGRAMS
IS 334 information systems analysis and design
Introduction to Control Flow Patterns and BizAgi
UML Diagrams Jung Woo.
State Machine Diagrams
IDEF1X Standard IDEF1X (Integrated Definition 1, Extended) was announced as a national standard in 1993 It defines entities, relationships, and attributes.
Business System Development
Windows Internet Explorer 7-Illustrated Essentials
UML Activity Diagrams & State Charts
States.
Control Systems With Embedded Implementation (CSEI)
CIS 375 Bruce R. Maxim UM-Dearborn
BPMN - Business Process Modeling Notations
Chapter 5 state Modeling
Dynamic Modeling Lecture # 37.
States.
CIS 375 Bruce R. Maxim UM-Dearborn
Appendix 3 Object-Oriented Analysis and Design
Behavioral Diagrams P. P. Mahale
Choose the Proper Screen-Based Controls Lecture-10
Presentation transcript:

Control Systems With Embedded Implementation (CSEI) Lab-2 Stateflow® Chart Notations Dr. Imtiaz Hussain Assistant Professor email: imtiaz.hussain@faculty.muet.edu.pk URL :http://imtiazhussainkalwar.weebly.com/

Contents Overview of Stateflow Objects States Transitions Transition Connections Default Transitions

State Flow Objects (Graphical Objects) The following table lists each type of graphical object you can draw in a chart and the toolbar icon to use for drawing the object.

State Flow Objects (Non Graphical Objects) You can define data and event objects that do not appear graphically in the Stateflow Editor. However, you can see them in the Model Explorer. Data Objects Stateflow data resides in its own workspace, but you can also access data that resides externally in the Simulink model or application that embeds the Stateflow machine. Event Objects An event is a Stateflow object that can trigger a whole Stateflow chart or individual actions in a chart.

State A state describes an operating mode of a reactive system. In a Stateflow chart, states are used for sequential design to create state transition diagrams. States can be active or inactive. The activity or inactivity of a state can change depending on events and conditions. The occurrence of an event drives the execution of the state transition diagram by making states become active or inactive. At any point during execution, active and inactive states exist.

State Hierarchy To manage multilevel state complexity, use hierarchy in your Stateflow chart. With hierarchy, you can represent multiple levels of subcomponents in a system. In this example, the chart is the parent of the state Car_done. The state Car_done is the parent state of the Car_made and Car_shipped states.

State Hierarchy To represent the Stateflow hierarchy textually, use a slash character (/) to represent the chart and use a period (.) to separate each level in the hierarchy of states. The following list is a textual representation of the hierarchy of objects : . /Car_done . /Car_done.Car_made ./Car_done.Car_shipped . /Car_done.Car_made.Parts_assembled . /Car_done.Car_made.Painted

Objects That a State Can Contain States can contain all other Stateflow objects. Stateflow chart notation supports the representation of graphical object hierarchy in Stateflow charts with containment. A state is a superstate if it contains other states. A state is a substate if it is contained by another state. A state that is neither a superstate nor a substate of another state is a state whose parent is the Stateflow chart itself. States can also contain nongraphical data and event objects. The hierarchy of this containment appears in the Model Explorer. You define data and event containment by specifying the parent object of the data or event.

State Decomposition Every state (or chart) has a decomposition that dictates what type of substates the state (or chart) can contain. All substates of a superstate must be of the same type as the superstate decomposition. State decomposition can be exclusive (OR) or parallel (AND).

Exclusive (OR) State Decomposition Substates with solid borders indicate exclusive (OR) state decomposition. Use this decomposition to describe operating modes that are mutually exclusive. When a state has exclusive (OR) decomposition, only one substate can be active at a time.

Parallel (AND) State Decomposition Substates with dashed borders indicate parallel (AND) decomposition. Use this decomposition to describe concurrent operating modes. When a state has parallel (AND) decomposition, all substates are active at the same time.

Parallel (AND) State Decomposition The activity within parallel states is essentially independent, as demonstrated in the following example. When state A becomes active, both states B and C become active at the same time. When state C becomes active, either state C1 or state C2 can be active.

State Labels The label for a state appears on the top left corner of the state rectangle with the following general format: name/ entry:entry actions during:during actions exit:exit actions States on event_name:on event_name actions bind:events

State Name A state label starts with the name of the state followed by an optional / character. In the preceding example, the state names are On and Off. Each of these states has a unique name because of its location in the chart. The full names for the states in FAN1 and FAN2 are: PowerOn.FAN1.On PowerOn.FAN1.Off PowerOn.FAN2.On PowerOn.FAN2.Off

State Actions After the name, you enter optional action statements for the state with a keyword label that identifies the type of action. You can specify none, some, or all of them. The colon after each keyword is required. For each type of action, you can enter more than one action by separating each action with a carriage return, semicolon, or a comma.

State Actions Entry Action During Action Exit Action Preceded by the prefix entry or en for short. In the preceding example, state On has entry action on_count=0. This means that the value of on_count is reset to 0 whenever state On becomes active (entered). During Action Preceded by the prefix during or du for short. In the preceding label example, state On has two during actions, light_on() and on_count++. These actions are executed whenever state On is already active and any event occurs. Exit Action Preceded by the prefix exit or ex for short. In the preceding label example, state Off has the exit action light_off(). If the state Off is active, but becomes inactive (exited), this action is executed.

State Actions On Event_Name Action Bind Action Preceded by the prefix on event_name, where event_name is a unique event. In the preceding label example, state On has an on power_outage action. If state On is active and the event power_outage occurs, the action handle_outage() is executed. Bind Action Preceded by the prefix bind. Events bound to a state can only be broadcast by that state or its children.

Transitions A transition is a line with an arrowhead that links one graphical object to another. In most cases, a transition represents the passage of the system from one mode (state) object to another. A transition typically connects a source and a destination object. The source object is where the transition begins and the destination object is where the transition ends. The following chart shows a transition from a source state, B, to a destination state, A

Transitions Junctions divide a transition into transition segments. In this case, a full transition consists of the segments taken from the origin to the destination state. Each segment is evaluated in the process of determining the validity of a full transition. The example shows two segmented transitions: one from state On to state Off, other from state On to itself:

Transition Hierarchy The following table resolves the parentage of each transition in the preceding example. The / character represents the chart. Each level in the hierarchy of states is separated by the period (.) character.

Transition Label A transition is characterized by its label. The label can consist of an event, a condition, a condition action, and/or a transition action. The ? character is the default transition label. Transition labels have the following general format: event[condition]{condition_action}/transition_action

Transition Label Transition Label Example

End of Lab-2 To download this lecture visit http://imtiazhussainkalwar.weebly.com/ End of Lab-2