Challenge

Week - 4

Aim- Implement the control logic of a “washing machine” using Stateflow as per the given sequence:

  1. If the power supply is available, the system gets activated
  2. If the Water supply is not available, stop the process & indicate through the LED.
  3. Soaking time should be 200s followed by Washing time of 100s.
  4. Then rinsing happens for the next 20s & dryer runs for 50s

After all the processes have been completed turn on the finished LED.

Logic - If the power or water supply is not available the washing machine will stop and indicate through LED otherwise the process will be completed.

Stateflow diagram

there are two inputs, power and water, and 6 outputs.

Model

1. if both supplies are available

2. if one or more is not available

Output Explanation

if the supplies are available the process will complete and a green LED will indicate the process.

and if the supply is not available last LED will be turned red and the machine will stop.

2. Aim -

Make a Simulink chart for the “Gear shift” logic as per the below conditions:

Speed Range(kmph) Gear

0 to 15 1

16 to 25 2

26 to 40 3

41 to 60 4

Above 61 5

Give speed input while the simulation is running & display the gear number.

Stateflow Diagram

Model

Explanation

for the given conditions a chart is prepared to control the speed b using gear

to provide the speed at the run time slider is used and as the shown in figure speed is set by using the slider at 50KMph the display block shows the gear number 4.

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.