| Stateflow | ![]() |
www.kxcad.net Home > CAE Software Index > MATLAB Index >
| On this page… |
|---|
Type of Input. Temperature of the physical plant
Rationale. The Stateflow chart is designed to control the air temperature in a physical plant. The goal is to maintain an ideal temperature of 120 degrees by activating one or two cooling fans if necessary. Stateflow must check the plant temperature over time to determine the amount of cooling required.
Properties of Input. The properties of the temperature input are as follows:
| Property | Value |
|---|---|
| Name | temp |
| Scope | Input from Simulink |
| Size | Inherit from Simulink input signal to ensure compatibility |
| Data type | Inherit from Simulink input signal to ensure compatibility |
| Port | 1 |
| Watch in debugger | Enable |
Type of Output. Speed of airflow, based on how many fans are operating.
Rationale. When the Simulink subsystem determines the temperature of the physical plant over time, it needs to account for the speed of the airflow. Airflow speed is directly related to the amount of cooling activity generated by the fans. As more fans are activated, cooling activity increases and air flows faster. To convey this information, the Stateflow chart outputs a value that indicates whether 0, 1, or 2 fans are running. The Simulink subsystem uses this value as an index into a multiport switch, which outputs a cooling activity value, as described in A Look at the Physical Plant.
Properties of Output. The properties of the airflow output are as follows:
| Property | Value |
|---|---|
| Name | airflow |
| Scope | Output from Simulink |
| Data type | 8-bit unsigned integer (The values can be only 0, 1, or 2.) |
| Port | 1 |
| Watch in debugger | Enable |
| Defining the Interface to Simulink | Implementing the Interface | ![]() |
© 1984-2007 The MathWorks, Inc. Terms of Use Patents Trademarks Acknowledgments