Week - 4
AIM:
To Implement control logic of a “washing machine” using Stateflow as per given sequence.
OBJECTIVE:
- 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
CONTROL LOGIC;

SYMBOLS PANE:

Here,PowerSwitch & W(water supply) is as input given while all other like Washing_State, D(dryer), Wa(washing), s(soaking), R(rinsing), Washing_Completed are all output given.
COMPLETE SIMULINK MODEL,
Showing that the washing process is completed.

Here, all LED are glowing as red due to water supply is OFF so washing process not completed and all display output as 0.

Here, all LED are glowing as green which means power supply is ON all process of washing has been completed and all display output as 1.
2.AIM:-
To Make a Simulink chart for the “Gear shift” logic as per below conditions.
OBJECTIVE:
Speed Range(kmph) Gear
0 to 15 1
16 to 25 2
26 to 40 3
41 to 60 4
Above 61 5
CONTROL LOGIC

SYMBOLS PANE:
Here,
1.Input data- Speed
2.Output data- Gear
SIMULINK MODEL:

- in the above model we used slider block for variable speed and connect to control logic stateflow block. Display block is connected to control logic to see which gear is running and also used lamp for better graphical presentation to user.