Week - 4
Aim:Implement control logic of a “washing machine” using Stateflow.
- 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.
model1
In this when the both input are closed it show zero output on display command so from lamp its show the red color.

stateflow

symbol pane

model 2
In this power is given by taking constant value to 1 so it display green on power lamp and red on water lamp so output it will show.

model3
In this both input are given by constant equal to 1 so it will show all green in the lamps.

Aim:
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
model1: when speed range less than 15 gear 1 will run.

model2:when speed range less than 25 gear 2 will run.
model3:when speed range less than 40gear 3 will run.

model4:when speed range less than 60 gear 4 will run.

model5:when speed range more than 60 gear 5 will run.

stateflow:
symbol pane:
