Week - 4
QUESTION1.
The aim here is to construct logic for a washing machine.
The inputs provided here are the power and water supply.To construct the logic,the stateflow is made use of.The states in which the machine can be are
1.Filling of water.
2.soaking.
3.washing.
4.Rinsing.
5.Drying.
According to the question,time span of 200,100,20 and 50 seconds are provided for soaking, washing, rinsing and drying after which an LED indication for completion is given. A logic for power supply is also provided, as the power supply turns off the process stops. Also in the starting, an alarm of "no water supply" is given in the absence of water supply. After the completion of the process, an led indication is given.


Question 2.
The aim here is to prepare the logic for shifting the gear according to speed.To draw the logic, sateflow is used. The speed -gear chart follows as-
1. 16 to 25 2
2. 26 to 40 3
3. 41 to 60 4
4. Above 61 5
The states here are Gear 1, Gear 2, Gear 3, Gear 4 and Gear 5. The state transition means increasing the gear number according to the speed value. The input is a speed value and the gear value is the output displayed.

