Challenge

Week - 4

1.

A toggle switch is used here to provide power supply using a constant block as an input into the chart block, and the water supply is also provided using a constant block, which is connected to the slider switch.
The status of the washing machine is displayed using three lamp blocks.
The control logic is implemented using a State Flow Chart block.
The three lamps are connected to the Activate,LED, and Finished_LED output ports.


The Ports are initially set to '0' in the OFF State.
When the power supply is on (Power=1), the transition is made from the off state to the water supply state, and the Activate lamp turns green from red.
Whenever water is available i.e. Water = 1, the LED lamp turns from red to green. When there is no water supply, the lamp remains red.
As the next states transit after the given time, and once all the tasks have been completed i.e. Soaking,Washing,Rinsing,Dryer, it will be in the Finished state and the third lamp will turn green as well.

2.

A Knob block is used to provide speed information and a Display block is used to display it from the dashboard section of the Simulink library.An output displaying the gear number appears on the custom gauge block.

As a default, the State flow chart will enter 'test' state, and the signal speed is the input and the gear number is the output.

The transition condition will check the speed signal as per the execution order during the test state. It will move to the next state when the transition condition is true and will change the level value based on the new state.
All Gear states will move back to the test state as there is no condition to satisfy, and the loop will run forever.
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.