Latching Circuit (Seal-in Logic) in PLC Programming
📖 Scenario: You are working with a simple machine control system. The machine should start when a Start button is pressed and keep running even if the Start button is released. The machine should stop when a Stop button is pressed. This is called a latching circuit or seal-in logic.
🎯 Goal: Build a latching circuit using PLC ladder logic instructions. You will create variables for the Start and Stop buttons, a coil for the Motor, and write the logic to keep the motor running after the start button is released until the stop button is pressed.
📋 What You'll Learn
Create boolean variables for Start, Stop, and Motor
Create a variable SealIn to hold the latched state
Write the seal-in logic using a boolean expression
Output the state of the Motor variable
💡 Why This Matters
🌍 Real World
Latching circuits are used in industrial machines to keep motors or devices running after a start button is released, improving safety and control.
💼 Career
Understanding seal-in logic is essential for PLC programmers and automation engineers who design reliable control systems.
Progress0 / 4 steps
1
Create input and output variables
Create three boolean variables called Start, Stop, and Motor. Initialize Start and Stop to False, and Motor to False.
PLC Programming
Hint
Use simple assignments like Start = False to create the variables.
2
Create the seal-in variable
Create a boolean variable called SealIn and initialize it to False. This variable will hold the latched state of the motor.
PLC Programming
Hint
Just add SealIn = False below the other variables.
3
Write the seal-in logic
Write the seal-in logic using a boolean expression. Update SealIn to be True if Start is True or if SealIn is already True, but only if Stop is False. Use this expression: SealIn = (Start or SealIn) and not Stop. Then set Motor equal to SealIn.
PLC Programming
Hint
Use the exact expression SealIn = (Start or SealIn) and not Stop and then Motor = SealIn.
4
Display the motor state
Print the state of the Motor variable using print(f"Motor is {'ON' if Motor else 'OFF'}").
PLC Programming
Hint
Use the print statement exactly as shown to display if the motor is ON or OFF.
Practice
(1/5)
1. What is the main purpose of a latching circuit (seal-in logic) in PLC programming?
easy
A. To keep a device ON after pressing start until stop is pressed
B. To immediately turn off a device when start is pressed
C. To reset all outputs when the PLC powers on
D. To count the number of times a button is pressed
Solution
Step 1: Understand the function of latching circuits
Latching circuits keep an output ON even after the start input is released.
Step 2: Identify the stop input role
The stop input breaks the latch, turning the output OFF safely.
Final Answer:
To keep a device ON after pressing start until stop is pressed -> Option A
Quick Check:
Latching circuit = Keeps device ON until stopped [OK]
Hint: Remember: latch holds output ON until stop breaks it [OK]
Common Mistakes:
Thinking latch turns device OFF immediately after start
Confusing latch with reset logic
Ignoring the stop input function
2. Which of the following is the correct ladder logic rung for a latching circuit using a start pushbutton Start, stop pushbutton Stop, and output coil Motor?
easy
A. |---[Stop]---[Start]---(Motor)---|
| +----(Motor)---------|
B. |---[Start]---[Stop]---(Motor)---|
| | |
| +----(Motor)---------|
C. |---[Stop]---[Start]---(Motor)---|
| | |
| +----(Motor)---------|
D. |---[Start]---[Stop]---(Motor)---|
| +----(Motor)---------|
Solution
Step 1: Check the order of stop and start contacts
Stop is normally closed and should be first to allow breaking the circuit; start is normally open and second.
Step 2: Confirm the seal-in contact
The output coil Motor is used as a contact in parallel with Start to latch the circuit.
Final Answer:
Stop first, then Start, with Motor contact in parallel to Start -> Option C
Quick Check:
Stop before Start, Motor seals in [OK]
Hint: Stop contact always first; Motor seals in after Start [OK]
Common Mistakes:
Placing Start before Stop contact
Missing Motor contact in parallel
Confusing normally open and normally closed contacts
D. Start and Stop contacts are in wrong order; Stop should be first
Solution
Step 1: Check contact order
Stop contact should be first and normally closed to allow breaking the circuit safely.
Step 2: Confirm Start contact position
Start contact should be after Stop and normally open to energize Motor.
Final Answer:
Start and Stop contacts are in wrong order; Stop should be first -> Option D
Quick Check:
Stop first, then Start for correct latch [OK]
Hint: Stop contact always first to break circuit safely [OK]
Common Mistakes:
Placing Start before Stop
Confusing normally open/closed contacts
Missing Motor contact in parallel
5. You want to control a motor with a latching circuit but add a safety feature: the motor should only latch ON if a safety switch Safety is closed. Which ladder logic modification correctly adds this condition?
hard
A. Add Safety contact in series before Start and Motor contacts
B. Add Safety contact in parallel with Start
C. Add Safety contact in parallel with Stop
D. Add Safety contact in series after Motor coil
Solution
Step 1: Understand safety switch role
Safety must be closed to allow motor start; it should be in series to block power if open.
Step 2: Place Safety contact correctly
Putting Safety in series before Start and Motor ensures motor cannot latch if Safety is open.
Final Answer:
Add Safety contact in series before Start and Motor contacts -> Option A
Quick Check:
Safety in series blocks motor if open [OK]
Hint: Series Safety contact blocks motor if open [OK]
Common Mistakes:
Placing Safety in parallel, bypassing it
Putting Safety after Motor coil, ineffective
Confusing series and parallel placement
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.