Stateflow.TruthTableChart
Tabular representation of state machine for decision logic
Description
Use Stateflow.TruthTableChart
objects to create truth
table blocks that implement combinatorial logic design in a concise, tabular format.
Typical applications include decision making for:
Fault detection and management
Mode switching
Truth table blocks execute as Simulink® blocks and provide a more direct implementation of decision logic than using truth table functions in Stateflow® charts. For more information, see Use Truth Tables to Model Combinatorial Logic.
Creation
To create a Stateflow.TruthTableChart
object, call the function sfnew
with the -TT
argument. For example, to create a Truth
Table block in a new Simulink model called myModel
, enter:
sfnew -TT myModel
Alternatively, you can add a new Truth Table block to an existing model by
using the function add_block
(Simulink):
add_block("sflib/Truth Table", ... "myModel/Truth Table")
Then, to access the Stateflow.TruthTableChart
object, call the find
function for the Simulink.Root
object:
table = find(sfroot,"-isa","Stateflow.TruthTableChart", ... Path="myModel/Truth Table");
Properties
Object Functions
find | Identify specified objects in hierarchy |
getChildren | Identify children of object |
dialog | Open properties dialog box |
view | Display object in editing environment |