📖 Scenario: You are programming a simple machine that performs three steps in order. Each step runs for a set time controlled by timers.This is common in factories where machines must run steps one after another automatically.
🎯 Goal: Build a step sequence program using timers to control each step's duration.The program will move from Step 1 to Step 2 to Step 3 automatically, each running for a fixed time.
📋 What You'll Learn
Create a variable to track the current step number
Create timer variables for each step with preset times
Write logic to move to the next step when the timer finishes
Output the current step number
💡 Why This Matters
🌍 Real World
Step sequences with timers are used in manufacturing machines, conveyor belts, and automated processes to control operations in order.
💼 Career
PLC programmers and automation engineers use step sequences with timers to build reliable machine control programs.
Progress0 / 4 steps
1
Create the step counter variable
Create a variable called current_step and set it to 1 to start the sequence at Step 1.
PLC Programming
Hint
Use the assignment operator := to set current_step to 1.
2
Define timers for each step
Create three timer variables called timer1, timer2, and timer3. Set their preset times to 5, 3, and 4 seconds respectively.
PLC Programming
Hint
Use the PT property to set the preset time of each timer.
3
Write the step sequence logic
Write logic using IF statements to start the timer for the current step and move to the next step when the timer is done. Use current_step to track steps 1, 2, and 3.
PLC Programming
Hint
Use IF and ELSIF to check current_step. Set timer IN to TRUE to start it. When Q is TRUE, stop timer and update current_step.
4
Display the current step
Write a statement to output the value of current_step so we can see which step is active.
PLC Programming
Hint
In a real PLC, you would assign current_step to an output or display it. Here, imagine the output shows the current step number.
Practice
(1/5)
1. What is the main purpose of using timers in a step sequence in PLC programming?
easy
A. To wait a set time before moving to the next step
B. To immediately jump to the last step
C. To reset the entire program
D. To skip steps randomly
Solution
Step 1: Understand the role of timers in step sequences
Timers are used to create delays between steps, ensuring each step runs for a set time.
Step 2: Identify the correct timer function
The timer waits before allowing the sequence to move to the next step, controlling timing precisely.
Final Answer:
To wait a set time before moving to the next step -> Option A
Quick Check:
Timers delay steps = A [OK]
Hint: Timers pause steps to control sequence timing [OK]
Common Mistakes:
Thinking timers skip steps
Assuming timers reset the program
Believing timers jump to last step
2. Which of the following is the correct way to start a timer in a PLC step sequence?
easy
A. StartTimer(T1, 5s)
B. TimerStart T1 5
C. TON T1, 5s
D. T1 = Timer(5)
Solution
Step 1: Recognize standard PLC timer syntax
In many PLC languages, the TON (Timer ON Delay) instruction is used with a timer name and preset time.
Step 2: Compare options to standard syntax
TON T1, 5s uses 'TON T1, 5s' which matches common PLC timer start syntax.
Final Answer:
TON T1, 5s -> Option C
Quick Check:
TON is standard timer start = C [OK]
Hint: Look for TON keyword to start timers [OK]
Common Mistakes:
Using incorrect function names
Missing TON keyword
Wrong timer parameter format
3. Given this step sequence code snippet:
Step 1: Start TON timer T1 for 3 seconds Step 2: When T1 done, move to Step 2 and start TON timer T2 for 2 seconds Step 3: When T2 done, move to Step 3
What is the total time before Step 3 starts?
medium
A. 5 seconds
B. 2 seconds
C. 3 seconds
D. Cannot be determined
Solution
Step 1: Add timer durations sequentially
Step 1 waits 3 seconds, then Step 2 waits 2 seconds before Step 3.
Step 2: Calculate total wait time
Total time = 3 seconds + 2 seconds = 5 seconds.
Final Answer:
5 seconds -> Option A
Quick Check:
3s + 2s = 5s total [OK]
Hint: Add timer durations in sequence for total delay [OK]
Common Mistakes:
Only counting one timer duration
Confusing timer start with timer done
Assuming timers run in parallel
4. You have a step sequence with timers but the sequence moves to the next step immediately without waiting. What is the most likely error?
medium
A. Timer is counting up correctly
B. Timer preset value is set to zero
C. Step sequence is missing
D. PLC power is off
Solution
Step 1: Identify why timer causes no delay
If the timer preset is zero, it finishes instantly, causing no wait.
Step 2: Check other options
Counting up correctly means timer works; missing sequence or power off would stop all operation.
Final Answer:
Timer preset value is set to zero -> Option B
Quick Check:
Zero preset = no delay [OK]
Hint: Check timer preset is not zero for delay [OK]
Common Mistakes:
Ignoring timer preset value
Assuming power off causes immediate step
Confusing timer counting with preset
5. You want a step sequence that: 1. Starts motor for 4 seconds, 2. Waits 3 seconds with motor off, 3. Then starts motor again.
Which timer setup correctly implements this sequence?
hard
A. Step 1: TON T1, 4s; Step 2: TON T2, 3s; Step 3: Motor ON
B. Step 1: Motor ON; Step 2: TON T1, 4s; Step 3: TON T2, 3s; Step 4: Motor ON
C. Step 1: TON T1, 3s; Step 2: Motor ON; Step 3: TON T2, 4s
D. Step 1: Motor ON and TON T1, 4s; Step 2: Motor OFF and TON T2, 3s; Step 3: Motor ON
Solution
Step 1: Match motor state with timers per step
Step 1 must run motor ON while timer T1 counts 4 seconds; Step 2 motor OFF with timer T2 for 3 seconds; Step 3 motor ON again.
Step 2: Verify options
Only Step 1: Motor ON and TON T1, 4s; Step 2: Motor OFF and TON T2, 3s; Step 3: Motor ON correctly pairs motor ON/OFF states with timers in the right steps.
Final Answer:
Step 1: Motor ON and TON T1, 4s; Step 2: Motor OFF and TON T2, 3s; Step 3: Motor ON -> Option D
Quick Check:
Motor state matches timers per step = D [OK]
Hint: Pair motor ON/OFF with timers in each step [OK]
Common Mistakes:
Not turning motor OFF during wait
Mixing timer durations
Skipping motor control in steps
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.