Bird
Raised Fist0
PLC Programmingscripting~5 mins

Normally open (NO) contact in PLC Programming - Time & Space Complexity

Choose your learning style10 modes available
Time Complexity: Normally open (NO) contact
O(n)
Understanding Time Complexity

We want to understand how the time it takes to check a normally open (NO) contact changes as the number of contacts grows.

How does the program's work increase when more NO contacts are checked in sequence?

Scenario Under Consideration

Analyze the time complexity of the following code snippet.

// Example of checking multiple NO contacts in sequence
FOR i := 1 TO n DO
  IF NO_Contact[i] = TRUE THEN
    Output := TRUE;
  ELSE
    Output := FALSE;
  END_IF;
END_FOR;

This code checks each normally open contact one by one to decide the output.

Identify Repeating Operations

Identify the loops, recursion, array traversals that repeat.

  • Primary operation: Checking each NO contact's state.
  • How many times: Once for each contact, so n times.
How Execution Grows With Input

As the number of contacts increases, the program checks more contacts one after another.

Input Size (n)Approx. Operations
1010 checks
100100 checks
10001000 checks

Pattern observation: The number of operations grows directly with the number of contacts.

Final Time Complexity

Time Complexity: O(n)

This means the time to check all NO contacts grows in a straight line as you add more contacts.

Common Mistake

[X] Wrong: "Checking multiple NO contacts takes the same time no matter how many there are."

[OK] Correct: Each contact must be checked one by one, so more contacts mean more work and more time.

Interview Connect

Understanding how checking multiple contacts affects time helps you design efficient control logic and shows you can think about program speed in real systems.

Self-Check

"What if we checked NO contacts in parallel instead of one by one? How would the time complexity change?"

Practice

(1/5)
1. What does a Normally Open (NO) contact do in a PLC circuit?
easy
A. It remains open until activated, then closes to allow current flow.
B. It remains closed until activated, then opens to stop current flow.
C. It always stays closed regardless of activation.
D. It always stays open regardless of activation.

Solution

  1. Step 1: Understand NO contact default state

    A Normally Open contact is open by default, meaning no current flows through it initially.
  2. Step 2: Behavior when activated

    When the NO contact is activated (e.g., button pressed), it closes, allowing current to flow.
  3. Final Answer:

    It remains open until activated, then closes to allow current flow. -> Option A
  4. Quick Check:

    NO contact = open by default, closes when activated [OK]
Hint: NO means open until pressed, then closes [OK]
Common Mistakes:
  • Confusing NO with Normally Closed (NC) contact
  • Thinking NO contact is closed by default
  • Assuming NO contact always stays open
2. Which of the following is the correct syntax to represent a Normally Open (NO) contact in a PLC ladder logic program?
easy
A. --[/]-- symbol
B. |/| symbol
C. | | symbol
D. --[ ]-- symbol

Solution

  1. Step 1: Identify NO contact symbol

    The Normally Open contact is represented by two parallel vertical lines: | |.
  2. Step 2: Differentiate from NC contact

    The Normally Closed contact uses |/| or --[/]-- symbols, which are different.
  3. Final Answer:

    | | symbol -> Option C
  4. Quick Check:

    NO contact = | | [OK]
Hint: NO contact looks like two parallel lines | | [OK]
Common Mistakes:
  • Using NC contact symbol for NO contact
  • Confusing ladder logic symbols
  • Mixing up contact and coil symbols
3. Given the following ladder logic snippet with a Normally Open (NO) contact named Start_Button controlling a coil Motor, what happens when Start_Button is pressed?
--| |--( )--
  Start_Button  Motor
medium
A. Motor coil de-energizes, turning the motor OFF.
B. Motor coil energizes, turning the motor ON.
C. Nothing happens; the motor state remains unchanged.
D. Motor coil toggles ON and OFF rapidly.

Solution

  1. Step 1: Analyze NO contact behavior when pressed

    Pressing the Start_Button closes the NO contact, allowing current to flow.
  2. Step 2: Effect on coil Motor

    Current energizes the Motor coil, turning the motor ON.
  3. Final Answer:

    Motor coil energizes, turning the motor ON. -> Option B
  4. Quick Check:

    NO contact pressed = coil energized [OK]
Hint: Pressing NO contact energizes coil [OK]
Common Mistakes:
  • Assuming coil de-energizes when NO contact closes
  • Thinking NO contact does not affect coil
  • Confusing coil with contact behavior
4. In the ladder logic below, the Normally Open (NO) contact Sensor is supposed to start the Conveyor motor. However, the motor never starts even when the sensor is triggered. What is the likely error?
--|/|--( )--
 Sensor Conveyor
medium
A. The contact is Normally Closed (NC) instead of Normally Open (NO).
B. The coil Conveyor is wired incorrectly.
C. The sensor is not physically connected.
D. The power supply is off.

Solution

  1. Step 1: Identify contact type in code

    The contact symbol |/| represents a Normally Closed (NC) contact, not Normally Open (NO).
  2. Step 2: Effect of NC contact on motor start

    Since the sensor is triggered (activated), the NC contact opens, breaking the circuit and preventing the motor from starting.
  3. Final Answer:

    The contact is Normally Closed (NC) instead of Normally Open (NO). -> Option A
  4. Quick Check:

    Wrong contact type = motor won't start [OK]
Hint: Check contact symbol: |/| means NC, not NO [OK]
Common Mistakes:
  • Confusing NC and NO contact symbols
  • Assuming coil wiring is always the issue
  • Ignoring sensor physical connection
5. You want to design a control circuit where a Normally Open (NO) start button must be pressed to start a machine. Which logic setup correctly uses the NO contact to achieve this?
hard
A. Use the NO contact in series with the motor coil; pressing the button breaks the circuit to start the machine.
B. Use the NO contact in parallel with the motor coil; pressing the button breaks the circuit to start the machine.
C. Use the NO contact in parallel with the motor coil; pressing the button energizes the coil to start the machine.
D. Use the NO contact in series with the motor coil; pressing the button energizes the coil to start the machine.

Solution

  1. Step 1: Understand NO contact behavior in start circuit

    A Normally Open start button is open by default, meaning no current flows through it initially (machine OFF).
  2. Step 2: Effect of pressing NO start button

    When the NO button is pressed, it closes, allowing current to flow and energizing the motor coil to start the machine.
  3. Final Answer:

    Use the NO contact in series with the motor coil; pressing the button energizes the coil to start the machine. -> Option D
  4. Quick Check:

    NO series press = coil energized to start [OK]
Hint: NO start button in series energizes coil when pressed [OK]
Common Mistakes:
  • Placing NO contact in parallel for start function
  • Assuming pressing NO button breaks circuit to start
  • Confusing NO and NC contacts in control circuits
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