Week - 4
1.
here they asked me to Implement control logic of a washing machine using Stateflow as per given sequence or conditions
- 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
* so, here i took two constant blocks one is for power and another one is for water supply. so, here if the block indicates 1 the power supply is on and the water supply is there. if the block indicates 0 the power supply is off and the water supply is off
* and then i took a chart block and opend it and took state blocks to implement the conditions given in the challange
* in that chart i had given the conditions that the soaking operation should be performed for 200sec, and then after the washing operation should perform for 100sec, and then after the rinsing operation should perform for 20sec, and then the drying operation should perform for 50sec. and the finish
* here i also assigned the entry values and the symbols pane
* after completing the chart block i took the 7 display blocks and connected each block to each output port of the chart i.e., (power, water, soaking, washing, rinsing, dryer and finish) and observed the output
and they also asked me to implement indication through led for the following conditions
- If the Water supply is not available, stop the process & indicate through LED
-
After all the processes have completed turn on the finished LED
so here instead of led i took lamp and connected to constant block of water supply and a diplay block of finish
* so, here if there is no power supply,all the display block shows the output as 0 and the lamp at the at the display block will indicate red colour and as the water supply is on so the lamp indicate green colour
* if the power supply is on and there is no water supply then also the process will not done and the output will be zero and as there is no water supply the lamp at the water block will indicates red and the lamp at the finish block will indicate red
* so if the both water and power supply avilable then only the operation is performed
here i am attaching the images of the model for the following conditions
if the power supply is off
if the water supply is stopped

if the both water and power supply is on

2.
here they asked me to 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
and also to plot a display of gear number according to the speed input
so here i had taken a constant as my input block and connected a slider block to it and i changed the highest value of the slider to 100.
* and then i had taken a chart and written a logic according to the given conditions.
* in chart i took state blocks and assigned the given conditions foe the following gears
* after that i also stated the blocks by using a symbols pane
* and then after took display blocks and connected each block to each output port of the chart
* here i had kept my stop time as infinite(inf), and then only we are able to see the result as per our conditions
* so, here if we observe, as the pointer in the slider changes the input will be changed and automatically the gear position will also be changed
* so, as per the given condition the gear position will changes as the input speed changes. i.e.,
Speed Range(kmph) Gear
0 to 15 1
16 to 25 2
26 to 40 3
41 to 60 4
Above 61 5
* as they asked me to note the gear position according the speed, i have noted and i am submitting the images of those conditions below
* the speed range is in between 0-15
* the speed range is in between 16-25

* the speed range is in between 26-40

* the speed range is in between 41-60

* the speed range is in between above 61

* here i am also attaching the image of a chart block

and i also attaching the following simulink models of the given challange at below
thank you,
B. V. N. SANDEEP