Week - 4
Implement control logic of a “washing machine” using Stateflow as per given sequence:
1)
Aim:
To Implement control logic of a “washing machine” using Stateflow as per given sequence.
Explanation:
- Open a simulink workspace and open the flowchart and insert power,water,soaking,rinsing,drying,end blocks and connect them with the corresponding values.
- Add constant block and mention the values of 1 and 1 for power and water supply.
- Add slider switch and connect them with power and supply to on and off.
- Set the soaking time as 200s and washing time as 100s.
- Once the power supply is on the system will get activated.
- The rinsing will be happens on 20s and dryers should be run for 50s.
- Then open the modeling and click the symbol pane.
- Then select the Power and water as the input and rest as the output.
- Once finish connect all the inputs and outputs to the display.
- Then connect the display to the light and indicate them in two colours red and green.
- Once the water and power is turned on the sydtems starts to run and we can see the outputs in the light.
Result:
Therefore the control logic of a washing machine has been implemented.
2)
Aim: To make a simulink chart for the Gear Shaft.
Explanation:
- Open a simulink workspace and open the state flow.
- Insert the state flow for various gears as Gear 1,2,3,4,5.
- Enter the value for various gear as entry:g=1, as upto 5.
- Then set the speed range for various gear 1,2,3,4,5.
- Then enter the input as speed S and output as gear G.
- Insert the slider gain and connect them with a constant block.
- Then connect the slider gain into the flow chart.
- Then open the modeling and symbol pane and set the input as speed and the output as gravity.
- Then connect the gravity to display.
- Then run the program to see the output to confirm the stateflow.
Result:
Therfore the control logic of a washing machine has been implemented.