Week - 4
Q1)Implement control logic of a available of a"washing machine " using stateflow aaaaaas 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.
- saking time should be 200s following by washing machine time of 100s.
- then rinsing for next 20s & dryer run for 50s.
Answer:-Above mention the four condition,
Working:A washine machine by spining at 800-1600kmph.Help help soap & dry with it to leave the surface of the cloth viz centrifugal force into outlet pipe .
hences utilizing centrifugal sorce to both clwean & particulluy by dry the clothes in it&at a washing machine run by step to step .soaking,washing,rinsing ,dryer.eq
following block are used & system:-
1)state flow chart:- Systematic soluation of a program is posible with sequence unambigous & realized finite proccesss step.this set is called "Algorithum".it is process one of must important parth of the progroming lauguages hoe to learn Algorithum by using simulation & stateflow.

2)Constant block:-constant block used for given a input & output command at stateflow.
3)Display:Display are indicated the ON &OFF condition.
4)Lamp:-lamp are used for indicated ON & OFF conditon when given input command "1" then lap indicate ON condition & input command "0" then lamp indicated OFF.
Using system:-
- Soaking:- it is used to dip sloths in detergent water to remove dirt from the clothes .In this function customer need to select soak from a panel . soak this function is available with wash time.
- washing:- during the wash cycle,a large plastic agitator turns around , moving your clothes through the water the wash.when the wash is finished , the pump drains the water from the outer drum.
- rinsing:-the dirty,soapy water is drained then the washing machine is refilled and your clothes are "rewashed "in clean water .spin all the drained completly,then your clothes are spun very fast and axcess water is removed.
- Dryer:-they work by pushing warm dry air through your wet washing to extract moisture then cooling the now humid air in a heat exchanger to condensor the moisture.
If the power supply is available ,the system gets activated:

- if the water supply is not available ,stop the process & indicate through LED.

the two input are given for the power and water supply .once the input are given output are displayed by the flow chart as per given sequence.The system are observed by sometime then it is checked and the process is completed by given lights as displayed.
Q2)Make a simulink chart for the gear shift logic as per below conditions.
speed range (kmph) Gear
0 to 15 1
15 to 25 2
26 to 40 3
41 to 60 4
above 61 5
given speed input while the simulation is running & display yhe gear number.
Answer:-
Used block:-
1) stateflow:-systematic soluation of a program is posible with sequence unambigous & realized finite proccesss step.this set is called "Algorithum".it is process one of must important parth of the progroming
lauguages hoe to learn Algorithum by using simulation & stateflow.

2) slider gain:-this block are to vayring the speed of shaft,firstly selected the highes speed.move the slider tomodify the scalar gain.

3)Constant block:-constant block used for given a input command at stateflow.
4)Display:Display are indicated gear.

Gear shift logic:
The gear shift machanism for a manual transmision include a shaft axialy movable for selecting shaft planes and rotatable for engaging the gears defining the shaft planes. the shaft is help in a reference shift plane by two helical srings.
Results:
- Thus the control logic of a washing machine using stateflow is processed as per the given sequence and LED lights are turns to the green colour and the system is campleted
- A simulink model is created for the gear shaft logic and using slider gain the value are obtained.