Week - 4
- Implement control logic of a “washing machine” using Stateflow as per given sequence:
- If the power supply is available, the system gets activated
- If the Water supply is not available, stop the process & indicate through LED
- Soaking time should be 200s followed by Washing time of 100s.
- Then rinsing happens for next 20s & dryer runs for 50s
stateflow:
It provides a graphical language that includes state transition diagrams, flow charts, state transition tables, and truth tables.
Washing machine:
A washing machine is a home appliances used to wash laundry. The term is mostly applied to machines that use water as opposed to dry cleaning. The user adds laundry detergent, which is sold in liquid or powder form, to the wash water.
the washing machine performs step by step process like rinsing,washing,soaking,dryer and finishing.
the below state flow chart represents the step by step process of an washing machine.

the input supply are power and water.the outputs are soaking,washing,rinsing,dryer and finish.
here some conditions are given to the washing machine for the step by step process.
the below chart represnts the stateflow chart with an constant block and display block are connected for the output.here the lamp block is uesd for identification.Green colour represents the processing and red indicates off sate.
initially the power supply is given and green colur indicates the washing machine is in on condition.
after that the soaking process starts the green light indicates.

then after 200 sec the washing process starts and lamp indicates the green light.

then after 100 sec the rinse process starts and after 20sec dry process starts.the lamp block also indiactes the process.

then finally after all the process finished the washinh machine gets off and finish block indicates the green colur.

2.Make a Simulink chart for the “Gear shift” logic as per below conditions:
Speed Range(kmph) Gear
0 to 15 1
16 to 25 2
26 to 40 3
41 to 60 4
Above 61 5
Give speed input while the simulation is running & display the gear number.
Gear:

if the speed is 15 or below 15kmph then the gear 1 is displayed as output.The below image also shows the gear1 process.

When the speed increases above 15kmph then the gear2 is displayed.

If the speed is between 25 to 40 kmph third gear gets displayed.

similarly if the speed increases to 60kmph then the 4th gear displayed.

if the speed is above 60kmph then the 5th gear is displayed.
