Week - 4
Q1)As soon as the washing machine is powered on it checks for the water inlet,if water is not available the process is de-activated and activated again if the water is available.chart is used to simulate the soaking for 200sec, washing for 100 sec, rinsing for 20 sec and drying for 50 sec.
Rocker switch is used for water inlet and each state is displayed through Display connected with Lamp from Dashboard.
here,constant is used for power supply,rocker switch is enabled then Washing Macine is in soaking mode for 200sec after soaking , it goes to wasihng mode for 100sec and moves to rinsing mode. After rinsing for 20sec the water outlet is enabled before dryer mode, after dryer mode is ON for 50sec the washing machine goes to finish state by the simulation time used for the stateflow(chart).
low water level instance is shown in below figure:
Q2) Slider with maximum range of 100 is used for Speed of the vehicle and connected to constant block,
Here, stateflow(chart) is used to simulate the gear shift of the vehicle. First gear is enabled for 0 to 15 kmph through display and lamp,
second gear is enabled for 16 to 25 kmph and third gear for 16 to 40 kmph and fourth gear for 41 to 60 and fifth gear for 60 and above.
similarly if the speed drops between these ranges respective gear and its display is enabled through lamp.
for speed between 16 to 25 kmph instance is shown in figure below: