Using Multiword Fixed-Point Data
This example shows a simple use of multiword fixed-point data in Stateflow® charts. You can define multiword fixed-point data at the chart level, with one of the following scopes:
Data Store Memory
You can also pass these data as inputs and outputs to and from MATLAB® functions, MATLAB truth tables, and Simulink® functions in Stateflow charts.
Chart MultiwordFixptIO takes in an input,
data, that is a multiword fixed-point type, and returns an output,
out, that is also a multiword fixed-point data type.
The chart defines a Simulink function
foo that declares both its input and output to be of multiword fixed-point type.
foo returns the value of its input, incremented by a fixed-point constant value. At each time step, the chart MultiwordFixptIO passes its input to
foo, and assigns the output from