Week - 4
Q.1
We have to design a control logic for a washing machine using a sate flow diagram .
Step1: Firstly creates a blocks in sateflow dig and give condition to each block .and crates a input data port.
Step 2: After inputing the condition go to the symbol paine and make a variable for each block .
Step3: Later give the different combination of input at input side and note the output at displays and lamps.

when water supply or power supply both are off then P=0 & W=0

When P=1 & W=1
When P=1 & W=0

When P=0 & W=1

Q. 2
Gear Shift mechanism
Step 1 Create a chart and enter the given conditions for gear shifting
Speed range gear
0 to 15 1
16 to 25 2
26 to 40 3
41 to 60 4
Above 61 5
Sttep 2: go to symbol pane and assign the given variable
Step 3: connect the slidergain to vary the speed while simulation is running
Step 4: create a constant and giving 1 & 0 for turning on Or off
Step 5 : create lamp and display block for output

when key = 0

When key =1
