Week - 4
1.
Aim:- Implement a control logic for washing machine using state flow as per given instructions.
Simulink :-

procedure:-
1. Start the entry block then derive a condition that if water and power is not available then it should directly stop.
2. If water and power are available then cloths shall soak and then wash after 2000Sec.
3. After washing then it shall go for rinsing after 100Sec.
4. After rinsing then it shall go for dryer after 20Sec.
5. Then finally it shall enter into completed.
Result:-

2.
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
Simulink:-

procedure:-
1.Create a state flow that,when speed is 0 to 15 gear it shall be in gear 1,
2.when speed is 16 to 25 it shall be gear 2, when speed is 26 to 40 it shall be gear 3, when speed is 41 to 60 it shall be in gear 4, and finally when speed is above 61 it shall be in gear 5.
3. In the symbol pane select the Input as Input data and simiarly gear as output data.
4. Run the simulation by keeping the speed in the constant block and display at output block.

Result:-

Conclusion:- Here in example given speed as 100,so it showing as gear5.