| Stateflow User's Guide | ![]() |
Adding Sensor Data
You can simulate sensors in Simulink with a sensor value and a time interval for which the sensor reports its value. In Adding a Sensor Event, you added an event to simulate the reporting time for a sensor. Now you need to add a data value to the Stateflow block to simulate the value of the sensor in the following steps:
temp with scope Input from Simulink.
temp as shown.
temp on the left side of the Controller block as shown.
temp is the value of the Constant block. You can change this value during simulation by double-clicking the Constant block and entering a new value in the Constant value field in the resulting Block Parameters dialog and clicking Apply.
| Adding a Sensor Event | Adding a Junction for Flow Control | ![]() |
© 1994-2005 The MathWorks, Inc.