Bird
Raised Fist0
PLC Programmingscripting~5 mins

Normally closed (NC) contact in PLC Programming - Time & Space Complexity

Choose your learning style10 modes available
Time Complexity: Normally closed (NC) contact
O(1)
Understanding Time Complexity

We want to understand how the time it takes to check a normally closed contact changes as the program runs.

Specifically, how does the number of operations grow when the contact is checked repeatedly?

Scenario Under Consideration

Analyze the time complexity of the following code snippet.

// Check if normally closed contact is active
IF NOT Input_NC THEN
  Output := TRUE;
ELSE
  Output := FALSE;
END_IF;

This code checks a normally closed contact input and sets an output based on its state.

Identify Repeating Operations

Identify the loops, recursion, array traversals that repeat.

  • Primary operation: Single logical check of the contact state.
  • How many times: This check happens once each program scan cycle.
How Execution Grows With Input

The operation is a simple check that does not depend on input size.

Input Size (n)Approx. Operations
101 check per scan
1001 check per scan
10001 check per scan

Pattern observation: The number of operations stays the same regardless of input size.

Final Time Complexity

Time Complexity: O(1)

This means the time to check the normally closed contact stays constant no matter how many times the program runs.

Common Mistake

[X] Wrong: "Checking a normally closed contact takes longer as more contacts are added."

[OK] Correct: Each contact check is independent and simple, so adding more contacts does not slow down checking one contact.

Interview Connect

Understanding simple operations like checking a normally closed contact helps build a strong foundation for analyzing more complex PLC programs.

Self-Check

"What if we checked multiple normally closed contacts in a loop? How would the time complexity change?"

Practice

(1/5)
1. What does a Normally Closed (NC) contact do in a PLC circuit?
easy
A. It allows current to flow when the input is OFF.
B. It allows current to flow only when the input is ON.
C. It always blocks current regardless of input.
D. It acts like a fuse that breaks the circuit permanently.

Solution

  1. Step 1: Understand NC contact behavior

    A Normally Closed contact is closed (conducts electricity) when the input is OFF.
  2. Step 2: Apply to PLC circuit

    This means current flows through the NC contact when the input is not activated.
  3. Final Answer:

    It allows current to flow when the input is OFF. -> Option A
  4. Quick Check:

    NC contact closed when input OFF = B [OK]
Hint: NC contact is closed when input is OFF, open when ON [OK]
Common Mistakes:
  • Confusing NC with Normally Open (NO) contact
  • Thinking NC contact conducts when input is ON
  • Assuming NC contact permanently blocks current
2. Which of the following is the correct way to represent a Normally Closed (NC) contact in a PLC ladder logic diagram?
easy
A. A coil symbol with a slash
B. A contact symbol without any slash or line
C. A normally open push button symbol
D. A contact symbol with a slash or line through it

Solution

  1. Step 1: Identify NC contact symbol

    In ladder logic, NC contacts are shown as contacts with a slash or diagonal line through them.
  2. Step 2: Compare options

    A contact symbol with a slash or line through it matches this description, while others represent different elements.
  3. Final Answer:

    A contact symbol with a slash or line through it -> Option D
  4. Quick Check:

    NC contact symbol has slash = C [OK]
Hint: Look for slash on contact symbol for NC contact [OK]
Common Mistakes:
  • Choosing coil symbols instead of contact symbols
  • Confusing NC with NO contact symbol
  • Selecting symbols without slashes for NC
3. Given the following ladder logic snippet with an NC contact labeled X controlling output Y:
--[ /X ]--( Y )--
If input X is OFF, what will be the state of output Y?
medium
A. Output Y will toggle ON and OFF rapidly
B. Output Y will be OFF
C. Output Y will be ON
D. Output Y will be in an error state

Solution

  1. Step 1: Understand NC contact behavior with input OFF

    NC contact is closed when input X is OFF, so current flows through it.
  2. Step 2: Determine output state

    Since the NC contact is closed, output Y coil is energized and turns ON.
  3. Final Answer:

    Output Y will be ON -> Option C
  4. Quick Check:

    NC contact closed when input OFF means output ON = A [OK]
Hint: NC contact closed when input OFF energizes output [OK]
Common Mistakes:
  • Assuming output is OFF when input is OFF
  • Confusing NC with NO contact behavior
  • Thinking output toggles without cause
4. You have a ladder logic rung with an NC contact controlling a motor start coil. The motor never stops even when the stop button is pressed. What is the most likely error?
medium
A. The NC contact is wired as a Normally Open (NO) contact by mistake.
B. The motor coil is wired backwards.
C. The stop button is stuck in the ON position.
D. The NC contact is not connected to the correct input.

Solution

  1. Step 1: Analyze motor never stopping

    If motor never stops, the stop control is not breaking the circuit as expected.
  2. Step 2: Check NC contact wiring

    If the NC contact is wired as a Normally Open (NO) contact by mistake, pressing the stop button will not open the circuit, and the motor will keep running.
  3. Final Answer:

    The NC contact is wired as a Normally Open (NO) contact by mistake. -> Option A
  4. Quick Check:

    Motor never stops means NC contact wired as NO = D [OK]
Hint: Check if NC contact is wired as NO if stop fails [OK]
Common Mistakes:
  • Blaming coil wiring instead of contact wiring
  • Assuming button is stuck without checking wiring
  • Ignoring wrong contact type
5. In a safety circuit, a Normally Closed (NC) emergency stop button is used to control a machine. Which of the following best explains why NC contacts are preferred for emergency stops?
hard
A. Because NC contacts allow the machine to run even if the button is pressed.
B. Because if wiring fails or power is lost, the circuit opens and stops the machine safely.
C. Because NC contacts are cheaper and easier to install than NO contacts.
D. Because NC contacts keep the machine running continuously without interruption.

Solution

  1. Step 1: Understand safety requirement for emergency stop

    Emergency stop must stop machine immediately and safely if pressed or if wiring fails.
  2. Step 2: Explain NC contact advantage

    NC contact is closed normally, so if wiring breaks or power is lost, circuit opens and machine stops safely.
  3. Final Answer:

    Because if wiring fails or power is lost, the circuit opens and stops the machine safely. -> Option B
  4. Quick Check:

    NC contact fails safe by opening circuit = A [OK]
Hint: NC contacts fail safe by opening on wiring failure [OK]
Common Mistakes:
  • Thinking NC contacts keep machine running when pressed
  • Choosing cost or installation ease over safety
  • Confusing NC with NO contact behavior
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