Week - 4
1) 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
Solution:
- To implement a washing machine logic using stateflow
- The washing machine should be activated if th epower supply is on, and system is acctivated.
- The second condition is water supply, if the supply is off it should turn off the machine and indicate it through led.
- Next condition is to set up a tome gap for soaking i.e,200 sec and for washing time is given by 100sec.
- The final sstep is rinsing for 20sec followed by dryer for 50sec.
- Then the machine should stop the process.
By using the we have to design the chart in simulink block 
After running the chart you will see the lamp willl glow in green colour as per the given condition.
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.
Solution:
- For gear shift logic we should first import chart from simulink.
- For speed input here gain slider is used to control the gear number.
- The gear number is displayed in the Display block.
- By using gain slider the gears can be changed.
