Week - 4
1) AIM:To implement the control logic of a washing machine using Stateflow as per given sequence
Explanation:
- First of all create the chart in the simulink workspace.
- Then add state flows in the chart as it is needed.Arrange the state flows in the sequence as it is operated in the washing machine.
- Give the directions of the state correctly as if the source value was not satisfied then it should falls back to its previous state.
- After arranging the state in the order,then mention the given conditions for the respective states.
- The run of the model was taken greater than the 370 sec,because the mention chart time of all state was 370 sec.
- Then by using symbols pane give the input and output of the state as mentioned.
- By lamp block give the colors of the block with respective chart as red and green.
- Run the model to check whether the model runs as in mentioned conditions and indication of lamp colors.
2)AIM: To make the simulink chart for the gear mechanism as per given conditions
- First by using the chart make all the state for different speed ranges.
- The inputs to the different state flows depend on the intial condition of the speed range in that respective gears.If it satifies it goes to the next state flow and displays the next gear number or else it shows the previous the gear number.
- To give the speed during simulation we use slider gain block to vary the speed at different gears.
- This block allows to give the inputs when the model is running.
- In the symbols pane give the input and output state flows as required.
- The display block allows to know the gear at different speed ranges.