Week - 4
Question: 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.
Block used: control logic program, display, lamp, constant.
Different condition washing machine: power on, water source, soaking, washing, raising, dryer, end process.
Washing machine: It is device used in a washing a cloths and Run a different operation Without used manual power. The machine is used to washing and drying a cloths for some performing some kind of operation.
It is operates some state
1.prewash
2.washing
3.rinsing
4.spining
Simulation model:

Explanation: In this model given the two input power supply and water supply and seven output through the symbols pane. The output of the control logic flow is connected to the display and the output of display connected switch, So the light indication for the output.
Control logic flow chart:

Condition:
- switch off:

- power on:

water supply on:

- Soaking:

- Washing:

- Rinsing:

- Drying:

End:

(2)
Question: make the Simulink chart for gear shifting logic as per below condition.
Speed range (kmph) gear
0 to 15 1
16 to 25 2
26 to 40 3
41 to 60 4
Above 61 5
Simulation model:

Explanation:
In this model used control logic flow. the input of control logic flow is speed and speed is controlling to the constant block and output is gear 1 to 5 is output. The control logic flow output shown is display they connected by gear output. The output is connected to the lamp in simulation model.
In this model operates some different speed operation. the speed will be increase the vehicle gear should be automatically shifted upward, and speed will be decreases, gear shifted to downward.
Gear1: speed 0 to 15

Gear2: speed 16 to 25

Gear3: speed 26 to 40

Gear4: speed 41 to 60

Gear5: speed 60 above
