Week - 4

This is the simulink model used for demonstration of the washing machine.
State flow is created as follows

Explanation of the stateflow
Stateflow is nothing but the flowchart of the operation to be carried out.
first and last blocks are temp and end which indicates the start and end of the stateflow.
Once Power is made high then next state is achieved which is ON(Power is input). If water supply is available then flows moves to the next stage which is water on. After this stage the rest of the stages are operated as per delay which is mentioned in the question. To make it more understandable, lamps are used which will indicate the status of the each block.



This is the modified model. The scope is added to track the intermediate states of the blocks like rinse,wash etc. The respective graphs are also added above.

Turning OFF the water supply and monitoring the working. Since water supply was absent washing is not initiated which we can see in the graph only power supply and final state is made high.
2.



Stateflow -

For demonstration slider gain is used and by changing the speed during runtime change in the gear number is seen on the display as we can see from the above screenshot. Stateflow is also shown above.