Bird
Raised Fist0
PLC Programmingscripting~10 mins

Series logic (AND condition) in PLC Programming - Step-by-Step Execution

Choose your learning style10 modes available
Concept Flow - Series logic (AND condition)
Start
↓
Check Input A
↓
Is A ON?
No→Output OFF
Yes↓
Check Input B
↓
Is B ON?
No→Output OFF
Yes↓
Set Output ON
↓
End
The series logic checks each input in order; output turns ON only if all inputs are ON.
Execution Sample
PLC Programming
IF InputA AND InputB THEN
  Output := TRUE;
ELSE
  Output := FALSE;
END_IF;
This PLC code sets Output ON only if both InputA and InputB are ON.
Execution Table
StepInputAInputBCondition (InputA AND InputB)Output Action
1OFFOFFFALSEOutput = FALSE
2ONOFFFALSEOutput = FALSE
3OFFONFALSEOutput = FALSE
4ONONTRUEOutput = TRUE
💡 Output is TRUE only when both InputA and InputB are ON; otherwise FALSE.
Variable Tracker
VariableStartStep 1Step 2Step 3Step 4
InputAOFFOFFONOFFON
InputBOFFOFFOFFONON
OutputFALSEFALSEFALSEFALSETRUE
Key Moments - 2 Insights
Why is the output OFF when only one input is ON?
Because the AND condition requires both InputA and InputB to be ON. The execution_table rows 2 and 3 show the output remains FALSE when only one input is ON.
What happens if both inputs are OFF?
The output stays OFF since the AND condition is FALSE. See execution_table row 1 where both inputs are OFF and output is FALSE.
Visual Quiz - 3 Questions
Test your understanding
Look at the execution table, what is the output when InputA is ON and InputB is OFF?
AOutput is TRUE
BOutput is FALSE
COutput toggles ON and OFF
DOutput is undefined
💡 Hint
Check execution_table row 2 where InputA=ON and InputB=OFF, output is FALSE.
At which step do both inputs become ON, causing the output to turn ON?
AStep 1
BStep 3
CStep 4
DStep 2
💡 Hint
See execution_table row 4 where InputA=ON and InputB=ON, output=TRUE.
If InputB changes from OFF to ON at step 3, how does the output change?
AOutput stays FALSE until InputA is ON
BOutput stays TRUE regardless
COutput turns TRUE immediately
DOutput toggles randomly
💡 Hint
Refer to variable_tracker and execution_table rows 3 and 4; output only TRUE when both inputs ON.
Concept Snapshot
Series logic (AND condition):
- Output is ON only if all inputs are ON.
- Syntax: IF InputA AND InputB THEN Output := TRUE ELSE Output := FALSE END_IF;
- If any input is OFF, output is OFF.
- Used to ensure multiple conditions are met before action.
Full Transcript
Series logic with AND condition means the output turns ON only when all inputs are ON. The PLC code checks InputA and InputB. If both are ON, output becomes TRUE; otherwise, it stays FALSE. The execution table shows four steps with different input combinations and the resulting output. Beginners often wonder why output stays OFF if only one input is ON; this is because AND requires all inputs ON. The visual quiz tests understanding of input-output relations at each step.

Practice

(1/5)
1. What does series logic with an AND condition mean in PLC programming?
easy
A. The output is true when no input conditions are true
B. Only one input condition needs to be true for the output to be true
C. The output toggles randomly regardless of inputs
D. All input conditions must be true for the output to be true

Solution

  1. Step 1: Understand AND condition meaning

    AND means all inputs must be true together to get true output.
  2. Step 2: Apply to series logic

    In series logic, inputs are connected so output is true only if every input is true.
  3. Final Answer:

    All input conditions must be true for the output to be true -> Option D
  4. Quick Check:

    AND means all true = output true [OK]
Hint: AND means every input must be true for output true [OK]
Common Mistakes:
  • Thinking only one input needs to be true
  • Confusing AND with OR logic
  • Assuming output toggles without input conditions
2. Which of the following is the correct syntax for a series AND condition in a PLC ladder logic rung?
easy
A. --( )--[ ]--[ ]-- output before inputs
B. --[ ]--+--[ ]--( )-- where contacts are in parallel
C. --[ ]--[ ]--( )-- where both contacts are in series
D. --[ ]--[ ]--[ ]-- without output coil

Solution

  1. Step 1: Identify series AND syntax

    Series AND means contacts connected one after another in a line before output coil.
  2. Step 2: Match with options

    --[ ]--[ ]--( )-- where both contacts are in series shows two contacts in series before output coil, which is correct.
  3. Final Answer:

    --[ ]--[ ]--( )-- where both contacts are in series -> Option C
  4. Quick Check:

    Series contacts before coil = AND logic [OK]
Hint: Series contacts before coil mean AND logic [OK]
Common Mistakes:
  • Choosing parallel contacts which mean OR logic
  • Placing output coil before inputs
  • Missing output coil in the rung
3. Given the following PLC ladder logic snippet with two inputs I1 and I2 in series controlling output Q1:
--[ I1 ]--[ I2 ]--( Q1 )--
What will be the state of Q1 if I1 = TRUE and I2 = FALSE?
medium
A. Q1 will be FALSE
B. Q1 will be TRUE
C. Q1 will toggle ON and OFF
D. Q1 will remain in previous state

Solution

  1. Step 1: Analyze input states in series

    Since I1 is TRUE but I2 is FALSE, the series AND condition fails because both must be TRUE.
  2. Step 2: Determine output Q1 state

    Output Q1 will be FALSE because the AND condition requires all inputs TRUE.
  3. Final Answer:

    Q1 will be FALSE -> Option A
  4. Quick Check:

    AND needs all TRUE, here I2 is FALSE, so output FALSE [OK]
Hint: If any input FALSE in series, output is FALSE [OK]
Common Mistakes:
  • Assuming output is TRUE if one input is TRUE
  • Thinking output toggles without input change
  • Ignoring the FALSE input in series
4. Identify the error in this PLC ladder logic snippet intended to implement series AND logic:
--[ I1 ]--+--[ I2 ]--( Q1 )--
|
( )

What is wrong with this design?
medium
A. Inputs I1 and I2 are in parallel, not series
B. Output coil Q1 is missing
C. Input I1 is not connected to power rail
D. There is no error; logic is correct

Solution

  1. Step 1: Examine input connection style

    The '+' symbol and branching show I1 and I2 are connected in parallel, not series.
  2. Step 2: Understand effect on logic

    Parallel inputs mean OR logic, not AND series logic as intended.
  3. Final Answer:

    Inputs I1 and I2 are in parallel, not series -> Option A
  4. Quick Check:

    Parallel = OR, not series AND [OK]
Hint: Parallel branches mean OR, series means one after another [OK]
Common Mistakes:
  • Confusing parallel with series wiring
  • Ignoring ladder diagram symbols
  • Assuming output coil is missing
5. You want a motor to start only when three safety switches S1, S2, and S3 are all ON. Which ladder logic snippet correctly implements this series AND condition for output M1?
hard
A. --[ S1 ]--+--[ S2 ]--+--[ S3 ]--( M1 )--
B. --[ S1 ]--[ S2 ]--[ S3 ]--( M1 )--
C. --[ S1 ]--[ S2 ]--+--[ S3 ]--( M1 )--
D. --[ S1 ]--( M1 )--[ S2 ]--[ S3 ]--

Solution

  1. Step 1: Identify series AND condition

    All switches must be connected in series (one after another) before output coil.
  2. Step 2: Check each option

    --[ S1 ]--[ S2 ]--[ S3 ]--( M1 )-- shows S1, S2, S3 in series before M1 coil, correct for AND logic.
  3. Final Answer:

    --[ S1 ]--[ S2 ]--[ S3 ]--( M1 )-- -> Option B
  4. Quick Check:

    Series contacts = AND condition for motor start [OK]
Hint: Connect all switches in series before output coil for AND [OK]
Common Mistakes:
  • Using parallel branches which create OR logic
  • Placing output coil before inputs
  • Mixing series and parallel incorrectly
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