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
- After all the processes have completed turn on the finished LED
answer:


BLOCK USED: constant,chart,lamp and display
PROCEDURE: Blocks are connected as shown above.Power and Tap indicate power supply and watersupply and End indicating End of the process.Stop time set to 400sec.If power and water supply are available soaking ,washing,rinsing and drying occur and if water is not available the process directly come to end.Two LED lamps are given to indicate water and end.If the water is available water LED turns green else red.The end LED turns red when the process ends.
OUTPUT:The control logic of a washing machine using stateflow is created and LED is connected to indicate the water and end of the process.
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.
Answer:


BLOCK USED:constant,slider gain , chart and display.
PROCEDURE:Blocks are connected as shown above.Stop time set to infinity.While running the simulation speed varries using slider gain.The display shows gear in action corresponds to the speed given.
OUTPUT: The simulink model of gear shift logic is created and speed variation given using slider gain and gear in action for corresponding speed obtained in display.