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 !

Continue Reading

PLC Memory Mapping and I/O addressing
Difference Between PNP and NPN Sensors
PLC Program for Stage Control: Curtains and Stage Elevation
How to Work with Allen Bradley RsLogix Emulator?
PLC Techniques for I/O Mapping
PLC Connection between Instrument, Junction Box, Marshalling & System Cabinet
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

Key Facts About RS485 Industrial Network
How to import GSD files into the TIA Portal? – Siemens PLC
Various Types of Delta PLC used in Industrial Automation
What is Recipe Management in SCADA?
PLC FBD Example for Tank Liquid Heating Control by Steam Flow
What is the DDE Protocol?
How to Save a PLC Project to a Micro Memory Card?
How-to do Security of SCADA Systems?
Difference Between CompactLogix and ControlLogix
Open User Communication in Siemens Tia Portal – PLC to PLC

Keep Learning

Gas Turbine Temperature Control using Siemens Tia Portal

Gas Turbine Temperature Alarms using Siemens TIA Portal

Data Handling Instructions in PLC Programming

Data Handling Instructions in PLC Programming

Read Temperature in PLC

PLC Program to Read Temperature in PLC

PLC Logic to identify empty bottles in Packing

Automatic Empty Bottle detection using PLC Logic

If Else Statement in SCL Language

If Else Statement in SCL Language

Falling Positive and Falling Negative Instructions in PLC

Positive and Negative Edges using Statement List Language

Siemens Tia Portal Function Block

Function Blocks in PLC (FBs) – What You Need To Know?

How to Train Your Maintenance Team for Industrial Automation Systems

How to Train Your Maintenance Team for Industrial Automation Systems?

Discover More

Sensors & Transducers Questions and Answers

Top 100 Sensors & Transducers Questions and Answers for Freshers

Things You Need to Know About DeviceNet

Things You Need to Know About DeviceNet

4-20 mA Conversion Formulas

Standard 4 to 20 mA Conversion Formula

Double-Acting Pneumatic Cylinder Circuit

Pneumatic Cylinder Movement Control with Timer Circuit

Identify Instruments in Piping and instrumentation Diagram

Identify Instruments in Piping and instrumentation Diagram

Types of Industrial Relays

What is a Relay? Types of Industrial Relays

What is Loop Checking

What is Loop Checking?

State Variable Analysis and Design

State Variables & Linear Discrete Time Systems

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?