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: Structured Text PLC Programming for Automatic Gate Control
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 > Structured Text PLC Programming for Automatic Gate Control

Structured Text PLC Programming for Automatic Gate Control

Design automatic gate control using structured text language with open and close sensors, stop lamp indication, and fault lamp status.

Last updated: September 18, 2024 3:37 pm
Viral Nagda
PLC Tutorials
No Comments
Share
5 Min Read
SHARE

In this post, we will write a logic for controlling the gate of a car passing automatically using structured text language.

Contents
Automatic Gate ControlStructured Text PLC Programming

Automatic Gate Control

Let us understand the case scenario first. There is an automatic gate which is controlled by a motor. The gate is equipped with open and close sensors for sensing the limit. There is a stop lamp indication to avoid collision of cars and a fault lamp indication in case of any malfunction of the system.

There are two gate sensors, one that gives the command to open the gate and one that gives the command to stop the gate. When the open gate command is sensed, the gate opens till the open limit switch is sensed. Then, the system waits for the second car gate sensor to sense.

Once sensed, the gate closes till the close limit switch is sensed. Till the second gate limit is not sensed, a stop lamp will be indicated to avoid any incoming car from coming again (because the existing car has not crossed the gate yet). If any of the limit switches fail to operate in a given time, the fault lamp indicator will turn on.

Also, once the car has entered but not exited within a given time frame, then too the fault lamp will turn on. The operator needs to attend and reset the system to start the system once again. Remember that we have also installed mechanical hard lock limit switches for breaking the electrical supply of the motor in case the limit switch of PLC fails.

Following are the PLC IO’s in this case:

  • Digital inputs – Motor run feedback, open limit switch, close limit switch, gate-1 sensor, gate-2 sensor, and alarm reset push button.
  • Digital outputs – Motor open, motor close, stop lamp, fault lamp.

Structured Text PLC Programming

Refer to the below image for the PLC program. In the first part, we will open the gate when the gate-1 sensor is sensed and there is no fault condition present in the system. In this case, the stop lamp too will turn on.

Only the gate open output will turn off when the open limit switch is sensed; the stop lamp will remain on (see we have not unlatched it.)

Structured Text PLC Programming for Automatic Gate Control

Next, we will close the gate when the gate-2 sensor is sensed and there is no fault condition present in the system. When the gate close limit switch is sensed, then both the outputs of the gate close, and the stop lamp will turn off.

Now, we will create four timers for checking fault conditions. In the first timer, we check if the open limit switch has failed for 10 seconds by seeing whether the open limit switch has not been received even though the gate is open.

In the second timer, we check if the close limit switch has failed for 10 seconds by seeing whether the close limit switch has not been received even though the gate is closed.

In the third timer, we check if the gate motor run feedback has failed for 5 seconds by seeing whether the feedback has not been received even though the gate motor is on.

In the fourth timer, we check if there is any issue in the car passing for 20 seconds by seeing whether the gate-2 sensor has not been received even though the stop lamp is on.

If any of the above timers go on, then a fault will be generated and it will turn off all the outputs and turn on only the fault lamp.

The operator has to press fault reset PB to reset the faults and start the system again.

In this way, we saw how to write a PLC program for automatic gate control using structured text.

Read Next:

  • PLC Program for Sequential Motor Control
  • Sequential PLC Program Pneumatic Valve
  • PLC Program for Water Level Control Logic
  • Structured Text PLC for Sequential Process
  • Write a PLC Program for Selector Machine
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 !

Recommended Articles

Overview of SIEMENS PLC – S7-1500, S7-1200, S7-400, S7-300
Types of Allen Bradley PLC
PLC Analog I/O Potential Problems – Troubleshooting & Issues
PLC Interview Questions and Answers
Difference between Compact PLC and Modular PLC
VFD Commissioning and Testing Procedure (Variable Frequency Drive)
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

Recent Comments

  • William Snyder on Top Non-PLC Certification Courses for Automation Professionals
  • Kamli on Top Free PLC Software
  • Guifty Shimica on Top Non-PLC Certification Courses for Automation Professionals
  • Guifty Shimica on Top Non-PLC Certification Courses for Automation Professionals

Related Articles

PLC Example to Control LEDs Via Switches

PLC Example to Control LEDs Via Switches

Convert Raw Counts to Engineering Units

Raw Counts to Engineering Units : Conversion Formula

Use Cryptographic checks for PLC

#5 PLC Best Practices – Cryptographic and Checksum Integrity Checks

Applications of SCADA

Instruction List in PLC Programming

What is an Instruction List? – PLC Programming

OB10 Time of Day Interrupt

Tia Portal – OB10 Time of Day Interrupt Organization Block

Industrial Automation Cold and Hot Standby

Difference between Cold Standby and Hot Standby

PLC Programming Projects for Beginners

PLC Programming Projects for Beginners

More Articles

Open Diode in a Full-Wave Rectifier

Power Supply Circuit Fault Analysis

Calculate Total Hydrostatic Pressure at Bottom of Vessel

Calculate Total Hydrostatic Pressure at Bottom of Vessel

Tanks Draining Control in PLC using Functional Block Diagram

Tanks Draining Control in PLC using Functional Block Diagram

Introduction to MEMS (Microelectromechanical Systems)

Introduction to MEMS (Microelectromechanical Systems)

Industrial safety Objective Questions and Answers

Top 10 Industrial safety Objective Questions

Difference Between SCADA and HMI

Difference Between SCADA and HMI

Double ball isolation with ball valve vent

What is Double Block and Bleed Valves?

Move function block

Move Instruction in Tia Portal

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?