Bird
Raised Fist0
PLC Programmingscripting~10 mins

Washing machine control sequence in PLC Programming - Step-by-Step Execution

Choose your learning style10 modes available
Concept Flow - Washing machine control sequence
Start
↓
Fill Water
↓
Wash Cycle
↓
Drain Water
↓
Spin Cycle
↓
End
The washing machine control sequence starts by filling water, then washing, draining, spinning, and finally stopping.
Execution Sample
PLC Programming
IF Start THEN
  FillWater := TRUE;
  IF WaterLevel = Full THEN
    WashCycle := TRUE;
  END_IF;
END_IF;
This PLC code snippet starts filling water when the start signal is on, then starts the wash cycle when water is full.
Execution Table
StepStart SignalFillWaterWaterLevelWashCycleDrainWaterSpinCycleAction
1ONTRUEEmptyFALSEFALSEFALSEStart filling water
2ONTRUEFullTRUEFALSEFALSEWater full, start wash cycle
3ONFALSEFullTRUEFALSEFALSEWash cycle running
4ONFALSEFullFALSETRUEFALSEDrain water after wash
5ONFALSEEmptyFALSEFALSETRUESpin cycle running
6OFFFALSEEmptyFALSEFALSEFALSECycle complete, stop machine
💡 Start signal turned OFF, washing cycle completed
Variable Tracker
VariableStartAfter Step 1After Step 2After Step 3After Step 4After Step 5Final
Start SignalOFFONONONONONOFF
FillWaterFALSETRUEFALSEFALSEFALSEFALSEFALSE
WaterLevelEmptyEmptyFullFullFullEmptyEmpty
WashCycleFALSEFALSETRUETRUEFALSEFALSEFALSE
DrainWaterFALSEFALSEFALSEFALSETRUEFALSEFALSE
SpinCycleFALSEFALSEFALSEFALSEFALSETRUEFALSE
Key Moments - 3 Insights
Why does FillWater become FALSE after Step 2 even though Start is still ON?
FillWater turns FALSE after water reaches Full level (Step 2) to stop filling and start washing, as shown in execution_table row 3.
Why is WashCycle TRUE in Step 3 but FillWater is FALSE?
Once water is full, FillWater stops and WashCycle starts, so they don't run simultaneously. See execution_table rows 2 and 3.
What causes the machine to stop at Step 6?
The Start Signal turns OFF at Step 6, which stops all cycles and ends the washing process, as shown in the exit_note.
Visual Quiz - 3 Questions
Test your understanding
Look at the execution_table, what is the value of WashCycle at Step 4?
ATRUE
BFALSE
CUNKNOWN
DDepends on WaterLevel
💡 Hint
Check the WashCycle column in execution_table row for Step 4.
At which step does the SpinCycle start running?
AStep 5
BStep 4
CStep 3
DStep 6
💡 Hint
Look at the SpinCycle column in execution_table to find when it becomes TRUE.
If the Start Signal stays ON after Step 6, what would happen to the DrainWater variable?
AIt would stay TRUE
BIt would become TRUE at Step 6
CIt would become FALSE after Step 5
DIt would never become TRUE
💡 Hint
Refer to DrainWater values in variable_tracker and execution_table after Step 5.
Concept Snapshot
Washing machine control sequence in PLC:
Start signal triggers FillWater.
When water is Full, FillWater stops, WashCycle starts.
After washing, DrainWater activates.
Then SpinCycle runs.
Start OFF stops all cycles.
Full Transcript
This visual execution trace shows a washing machine control sequence using PLC programming. The process begins when the Start signal is ON, triggering FillWater to TRUE. When WaterLevel reaches Full, FillWater turns FALSE and WashCycle starts. After washing, DrainWater activates to empty water. Then SpinCycle runs to dry clothes. Finally, when the Start signal turns OFF, all cycles stop and the machine ends the process. Variables change step-by-step to control each phase, ensuring the machine runs in order and stops safely.

Practice

(1/5)
1. In a washing machine control sequence, what is the main purpose of using timers?
easy
A. To turn the machine on and off manually
B. To measure water temperature
C. To detect if the door is open
D. To control how long each washing step runs

Solution

  1. Step 1: Understand washing machine steps

    The washing machine runs steps like filling, washing, rinsing, and spinning, each needing a set time.
  2. Step 2: Role of timers in automation

    Timers control how long each step runs automatically without manual intervention.
  3. Final Answer:

    To control how long each washing step runs -> Option D
  4. Quick Check:

    Timers = control step duration [OK]
Hint: Timers set step durations automatically [OK]
Common Mistakes:
  • Confusing timers with manual switches
  • Thinking timers detect door status
  • Assuming timers measure temperature
2. Which of the following is the correct way to represent a step transition in a PLC ladder logic for washing machine control?
easy
A. IF timer_done THEN next_step = TRUE
B. FOR step IN sequence DO run()
C. while(timer < max) { step = next }
D. switch(step) { case timer: run }

Solution

  1. Step 1: Identify PLC ladder logic style

    PLC ladder logic uses conditions like IF timer_done THEN to move to next step.
  2. Step 2: Match correct syntax

    IF timer_done THEN next_step = TRUE uses a simple IF condition to set the next step flag, matching PLC logic style.
  3. Final Answer:

    IF timer_done THEN next_step = TRUE -> Option A
  4. Quick Check:

    IF timer_done THEN next_step [OK]
Hint: Look for IF condition style for PLC step control [OK]
Common Mistakes:
  • Using programming loops not typical in PLC ladder logic
  • Confusing switch-case with PLC logic
  • Using syntax from other programming languages
3. Given this PLC pseudocode for washing machine steps:
step = 1
if step == 1 and timer_done:
    step = 2
elif step == 2 and timer_done:
    step = 3
elif step == 3 and timer_done:
    step = 4

What will be the value of step after three timer_done events?
medium
A. 1
B. 4
C. 3
D. 2

Solution

  1. Step 1: Trace step changes on timer_done events

    Initially step=1. After first timer_done, step=2. After second, step=3. After third, step=4.
  2. Step 2: Confirm final step value

    After three timer_done events, step reaches 4.
  3. Final Answer:

    4 -> Option B
  4. Quick Check:

    3 timer_done events advance step to 4 [OK]
Hint: Count timer_done events to track step increments [OK]
Common Mistakes:
  • Stopping count at 3 instead of 4
  • Confusing elif conditions
  • Ignoring step update after each event
4. Identify the error in this PLC pseudocode snippet controlling washing machine steps:
if step == 1 and timer_done:
    step = 2
if step == 2 and timer_done:
    step = 3
if step == 3 and timer_done:
    step = 4

What problem can occur during execution?
medium
A. Multiple steps may be skipped in one cycle
B. The timer_done flag is never checked
C. Step never changes from 1
D. Syntax error due to missing else

Solution

  1. Step 1: Analyze if statements without else

    All if statements run independently, so if timer_done is true, multiple steps can update in one cycle.
  2. Step 2: Understand effect on step variable

    Step can jump from 1 to 4 in one cycle, skipping intermediate steps.
  3. Final Answer:

    Multiple steps may be skipped in one cycle -> Option A
  4. Quick Check:

    Separate ifs cause multiple step changes [OK]
Hint: Use elif to prevent multiple step changes [OK]
Common Mistakes:
  • Assuming only one if runs per cycle
  • Ignoring need for exclusive conditions
  • Thinking timer_done is unchecked
5. You want to add a safety check to the washing machine PLC program to prevent spinning if the door is open. Which logic addition correctly implements this?
hard
A. if door_open and step == 'spin': skip spinning step
B. if step == 'spin' or door_open: start spinning immediately
C. if door_closed and step == 'spin' and timer_done: proceed to next step
D. if door_closed or step != 'spin': stop the machine

Solution

  1. Step 1: Understand safety requirement

    Spinning should only happen if the door is closed to avoid accidents.
  2. Step 2: Choose logic that checks door status before spinning

    if door_closed and step == 'spin' and timer_done: proceed to next step checks door_closed before allowing spinning step to proceed, ensuring safety.
  3. Final Answer:

    if door_closed and step == 'spin' and timer_done: proceed to next step -> Option C
  4. Quick Check:

    Door closed required before spin step [OK]
Hint: Check door_closed before spinning step [OK]
Common Mistakes:
  • Using OR instead of AND allowing unsafe spin
  • Skipping spin step without proper condition
  • Stopping machine incorrectly on door status
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard