Washing Machine State flow & Gear Shit Logic
Objective:
1. To create a stateflow model of a washing machine using control logic with the following 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
2. To create a model of Gear Shift Logic as per the following speed range
Speed Range(kmph) Gear
0 to 15 1
16 to 25 2
26 to 40 3
41 to 60 4
Above 61 5
Washing Machine
Fig: Washing Machine Model

The Lamp was configured to display red color when the state is 7 (finish)
Fig: StateFlow Logic

Simulation Stop time=400sec
Observation: When Power and water supply is on then all the logic flows from from state 1 to 7 and stops with the red lamp signal. Incase if the power is not present (p=0), then the logic control directly moves to the finish state (Finish) showing Red signal without moving through 2 to 6 states. Similarly if the water supply is not present (w=0) then the logic moves directly to the finish from the state 2 without going through 3 to 6 states
Gear Shift Logic
Model

Gear Logic

Stop Time=inf was provided for creating a running simulation situation while the speed values are changed to see the results
Results
Gear 1:

Gear 2:

Gear 3:

Gear 4:

Gear 5:
