Bird
Raised Fist0
PLC Programmingscripting~20 mins

Indicator light control in PLC Programming - Practice Problems & Coding Challenges

Choose your learning style10 modes available
Challenge - 5 Problems
🎖️
Indicator Light Control Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate
2:00remaining
What is the output of this ladder logic snippet controlling an indicator light?
Given a PLC ladder logic where a start button (I0.0) energizes a coil (Q0.0) for an indicator light, and a stop button (I0.1) de-energizes it, what is the state of Q0.0 after pressing start then stop?
PLC Programming
NETWORK 1
|--[ I0.0 ]----[ /I0.1 ]----( Q0.0 )--|

// Press sequence: Start (I0.0) pressed, then Stop (I0.1) pressed
AQ0.0 is OFF after pressing stop
BQ0.0 state is undefined
CQ0.0 toggles ON and OFF rapidly
DQ0.0 remains ON after pressing stop
Attempts:
2 left
💡 Hint
Think about how the stop button input affects the coil energizing.
📝 Syntax
intermediate
2:00remaining
Which of these structured text snippets correctly turns ON an indicator light when a sensor is active?
You want to write a structured text program that sets output Q0.1 ON when input I0.2 is TRUE. Which snippet is correct?
AIF (I0.2) Q0.1 := TRUE;
BIF I0.2 = TRUE THEN Q0.1 = TRUE END_IF
CIF I0.2 THEN Q0.1 := TRUE; END_IF;
DIF I0.2 THEN Q0.1 == TRUE; END_IF;
Attempts:
2 left
💡 Hint
Remember the assignment operator in structured text is := and IF statements need END_IF.
🔧 Debug
advanced
2:00remaining
Why does this ladder logic fail to turn ON the indicator light?
The ladder logic uses a normally open contact I0.3 to energize coil Q0.2. The indicator light never turns ON even when I0.3 is pressed. What is the likely cause?
PLC Programming
NETWORK 1
|--[ I0.3 ]----( Q0.2 )--|
AThe power supply to the PLC is off
BThe coil Q0.2 is not physically connected to the indicator light
CI0.3 is wired as normally closed instead of normally open
DThe input I0.3 is not configured as a digital input
Attempts:
2 left
💡 Hint
Check the configuration of the input device in the PLC hardware setup.
🚀 Application
advanced
2:00remaining
How to implement a flashing indicator light using a timer in ladder logic?
You want an indicator light (Q0.3) to flash ON and OFF every 1 second using a timer. Which ladder logic snippet achieves this?
AUse TON timer with 1s preset, coil Q0.3 energized when timer.Q is FALSE, and reset timer when timer.Q is TRUE
BUse TOF timer with 1s preset, coil Q0.3 energized when timer.Q is FALSE
CUse TON timer with 1s preset, coil Q0.3 energized when timer.Q is TRUE, and reset timer when timer.Q is TRUE
DUse TON timer with 1s preset, coil Q0.3 energized continuously without reset
Attempts:
2 left
💡 Hint
Think about how the timer output changes and how to toggle the coil accordingly.
🧠 Conceptual
expert
2:00remaining
What is the effect of using a latch (set/reset) instruction for indicator light control?
In PLC programming, using a latch (SET) instruction to turn ON an indicator light and a reset (RST) instruction to turn it OFF means:
AThe indicator light toggles ON and OFF automatically without inputs
BThe indicator light stays ON after the SET input is removed until RST is activated
CThe indicator light only turns ON while the SET input is active
DThe indicator light cannot be turned OFF once set
Attempts:
2 left
💡 Hint
Think about how latching instructions hold output states.

Practice

(1/5)
1. What is the main purpose of an indicator light in a PLC-controlled machine?
easy
A. To increase the machine's speed
B. To show the status of the machine or process clearly
C. To store data from the machine
D. To control the temperature of the machine

Solution

  1. Step 1: Understand indicator light function

    Indicator lights are used to show if a machine is running, stopped, or has a fault.
  2. Step 2: Match purpose to options

    Only To show the status of the machine or process clearly describes showing status clearly, which is the main purpose.
  3. Final Answer:

    To show the status of the machine or process clearly -> Option B
  4. Quick Check:

    Indicator lights = show status [OK]
Hint: Indicator lights always show machine status visually [OK]
Common Mistakes:
  • Thinking indicator lights control machine speed
  • Confusing indicator lights with data storage
  • Assuming indicator lights control temperature
2. Which of the following is the correct syntax to turn ON an indicator light named Light1 when a condition StartButton is TRUE in a PLC program?
easy
A. IF StartButton THEN Light1 = ON;
B. IF (StartButton) Light1 = ON;
C. IF StartButton Light1 = ON;
D. IF StartButton THEN Light1 ON;

Solution

  1. Step 1: Identify correct IF syntax in PLC

    Standard PLC IF syntax uses 'IF condition THEN action;' format.
  2. Step 2: Check each option

    IF StartButton THEN Light1 = ON; matches correct syntax with 'IF StartButton THEN Light1 = ON;'. Others miss THEN or equal sign.
  3. Final Answer:

    IF StartButton THEN Light1 = ON; -> Option A
  4. Quick Check:

    IF ... THEN ... = ...; syntax [OK]
Hint: Always use THEN and = in PLC IF statements [OK]
Common Mistakes:
  • Omitting THEN keyword
  • Missing equal sign for assignment
  • Incorrect parentheses usage
3. Given this PLC code snippet:
IF Sensor = TRUE THEN
  LightGreen = ON;
ELSE
  LightGreen = OFF;
END_IF;

What will be the state of LightGreen if Sensor is FALSE?
medium
A. LightGreen will be ON
B. LightGreen will blink
C. LightGreen state will not change
D. LightGreen will be OFF

Solution

  1. Step 1: Analyze IF condition with Sensor FALSE

    Since Sensor = FALSE, the ELSE branch runs.
  2. Step 2: Determine LightGreen state in ELSE branch

    ELSE sets LightGreen = OFF, so light turns off.
  3. Final Answer:

    LightGreen will be OFF -> Option D
  4. Quick Check:

    Sensor FALSE -> ELSE -> LightGreen OFF [OK]
Hint: FALSE condition triggers ELSE branch [OK]
Common Mistakes:
  • Assuming light stays ON when sensor is FALSE
  • Thinking light blinks automatically
  • Ignoring ELSE branch
4. Identify the error in this PLC code controlling an indicator light:
IF Start = TRUE THEN
  LightRed = ON
ELSE
  LightRed = OFF;
END_IF;
medium
A. Wrong variable name 'Start'
B. Incorrect use of ELSE keyword
C. Missing semicolon after 'LightRed = ON'
D. Missing END_IF statement

Solution

  1. Step 1: Check statement endings

    PLC statements require semicolons at end; 'LightRed = ON' lacks semicolon.
  2. Step 2: Verify other syntax parts

    ELSE and END_IF are correctly used; variable name 'Start' is valid.
  3. Final Answer:

    Missing semicolon after 'LightRed = ON' -> Option C
  4. Quick Check:

    Every statement ends with ; [OK]
Hint: Check every statement ends with a semicolon [OK]
Common Mistakes:
  • Forgetting semicolons
  • Misusing ELSE keyword
  • Assuming END_IF is optional
5. You want to control two indicator lights: LightGreen turns ON when MachineRunning is TRUE, and LightRed turns ON when MachineFault is TRUE. Which PLC code correctly implements this logic?
hard
A. IF MachineRunning THEN LightGreen = ON; ELSE LightGreen = OFF; END_IF;\nIF MachineFault THEN LightRed = ON; ELSE LightRed = OFF; END_IF;
B. IF MachineRunning = TRUE AND MachineFault = FALSE THEN LightGreen = ON; ELSE LightGreen = OFF; END_IF;
C. IF MachineRunning THEN LightGreen = ON; IF MachineFault THEN LightRed = ON; END_IF;
D. IF MachineRunning OR MachineFault THEN LightGreen = ON; ELSE LightRed = ON; END_IF;

Solution

  1. Step 1: Understand requirements for each light

    LightGreen depends only on MachineRunning; LightRed depends only on MachineFault.
  2. Step 2: Check each option for correct separate control

    IF MachineRunning THEN LightGreen = ON; ELSE LightGreen = OFF; END_IF;\nIF MachineFault THEN LightRed = ON; ELSE LightRed = OFF; END_IF; uses two separate IF blocks, correctly controlling each light independently.
  3. Step 3: Identify errors in other options

    IF MachineRunning = TRUE AND MachineFault = FALSE THEN LightGreen = ON; ELSE LightGreen = OFF; END_IF; combines conditions incorrectly; IF MachineRunning THEN LightGreen = ON; IF MachineFault THEN LightRed = ON; END_IF; misses ELSE for LightRed OFF; IF MachineRunning OR MachineFault THEN LightGreen = ON; ELSE LightRed = ON; END_IF; mixes logic wrongly.
  4. Final Answer:

    Separate IF blocks for each light with proper ON/OFF control -> Option A
  5. Quick Check:

    Separate IFs for independent lights [OK]
Hint: Control each light with its own IF-ELSE block [OK]
Common Mistakes:
  • Combining conditions incorrectly
  • Missing ELSE to turn lights OFF
  • Using OR instead of separate controls
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