Inst ToolsInst ToolsInst Tools
  • Ask
  • 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: PLC Programming for Train Detection and Gate Operation
Share
Notification Show More
Font ResizerAa
Inst ToolsInst Tools
Font ResizerAa
  • Courses
  • PLC Tutorials
  • Control Systems
Search
  • Ask
  • 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 > PLC Programming for Train Detection and Gate Operation

PLC Programming for Train Detection and Gate Operation

Learn the PLC programming for train detection and gate operation with warning alarms to open or close the railway gate.

Last updated: October 21, 2024 9:15 pm
Editorial Staff
PLC Tutorials
No Comments
Share
7 Min Read
SHARE

This article discusses an example of a PLC program to automatically control the railway crossing system with train detection and gate operation. This system is used to control the process of Opening and Closing railway crossing gates when a train passes. This system uses sensors to detect the arrival and departure of trains. When the system detects a train is coming, the system will automatically Close the crossing gates and Activate a warning Alarm. The system will re-Open the crossing gates after the train has passed the crossing, and the Alarm will be turned Off.

Contents
Train Detection and Gate OperationWhen a Train ComesWhen a train has passedProgram AddressingProgramming

Train Detection and Gate Operation

The PLC program uses 2 buttons and 4 sensors, the START_SYSTEM (I0.0) button is used to turn ON the system, and the STOP_SYSTEM (I0.1) button is used to turn OFF the system.

The SENS_TRAIN_COME (I0.2) sensor is used to detect an oncoming train, the SENS_TRAIN_LEFT (I0.3) sensor is used to detect a train that has passed a railway crossing, SENS_GATE_DOWN (I0.5) is used to limit the Gate position when Closing, and SENS_GATE_UP (I0.4) is used to limit the Gate position when Opening.

When a Train Comes

The SENS_TRAIN_COME (I0.2) sensor will be Active when it detects an oncoming train. The crossing gate will move CLOSED and the Output OUT_GATE_DOWN (Q0.1) will be ON. Alarm OUT_ALARM (Q0.2) becomes ON to provide a warning.

The crossing gate will Stop Closing when the SENS_GATE_DOWN (I0.5) sensor is Active, so the OUT_GATE_DOWN (Q0.1) Output will become OFF.

When a train has passed

The SENS_TRAIN_LEFT (I0.3) sensor will be Active when it detects that a train has passed a train crossing. 4 seconds later the crossing gate will OPEN. Output OUT_GATE_UP (Q0.0) becomes ON and Alarm OUT_ALARM (Q0.2) becomes OFF.

The OUT_GATE_UP (Q0.0) output will be OFF when the SENS_GATE_UP (I0.4) sensor is Active so that the crossing gate Stops Opening.

PLC Based Automatic Railway Gate Controller
Railway Gate Crossing Control Using PLC Automation

Program Addressing

CommentInput (I)Output (Q)Memory BitsTimer
START_SYSTEMI0.0   
STOP_SYSTEMI0.1   
SENS_TRAIN_COMEI0.2   
SENS_GATE_DOWNI0.5   
SENS_TRAIN_LEFTI0.3   
SENS_GATE_UPI0.4   
OUT_GATE_DOWN Q0.1  
OUT_GATE_UP Q0.0  
OUT_ALARM Q0.2  
SYSTEM_ON  M0 
IR_GATE_DOWN  M2 
IR_GATE_UP  M1 
IR_ALARM  M3 
IR_TIMER  M4 
TIMER_GATE   TM0

Programming

RUNG 0 (SYSTEM ON)

In this Rung, when the START_SYSTEM (I0.0) button is Pressed, the memory bit SYSTEM_ON (M0) will be in the HIGH state. The memory bit SYSTEM_ON (M0) remains in the HIGH state even though the START_SYSTEM (I0.0) button has been Released, because it uses the SET Coil Instruction.

PLC Programming for Train Detection and Gate Operation

RUNG 1 (SYSTEM OFF)

In this Rung, if the STOP_SYSTEM (I0.1) button is Pressed, the memory bit SYSTEM_ON (M0) will become LOW state. Because it uses the RESET Coil Instruction.

RUNG 2 (GATE DOWN ON)

In this Rung, when the NO contact of memory bit SYSTEM_ON (M0) and the SENS_TRAIN_COME (I0.2) sensor in the HIGH state, then the memory bit IR_GATE_DOWN (M2) will be in the HIGH state.

Because it uses the SET Coil Instruction, the memory bit IR_GATE_DOWN (M2) will remain in the HIGH state even though the SENS_TRAIN_COME (I0.2) sensor in the LOW state.

RUNG 3 (GATE DOWN OFF)

In this Rung, when the NO contact of memory bit SYSTEM_ON (M0) and the SENS_GATE_DOWN (I0.5) sensor in the HIGH state, the memory bit IR_GATE_DOWN (M2) will be in the LOW state. Because it uses the RESET Coil Instruction.

How to implement PLC programming for railway gate control

RUNG 4 (GATE UP ON)

In this Rung, when the NO contact of memory bit SYSTEM_ON (M0) and the SENS_TRAIN_LEFT (I0.3) sensor in the HIGH state, then the memory bit IR_GATE_UP (M1) will become in the HIGH state and the TIMER_GATE (TM0) timer Starts counting up to 4 second.

Because it uses the SET Coil Instruction, the memory bit IR_GATE_UP (M1) will remain in the HIGH state even though the SENS_TRAIN_LEFT (I0.3) sensor in the LOW state.

After TIMER_GATE (TM0) has finished counting, the output memory bit IR_TIMER (M4) will be in the HIGH state.

RUNG 5 (GATE UP OFF)

In this Rung, if the NO contact of memory bit SYSTEM_ON (M0) and the SENS_GATE_UP (I0.4) sensor in the HIGH state, then the memory bit IR_GATE_UP (M1) will be in the LOW state. Because it uses the RESET Coil Instruction.

RUNG 6 (ALARM ON)

In this Rung, the memory bit IR_ALARM (M3) will be in the HIGH state when the NO contacts of memory bit SYSTEM_ON (M0) and the SENS_TRAIN_COME (I0.2) sensor are in the HIGH state.

Because it uses a SET Coil, the memory bit IR_ALARM (M3) remains in the HIGH state even though the SENS_TRAIN_COME (I0.2) sensor in the LOW state.

RUNG 7 (ALARM OFF)

When the NO contact of memory bit SYSTEM_ON (M0) and the SENS_TRAIN_LEFT (I0.3) sensor in the HIGH state, the memory bit IR_ALARM (M3) will be in the LOW state. Because it uses the RESET Coil Instruction.

Railway Train Control Systems

RUNG 8 (OUT GATE UP)

In this Rung, when the NO contacts of memory bit IR_GATE_UP (M1) and IR_TIMER (M4) are in the HIGH state, the Output OUT_GATE_UP (Q0.0) will be ON.

RUNG 9 (OUT GATE DOWN)

In this Rung, when the NO contact of memory bit IR_GATE_DOWN (M2) in the HIGH state, the Output OUT_GATE_DOWN (Q0.1) will be ON.

RUNG 10 (ALARM OUTPUT)

In this Rung, when the NO contact of memory bit IR_ALARM (M3) in the HIGH state, the Output OUT_ALARM (Q0.2) will be ON.

Read Next:

  • PLC Product Painting with Weighing System
  • Studio 5000 PLC Program for Digital Alarms
  • Vacuum Cleaner Programming in Omron PLC
  • Washing Machine Automation PLC Program
  • Functional Block Diagram Analog Alarm Logic
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 !
Most Asked Questions on SCADA with Answers
Automatic Coffee Vending Machine – PLC Logic Programming
Steps in PLC System Design
PLC Simulator using Excel
PID with Practical Example
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

  • Guifty Shimica on Top Non-PLC Certification Courses for Automation Professionals
  • Guifty Shimica on Top Non-PLC Certification Courses for Automation Professionals
  • MIHARITSOA Aina Sitraka on Top Non-PLC Certification Courses for Automation Professionals
  • Vaishnavi on Free Instrumentation Course for Trainee Engineers

Related Articles

Safety interlock for motor starters in Siemens PLC

Motor Starter Logic using Siemens PLC Tia Portal

Workstation Healthiness Checks

Workstation Healthiness Checks

Top 100 PLC Objective Questions and Answers

Top 100 PLC Objective Questions and Answers

Marshalling Panel

What is Marshalling Cabinet?

Proper Earthing Practices Used for PLC Control Panel

Proper Earthing Practices Used for PLC Control Panel

PLC Ladder Logic for Lube Oil Pump Motor

PLC Ladder Logic for Lube Oil Pump Motor

Save to Memory Card

How to Save a PLC Project to a Micro Memory Card?

Introduction to SCL Programming in Siemens PLC

Types of Expressions in the SCL Language of the Tia Portal

More Articles

Seven Segment LED Display

Difference Between Common Cathode and Common Anode 7 Segment LED Display?

Inability to Test Repaired HT Motors

Inability to Test Repaired HT Motors in Workshop Posed Problems

Studio 5000 Define Program or Operator Control in Functional Block Diagram

Studio 5000: Define Program or Operator Control in Functional Block Diagram

Difference Between RTD, Thermocuples and Thermistors

Difference Between RTD, Thermocouple and Thermistor

Calculate the 0%, 50%, and 100% Calibration Points

Calculate the 0%, 50%, and 100% Calibration Points

Sorting and Counting Products on Conveyors by Color

PLC Programming for Multi-Color Sorting Conveyor System

Reactor Top lid lapped

Urea Reactor Top Bolted Plug developed Leaks

Thermowell Design Guidelines

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?