Skip to Main Content Skip to Search
Product Documentation

Connective Junctions

What Is a Connective Junction?

The connective junction enables representation of different possible transition paths for a single transition. Connective junctions are used to help represent the following:

See Connective Junction Examples for a summary of the semantics of connective junctions.

Flow Graph Notation with Connective Junctions

Flow graph notation uses connective junctions to represent common code structures like for loops and if-then-else constructs without the use of states. And by reducing the number of states in your Stateflow charts, flow graph notation produces efficiently generated code that helps optimize memory use.

Flow graph notation uses combinations of the following:

Flow graph notation, states, and state-to-state transitions coexist in the same Stateflow chart. The key to representing flow graph notation is in the labeling of the transitions (specifically the use of action language) as shown by the following examples.

Connective Junction with All Conditions Specified Example

A transition from the Front_desk state to a connective junction is labeled by the check_in event. Transitions from the connective junction to the destination states are labeled with conditions. If Front_desk is active when check_in occurs, the transition from Front_desk to the connective junction occurs first. The transition from the connective junction to a destination state depends on which of the room_type conditions is true. If none of the conditions is true, no transition occurs and Front_desk remains active.

For more information about this chart, see Phases of Chart Execution. For more information on the semantics of this notation, see If-Then-Else Decision Construct Example.

Connective Junction with One Unconditional Transition Example

The chart uses temporal logic to determine when the input u equals 1.

If the input equals 1...A transition occurs from...
Before t = 2Start to Fast
Between t = 2 and t = 5Start to Good
After t = 5Start to Slow

For more information about temporal logic, see Using Temporal Logic in State Actions and Transitions. For more information on the semantics of this notation, see If-Then-Else Decision Construct Example.

Connective Junction and For Loops Example

This example shows a combination of flow graph notation and state transition notation. Self-loop transitions to connective junctions can represent for loop constructs. The chart uses implicit ordering of outgoing transitions (see Implicit Ordering of Outgoing Transitions).

See For-Loop Construct Example for information on the semantics of this notation.

Flow Graph Notation Example

This example shows the use of flow graph notation. The chart uses implicit ordering of outgoing transitions (see Implicit Ordering of Outgoing Transitions).

See Flow Graph Notation Example for information on the semantics of this notation.

Connective Junction from a Common Source to Multiple Destinations Example

This example shows transition segments from a common source to multiple conditional destinations using a connective junction. The chart uses implicit ordering of outgoing transitions (see Implicit Ordering of Outgoing Transitions).

See Transitions from a Common Source to Multiple Destinations Example for information on the semantics of this notation.

Connective Junction Common Events Example

This example shows transition segments from multiple sources to a single destination based on the same event using a connective junction.

See Transitions from a Source to a Destination Based on a Common Event Example for information on the semantics of this notation.

  


Free Stateflow Interactive Kit

Learn how engineers use Stateflow to model state machines in their Simulink models.


Get free kit

Trials Available

Try the latest version of Stateflow.


Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS