| Stateflow User's Guide | ![]() |
Adding a Sensor to the Model
In this topic, you add a temperature sensor to the model that you use to control the speed of a device such as a motor, fan, or pump. A sensor has two primary attributes: a value for the property it is measuring, and a regular time interval during which a new value is reported. Normally, the value of a sensor is reported as a voltage that must be converted to useful units such as degrees, flow, capacity, and so on. For the sake of example, assume that the temperature sensor reports the temperature directly in degrees Fahrenheit.
Use the following procedure topics to add a reporting sensor to the SFcontrol2 model you completed in Controlling with States and Transitions:
| Controlling with Junctions | Adding a Sensor Event | ![]() |
© 1994-2005 The MathWorks, Inc.