Stateflow User's Guide Previous page   Next Page

Programming a Truth Table

In the steps of Building a Simulink Model with a Stateflow Truth Table, you create a Simulink model with a Stateflow diagram that calls the truth table ttable. This truth table is empty and requires programming to specify its behavior. This section shows you how to program this truth table, with the topics in the following steps:

  1. Opening a Truth Table for Editing -- You open a truth table editor for a truth table object in the Stateflow diagram to begin programming it.
  2. Entering Truth Table Conditions -- Shows you how to enter conditions in the Condition Table of a truth table.
  3. Entering Truth Table Decisions -- Shows you how to enter decisions in the Condition Table of a truth table.
  4. Entering Truth Table Actions -- Shows you how to enter actions for each decision in the Action Table of a truth table.
  5. Assigning Truth Table Actions to Decisions -- Shows you how to assign actions that you entered in the Action Table to each decision in the Condition Table.
  6. Adding Initial and Final Actions -- Shows you how to specify special initial and final actions in the Action Table of a truth table.

When you finish programming ttable in this section, the example model you start in Building a Simulink Model with a Stateflow Truth Table is finished. Continue by debugging the truth table in Debugging a Truth Table.


Previous page  Creating Truth Table Data in Stateflow and Simulink Opening a Truth Table for Editing Next page

© 1994-2005 The MathWorks, Inc.