Inst ToolsInst ToolsInst Tools
  • Courses
  • Videos
  • Q & A
    • Interview
      • Instrumentation
      • Electronics
      • Electrical
      • Practical Questions
    • MCQ
      • Instrumentation MCQ
      • Electrical MCQ
      • Electronics MCQ
      • Control Systems MCQ
      • Analog Electronics MCQ
      • Digital Electronics MCQ
      • Power Electronics MCQ
      • Microprocessor MCQ
      • Multiple Choice Questions
  • EE
    • Electronics
      • Electronics Q & A
      • Electronic Basics
      • Electronic Devices & Circuits
      • Electronics Animation
      • Digital Electronics
    • Electrical
      • Electrical Basics
      • Electrical Q & A
      • Power Electronics
      • Electrical Machines
      • Electrical Animation
      • Power Systems
      • Switchgear & Protection
      • Transmission & Distribution
  • Measure
    • Control Valves
    • Calibration
    • Temperature
    • Pressure
    • Flow
    • Level
    • Analyzers
    • Switches
    • Vibration
    • Solenoid Valve
  • Control
    • PLC Tutorials
    • Control Systems
    • Safety Instrumented System (SIS)
    • Communication
    • Fire & Gas System
  • More
    • Design
    • Tools
    • Animation
    • Basics
    • Formulas
    • Standards
    • TextBooks
    • Common
    • Software
    • Excel Tools
    • Erection & Commissioning
    • Process Fundamentals
    • Videos
    • Books
Search
All rights reserved. Reproduction in whole or in part without written permission is prohibited.
Reading: Safety Door Interlock PLC Program
Share
Notification Show More
Font ResizerAa
Inst ToolsInst Tools
Font ResizerAa
  • Courses
  • PLC Tutorials
  • Control Systems
Search
  • Courses
  • Videos
  • Q & A
    • Interview
    • MCQ
  • EE
    • Electronics
    • Electrical
  • Measure
    • Control Valves
    • Calibration
    • Temperature
    • Pressure
    • Flow
    • Level
    • Analyzers
    • Switches
    • Vibration
    • Solenoid Valve
  • Control
    • PLC Tutorials
    • Control Systems
    • Safety Instrumented System (SIS)
    • Communication
    • Fire & Gas System
  • More
    • Design
    • Tools
    • Animation
    • Basics
    • Formulas
    • Standards
    • TextBooks
    • Common
    • Software
    • Excel Tools
    • Erection & Commissioning
    • Process Fundamentals
    • Videos
    • Books
Follow US
All rights reserved. Reproduction in whole or in part without written permission is prohibited.
Inst Tools > Blog > PLC Tutorials > Safety Door Interlock PLC Program

Safety Door Interlock PLC Program

In this article, we will show the safety door interlock switch, and how to integrate it with Safety PLC logic coding.

Last updated: February 25, 2023 2:19 pm
Mahmoud Salama
PLC Tutorials
No Comments
Share
11 Min Read
SHARE

In a previous article, we talked about safety control circuits and how important are they for ensuring a safe environment for workers in industrial processes. And we also give a simple example for coding an emergency push button using a safety PLC with the TIA Portal platform.

Contents
Safety Door Interlock PLC Program Safety PLC Hardware ConfigurationSafety PLC Programming StepsImportant Notes on the SFDOOR blockSafety Door PLC Logic SimulationConclusion

In this article, we will show how to code another very common and important safety function, which is the safety door interlock switch, and how to integrate it into your normal process coding.

Contents:

  • Problem description.
  • Hardware configurations
  • Programming steps.
  • Code simulation.
  • Conclusion.

Safety Door Interlock PLC Program

You have a process or a part of a machine that is set up inside a closed section to prevent workers from going inside while the machine is running for their safety.

There is, of course, a door installed for this closed section and on that door, we have a safety interlock switch to indicate if the door is opened or closed so that the safety control circuit would take appropriate action to ensure the safety of the process.

The most common setup of a safety door interlock is the two opposite limit switches installed on the door in such a way that only one of them will be closed when either the door is opened or closed, as shown in the following picture.

Safety Door
Picture 1 – Safety Switches Setup

As you can see from picture 1 when the door is open switch 1 will be activated and switch 2 will be open. And when the door is closed it will be the opposite, switch 1 is open and switch 2 is closed.

This setup is used to provide an extra level of safety and monitoring as both switches can’t be closed or opened at the same time, and if that happened then it would mean a failure in one of the switches which will trigger the safety function.

Another thing you should know is that for redundancy reasons switch 1 and 2 might be the dual-channel switch, meaning each switch will have two identical and separate channels.

In this example we will assume that each switch has dual channels, so now the safety PLC will monitor the system as follows:

  • Safety PLC will monitor the dual channels of each switch against each other, they have to be in the same position all the time, and if not then there might be a failure inside this switch.
  • Safety PLC will monitor the two switches 1 and 2 against each other; they have to be opposite to each other all the time, if not, then there might be a failure inside one of them.

In either case, the safety PLC will trigger the safety function until all safety conditions are restored and acknowledged.

 Safety PLC Hardware Configuration

As we did in the previous article, we will add a safety input module, and safety output module, and a standard input module for the ACK button.

We have two switches with each having dual channel contact, we will connect switch 1 to channels 1, and 9 and switch 2 to channels 2, and 10 in the safety input module. See picture 2.

Safety PLC Hardware configuration
Picture 2 – Safety PLC Hardware configurations of inputs

Remember that, we have a dual-channel switch, which is why each switch is occupying two channels in the safety module.

The 1oo2 evaluation, equivalent highlighted in the picture, is set like that so the safety PLC will monitor the two channels against each other as we mentioned before, to detect any internal failure in the switch.

Safety PLC Programming Steps

Define your input tags. See picture 3.

Safety PLC Programming steps
Picture 3 – Define your inputs

We will define switch 1 as safety door 1 in %I0.1 and switch 2 as safety door 2 in %I0.2

Next to the programming part, open your safety function block Main_Safety_RTG1 FB and inside the function block add SFDOOR safety door instruction block, see picture 4.

SFDOOR safety instruction in PLC
Picture 4 – adding SFDOOR safety instruction

Note that, when adding an SFDOOR block you will be asked about the type of instance calling option, what you choose doesn’t affect the program coding, but choosing a multi-instance data block will ensure all data related to the SFDOOR block will be stored inside the main calling function, it is better for more organized and easy to read program, see picture 5.

Block Call Option in Siemens Safety PLC
Picture 5 – block calling options

Now add your inputs to the instruction block, and also create a static output named SafetyDoorOutput and connect it to the instruction output, see picture 6.

add tags to SFDOOR instruction block
Picture 6 – Add your tags to the instruction block

Important Notes on the SFDOOR block

  • QBAD_IN1 and QBAD_IN2

QBAD_IN1 and QBAD_IN2 are internally built functions inside the SFDOOR  block to monitor if IN1 and IN2 are 0 merely due to the passivation of the associated F-I/O.

You can refer to the TIA Portal for help with more information on QBAD_IN1 and QBAD_IN2 and how to use them.

  • OPEN_NEC

It means open necessary at startup, if set to true, then the door must be open and closed at start-up before you can start your process.

OPEN_NEC must not be set to false unless you have another enabling signal to prevent the process from automatically restarting after closing the door.

  • ACK_NEC:

it defines whether your block will need an ACK signal before setting the output to ON or not. If it is set to false, then the block will automatically be acknowledged after the IN1 and IN2 are set to normal operating conditions, meaning the door is closed.

If you still don’t get this point: it simply means, the process can’t start again even after the door is closed until a start signal arrives once again.

Add safety door output with the emergency condition to the motor output. See picture 7.

safety door motor PLC logic
Picture 7 – adding your safety door output to your motor logic (Network 3)

The safety control circuit is now complete, and the motor will not work if there is an emergency or if the door is open.

The motor also will not work if the safety PLC detects an internal failure in one of the safety door switches or the emergency push button.

Safety Door PLC Logic Simulation

Now, start a new simulation and experiment with your code. See picture 8.

Note that, at first power on, OPEN_NEC is required, because it was set to true, so the door must be opened and closed again.

 It is worth mentioning that the internal functionality of the SFDOOR block expects that the change in the states of switch 1 and switch 2 will happen at the same time or very close to each other.

So if there was a time lag between the changing of the state of switch 1 and switch 2 the safety function will be triggered and the output will not be ON. So when you run the simulation make sure you activate both switches together at the same time.

Simulation of Safety PLC code
Picture 8 – Simulation of your PLC code

As you can see, there is still no output, because we need to open and close the door first, let’s do that. See picture 9.

Safety Door PLC Logic
Picture 9 – Closing the safety door after start-up

After opening and closing the safety door, we see that there is still no output because as we mentioned before, we have to acknowledge the closing of the safety door through the ACK input.

You can even see the ACK_REQ is set to true, meaning you need to acknowledge the safety function. See picture 10.

Programming safety function using PLC
Picture 10 – Output is ON after acknowledged

From picture 10 you can see that now the output is ON after the ACK button was pressed.

Free to download the safety door PLC code in PDF format and the original program in the Siemens Tia portal.

Conclusion

As you can see, programming a safety function using a safety PLC doesn’t really include a lot of programming, because as we said before, safety PLCs are designed and standardized to ensure safety.

So a lot of the safety functions that you would need to program from scratch when using a standard PLC are already standardized internally when using a safety PLC.

If you liked this article, then please subscribe to our YouTube Channel for Instrumentation, Electrical, PLC, and SCADA video tutorials.

You can also follow us on Facebook and Twitter to receive daily updates.

Read Next:

  • MOVE Instruction in PLC
  • PLC Best Practices & Tips
  • How to Choose an HMI?
  • Comparison of PLC & HMI
  • Automation Engineering
Don't Miss Our Updates
Be the first to get exclusive content straight to your email.
We promise not to spam you. You can unsubscribe at any time.
Invalid email address
You've successfully subscribed !

Continue Reading

Motor Trip Logic using PLC Programming
Difference between Cold Standby and Hot Standby
If Else Statement in SCL Language
Structured Text PLC Programming for Two-Tanks Level Application
Siemens Tia Portal PLC Training Course
What is PLC Redundancy?
Share This Article
Facebook Whatsapp Whatsapp LinkedIn Copy Link
Share
Leave a Comment

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Stay Connected

128.3kFollowersLike
69.1kFollowersFollow
208kSubscribersSubscribe
38kFollowersFollow

Categories

Explore More

PLC Example to Control LEDs Via Switches
Auto Sugar Bag Filling Station
What is a PLC? – Programmable Logic Controller
Learn PLC in Hindi
Omron PLC for Product Painting with Integrated Weighing System
Muting Functions of Safety Control Circuits – PLC Example
Car Wash Program using Functional Block Diagram (PLC)
Automatic Box Filling System using PLC Programming

Keep Learning

Types of Limit Switches

Types of Limit Switches – Principle, Advantages, Disadvantages

How to Select the Right Encoder for Your Machine

How to Select the Right Encoder for Your Machine?

Boolean Algebra to PLC Logic

From Boolean Algebra to PLC Logic

Free Omron PLC Programming Course in HINDI

Free Omron PLC Programming Course in HINDI

Communicate with Excel from Intouch SCADA

How to Communicate with Excel from Intouch SCADA?

Counter Count Down Bit

Down Counter PLC Program

Programmable Logic Controller (PLC) Questions and Answers

PLC Ladder Logic Questions and Answers

Sink or source PNP or NPN Normally Open or Normally Closed Input v. output. output

Sink or Source? Normally Open or Normally Closed?

Learn More

Passing Control Valves Cause Yearly Losses

Passing Control Valves Cause Yearly Losses in Production Plant

Relation Control

Relation Control System

Shaft and Coupling Bore Tapers Repair Caused Frequent Shutdowns

Shaft and Coupling Bore Tapers Repair Caused Frequent Shutdowns

magnetic flow meter parts

What is a Magnetic Flow Meter?

Home Automation Project Ideas

Best Home Automation Project Ideas for Engineering Students

Power Systems Questions & Answers

Power Systems MCQ Series 16

Process Plant Risk and Safety Management

Safety Roles & Responsibilities of Process Engineering (Detail Design)

PLC Program to Control Motor Speed using VFD Drive

Motor Speed Control using VFD and PLC Programming

Follow US
All rights reserved. Reproduction in whole or in part without written permission is prohibited.
Welcome Back!

Sign in to your account

Username or Email Address
Password

Lost your password?