Week - 4
Q1 While implementing the washing machine logic i use the stateflow. In this i use the power supply and water Supply as the input. As i use the logic 1st i give the input supply to machine if it is on then it goes to 2nd condition for cheaking the water if water is high that is 1 then it is go for soak condition if it is 0 it run as repeting requence as power off, power on chek water as like. If water check condition is 1 soak condition is running after 200sec wash condition is running after 100 sec rins condition running and after 20 sec dry condition running then after 50 sec i use f as Complete the washing. In output i connect the display and lamp for showing the status.
Q2. In Gear shift logic i use the slider as speed variable and gauage aslo for showing the speed. then as i implement the logic as i insert the block as gear 1 with entry point as 1 if speed is greater than 15 then gear is shifted to 2nd gear if speed is less than 15 then car is run in 1st gear. Then 2nd block with entry 2 speed is greater than 25 then car is run in 3rd gear if speed is less than 25 car run in 2nd gear. Then 3rd block with entry point 3 speed is greater than 40 car is run in 4th gear if it is less then 40 car run in 3rd gear. Then 4th block with entry point 4 speed is greater than 60 car is running in 5th speed if it is less than 50 car run in 4th gear. If Speed is greater than 60 car is run in 5th gear.