Inst ToolsInst ToolsInst Tools
  • Courses
  • Automation
    • PLC
    • Control System
    • Safety System
    • Communication
    • Fire & Gas System
  • Instrumentation
    • Design
    • Pressure
    • Temperature
    • Flow
    • Level
    • Vibration
    • Analyzer
    • Control Valve
    • Switch
    • Calibration
    • Erection & Commissioning
  • Interview
    • Instrumentation
    • Electrical
    • Electronics
    • Practical
  • Q&A
    • Instrumentation
    • Control System
    • Electrical
    • Electronics
    • Analog Electronics
    • Digital Electronics
    • Power Electronics
    • Microprocessor
  • Request
Search
  • Books
  • Software
  • Projects
  • Process
  • Tools
  • Basics
  • Formula
  • Power Plant
  • Root Cause Analysis
  • Electrical Basics
  • Animation
  • Standards
  • 4-20 mA Course
  • Siemens PLC Course
Reading: Complex Car Parking Logic in XG5000 LS Electric PLC
Share
Notification Show More
Font ResizerAa
Inst ToolsInst Tools
Font ResizerAa
  • Courses
  • Design
  • PLC
  • Interview
  • Control System
Search
  • Courses
  • Automation
    • PLC
    • Control System
    • Safety System
    • Communication
    • Fire & Gas System
  • Instrumentation
    • Design
    • Pressure
    • Temperature
    • Flow
    • Level
    • Vibration
    • Analyzer
    • Control Valve
    • Switch
    • Calibration
    • Erection & Commissioning
  • Interview
    • Instrumentation
    • Electrical
    • Electronics
    • Practical
  • Q&A
    • Instrumentation
    • Control System
    • Electrical
    • Electronics
    • Analog Electronics
    • Digital Electronics
    • Power Electronics
    • Microprocessor
  • Request
Follow US
All rights reserved. Reproduction in whole or in part without written permission is prohibited.
Inst Tools > Blog > PLC Tutorials > Complex Car Parking Logic in XG5000 LS Electric PLC

Complex Car Parking Logic in XG5000 LS Electric PLC

This article discusses the automatic complex car parking system using the XG-5000 LS Electric PLC program using sensors.

Last updated: October 24, 2024 11:08 am
Editorial Staff
PLC Tutorials
No Comments
Share
11 Min Read
SHARE

This article discusses the automatic complex car parking system using the XG-5000 LS Electric PLC program using sensors. This car parking system has 2 gates, Gate-1 to enter the parking area and Gate-2 to exit the parking area. When a car enters the parking area, Gate-1 will Open and will Close when the car has passed the gate. If within 10 seconds after the gate Opens no cars enter, the gate will automatically Close.

Contents
Complex Car Parking LogicAddressing DetailsXG5000 LS Electric PLC Programming

When a car leaves the parking area, Gate 2 will Open and Close when the car has passed the gate. If within 10 seconds after the gate Opens no cars come out, the gate will automatically Close.

The number of cars in the Car Parking area will be counted.

Complex Car Parking Logic

In this program, the Buttons used are as follows:

  1. The START (P00000) button is used to turn ON the system.
  2. The STOP (P00001) button is used to turn OFF the system.
  3. The RESET_COUNTER (0.02) button is used to Reset the Counter data to zero “0”.

CAR IN

When the SENS_CAR_IN1 (P00003) sensor is Active because it detects an incoming car, the Gate IN will Open and the Output Gate GATE_IN_UP (P00040) will become ON. Gate IN will Stop moving to Open when Limit Switch LS_GATE_IN_UP (P00007) is Active.

When the SENS_CAR_IN2 (P00004) sensor is Active because it detects a car has entered, Gate IN will Close and the Gate Output GATE_IN_DOWN (P00041) will become ON. Gate IN will Stop moving Close when Limit Switch LS_GATE_IN_DOWN (P00008) is Active. Next, the Counter data in the memory word CAR_COUNTER (D00000) increases (+1).

If after Gate IN Opens and within 10 seconds no cars enter the parking area, then Gate IN will Close and the Output GATE_IN_ALARM (P00044) will be ON for a moment.

CAR OUT

When the SENS_CAR_ OUT1 (P00005) sensor is Active because it detects a car coming out, the Gate OUT will Open and the Output Gate GATE_OUT_UP (P00042) will become ON. Gate OUT will Stop moving to Open when Limit Switch LS_GATE_OUT_UP (P00009) is Active.

When the SENS_CAR_OUT2 (P00006) sensor is Active because it detects that a car has entered, the Gate OUT will Close and the Output Gate GATE_OUT_DOWN (P00043) will become ON. Gate OUT will Stop moving Close when Limit Switch LS_GATE_OUT_DOWN (P0000A) is Active. Next, the Counter data in the memory word CAR_COUNTER (D00000) is reduced (-1).

If after Gate OUT Opens and within 10 seconds no cars leave the parking area, then Gate OUT will Close and the GATE_OUT_ALARM (P00045) output will be ON for a moment.

Complex Car Parking Logic in XG5000 LS Electric PLC
PLC Logic for Complex Car Parking Automation

Addressing Details

CommentInput (I)Output (Q)Word MemoryMemory BitsTimers
STARTP00000    
STOPP00001    
RESET_COUNTERP00002    
SENS_CAR_IN1P00003    
SENS_CAR_IN2P00004    
SENS_CAR_OUT1P00005    
SENS_CAR_OUT2P00006    
LS_GATE_IN_UPP00007    
LS_GATE_IN_DOWNP00008    
LS_GATE_OUT_UPP00009    
LS_GATE_OUT_DOWNP0000A    
GATE_IN_UP P00040   
GATE_IN_DOWN P00041   
GATE_OUT_UP P00042   
GATE_OUT_DOWN P00043   
GATE_IN_ALARM P00044   
GATE_OUT_ALARM P00045   
TIMER_IN_ALARM    T0000
TIMER_OUT_ALARM    T0001
SYSTEM_ON   M00000 
CAR_COUNTER  D00000  

XG5000 LS Electric PLC Programming

RUNG 0

In this Rung, the memory bit SYSTEM_ON (M00000) changes to the HIGH state if the START (P00000) button is Pressed. Because it uses the SET Coil Instruction, the memory bit SYSTEM_ON (M00000) will remain in the HIGH state even though the START (P00000) button has been Released.

Car Parking Problems with PLC Logic

RUNG 1

In this Rung, the memory bit SYSTEM_ON (M00000) will be in the LOW state if the STOP (P00001) button is Pressed because it uses the RESET Coil Instruction.

RUNG 5

In this Rung, if the NO contact of the bit memory SYSTEM_ON (M00000) and Sensor SENS_CAR_IN1 (P00003) in the HIGH state, then the value in memory word CAR_COUNTER (D00000) will increase (+1).

The ADD instruction will add a value (+1) to the memory word CAR_COUNTER (D00000) each time it is Activated.

RUNG 13

In this Rung, if the NO contact of the bit memory SYSTEM_ON (M00000) and Sensor SENS_CAR_OUT1 (P00005) in the HIGH state, then the value in memory word CAR_COUNTER (D00000) will decrease (-1).

The SUB instruction will subtract the value (-1) from the memory word CAR_COUNTER (D00000) each time it is Activated.

Parking Control Using PLC Programming

RUNG 21

In this Rung, if the NO contact of the memory bit SYSTEM_ON (M00000) in the HIGH state and the RESET_COUNTER (P00002) button is Pressed, then the value in the memory word CAR_COUNTER (D00000) will be Reset to zero “0”.

RUNG 26

When the NO contact of the memory bit SYSTEM_ON (M00000) and the SENS_CAR_IN1 (P00003) Sensor is in the HIGH state, the GATE_IN_UP (P00040) Output will be in the HIGH state.

Because it uses the SET Coil Instruction, the GATE_IN_UP (P00040) Output will remain in the HIGH state even though the SENS_CAR_IN1 (P00003) Sensor has become in the LOW state.

RUNG 30

Because it uses the RESET Coil Instruction, if the NO contact of memory bit SYSTEM_ON (M00000) and the Limit Switch LS_GATE_IN_UP (P00007) in the HIGH state, then the GATE_IN_UP (P00040) Output will be in the LOW state.

PLC Car Parking Solution

RUNG 35

In this Rung, when the NO contact of memory bit SYSTEM_ON (M00000) and the SENS_CAR_IN2 (P00004) Sensor is in the HIGH state, then the GATE_IN_DOWN (P00041) Output will be in the HIGH state.

Or if the NO contact of Timer TIMER_IN_ALARM(T0000) is in the HIGH state, then the GATE_IN_DOWN (P00041) Output will be in the HIGH state.

Because it uses the SET Coil Instruction, the GATE_IN_DOWN (P00041) Output will remain in the HIGH state even though the NO contact of the SENS_CAR_IN2 (P00004) Sensor or TIMER_IN_ALARM (T0000) Timer in the LOW state.

RUNG 40

Because it uses the RESET Coil Instruction, if the NO contact of memory bit SYSTEM_ON (M00000) and the Limit Switch LS_GATE_IN_DOWN (P00008) are in the HIGH state, then the GATE_IN_DOWN (P00041) Output will be in the LOW state.

RUNG 45

When the NO contact of memory bit SYSTEM_ON (M00000) and the SENS_CAR_OUT1 (P00005) Sensor is in the HIGH state, the GATE_OUT_UP (P00042) Output will be in the HIGH state.

Because it uses the SET Coil Instruction, the GATE_OUT_UP (P00042) Output will remain in the HIGH state even though the SENS_CAR_OUT1 (P00005) Sensor has become in the LOW state.

PLC ladder logic practice problems with solutions pdf

RUNG 49

Because it uses the RESET Coil Instruction, if the NO contact of memory bit SYSTEM_ON (M00000) and the Limit Switch LS_GATE_OUT_UP (P00009) in the HIGH state, then the GATE_OUT_UP (P00043) Output will be in the LOW state.

RUNG 54

In this Rung, when the NO contact of memory bit SYSTEM_ON (M00000) and the SENS_CAR_OUT2 (P00006) Sensor is in the HIGH state, then the GATE_OUT_DOWN (P00043) Output will be in the HIGH state.

Or if the NO contact of TIMER_OUT_ALARM (T0001) Timer is in the HIGH state, then the GATE_OUT_DOWN (P00043) Output will be in the HIGH state.

Because it uses the SET Coil Instruction, the GATE_OUT_DOWN (P00043) Output will remain in the HIGH state even though the NO contact of SENS_CAR_OUT2 (P00006) Sensor or TIMER_OUT_ALARM (T0001) Timer in the LOW state.

RUNG 60

Because it uses the RESET Coil Instruction, if the NO contact of memory bit SYSTEM_ON (M00000) and the Limit Switch LS_GATE_OUT_DOWN (P0000A) in the HIGH state, then the GATE_OUT_DOWN (P00043) Output will be in the LOW state.

Automating Car Parking with Advanced PLC Logic

RUNG 65

In this Rung, when the NO contact of memory bit SYSTEM_ON (M00000) and the Limit Switch LS_GATE_IN_UP (P00007) are in the HIGH state, the TIMER_IN_ALARM (T0000) Timer will start counting up to 10 seconds.

After the Timer TIMER_IN_ALARM (T0000) has finished counting the Latching contact will be Active. The TIMER_IN_ALARM (T0000) timer will be OFF if the NC contact of Limit Switch LS_GATE_IN_DOWN (P00008) is in the HIGH state.

RUNG 72

In this Rung, when the NO contact of TIMER_IN_ALARM (T0000) Timer in the HIGH state, the GATE_IN_ALARM (P00044) Output will be ON.

Automatic car parking barrier system

RUNG 75

In this Rung, when the NO contact of memory bit SYSTEM_ON (M00000) and the Limit Switch LS_GATE_IN_UP (P00007) are in the HIGH state, the TIMER_OUT_ALARM (T0001) Timer will start counting up to 10 seconds.

After the Timer TIMER_OUT_ALARM (T0001) has finished counting the Latching contact will be Active. The TIMER_OUT_ALARM (T0001) timer will be OFF if the NC contact of the Limit Switch LS_GATE_OUT_DOWN (P0000A) is in the HIGH state.

RUNG 72

In this Rung, when the NO contact of the TIMER_OUT_ALARM (T0001) Timer is in the HIGH state, the GATE_OUT_ALARM (P00045) Output will be ON.

Read Next:

  • PLC Logic Train Detection and Gate Operation
  • Weighing with Labeling PLC Automation Logic
  • Functional Block Diagram Analog Alarm Logic
  • Timer-Based Sequential PLC Programming
  • PLC Programming for Baking with Auto Mode
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 Timer Instructions
PLC Sequencer Instruction with Example
Procedure for Connecting Allen Bradley PLC and PC – RS Logix 500
Difference Between PLCSIM and PLCSIM Advanced? – Siemens PLC
DCS Commissioning Steps
Motion Detection based Street Light: PLC Logic Solution
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
210kSubscribersSubscribe
38kFollowersFollow

Categories

Explore More

How to Use ModScan Software for Testing Modbus Communication?
OFF Delay Timer using PLC
What is Complementary Split Range Control (CSRC)?
How to Design a Motor Faceplate in Graphics? – SCADA Tutorials
Scaling with Parameters (SCP) Instruction in PLC
How to Troubleshoot a PLC System?
Difference Between Industrial Computer (IPC) and Normal Computer (PC)
PLC Program for Food Processing Industry

Keep Learning

How-to do Security of SCADA Systems

How-to do Security of SCADA Systems?

PLC Program for Boolean Expression

PLC Program for Boolean Expression

PLC Training Course

#17 PLC Best Practices – Log PLC Uptime and Trend it on HMI

What is Ladder Diagram Programming ?

Allen-Bradley PLC

#15 PLC Best Practices – Safe State when PLC Restarts

Safety PLC Coding Practices

Safety PLC Coding Practices – Programming Recommendations

Laws of Boolean Algebra using Ladder Logic

Laws of Boolean Algebra using Ladder Logic

User Defined Function Blocks in PLC

What are User Defined Function Blocks in PLC?

Learn More

Convert 4-20ma current output to foundation fieldbus

Field Instruments

#11 PLC Best Practices – Instrument for Plausibility Checks

Transformer Operation Under No-Load

Transformer Operation Under No-Load

Why is HV Testing important in Electrical Panels?

Why is HV Testing important in Electrical Panels?

Speed Control of Pneumatic Cylinder (Explanation with PLC)

Speed Control of Pneumatic Cylinder (Explanation with PLC)

Radiation Level Measurement Principle

Radiation Level Measurement

Thermocouple Reference junction compensation

Difficulties with Thermocouples for Temperature Measurement

Flowmeter Characteristics

Flow Meter Characteristics

Menu

  • About
  • Privacy Policy
  • Copyright

Quick Links

  • Learn PLC
  • Helping Hand
  • Part Time Job

YouTube Subscribe

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?