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
Here is the model for Washing maching using stateflow:

Constant blocks are used to give inputs, Scope is used to view output.
Lamps are used to indicate ON and OFF of machine.
State flow:

The given conditions are implemented using stateflow.
Output:
When power supply and water supply is ON.

When Power supply or water supply is OFF.

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.
Model:

Here is the model for Gear shift Logic, Ignitions connected with lam, if it's in ON state, it will glow light. Speed is connected with Speedometer to display speed of system. S is a input for engine to show ON and OFF state. Display is used to get Output.
Flow Chart:

Conditions implemented in flow chart.
Here is the flow chart for model.
OUTPUT:
When speed=15, Gear output=1

When speed=25, Gear output=2

When speed=30, Gear output=3

When speed=60, Gear output=4

When speed>61, Gear outpu=5
