
PLC Programming Exercise: Conveyor Belt Sorting System
Automated Sorting Based on Object Height
1. Introduction
This exercise focuses on developing an automated conveyor belt sorting system using a PLC. The system detects the height of objects moving along a conveyor and sorts them into two categories: tall objects and short objects. The classification is performed using a photoelectric height sensor and pneumatic actuators.
This type of automation is used in various industries to enhance efficiency and reduce human intervention in the sorting process.
2. Learning Objectives
By the end of this exercise, you will:
- Gain hands-on experience with PLC programming using ladder logic.
- Understand how to integrate sensors and actuators with a PLC.
- Learn to implement control logic with timers and conditions.
- Troubleshoot and debug common issues in PLC systems.
3. Tools and Components
Hardware Required:
- PLC (e.g., Siemens S7-1200, Allen-Bradley CompactLogix)
- Conveyor belt system with a motor
- Photoelectric height sensor
- Two pneumatic actuators (with solenoid valves)
- Push buttons: Start, Stop, Emergency Stop
- Indicator lamps for system status (Power, Running, Error)
- Relay module (for actuator interfacing)
- Power supply
Software Required:
- PLC Programming Software (e.g., Siemens TIA Portal, Allen-Bradley RSLogix 5000)
- PLC simulation software (optional for testing without hardware)
4. System Overview and Concept Explanation
In this system, objects pass along a conveyor belt. A height sensor positioned above the belt measures the height of each object. Based on the height reading:
- Tall objects are pushed into a bin by Pneumatic Actuator A.
- Short objects are pushed into a different bin by Pneumatic Actuator B.
To ensure smooth and reliable sorting:
- The actuators will be engaged for a specific duration using timers.
- The conveyor motor will start and stop based on user control through push buttons.
5. Wiring Instructions
- Height Sensor: Connect the output of the height sensor to the PLC input terminal (e.g., I0.3).
- Pneumatic Actuators: Wire the solenoid valves controlling the actuators to PLC output terminals (e.g., Q0.0 for Actuator A, Q0.1 for Actuator B).
- Conveyor Motor: Connect the conveyor motor to a relay module controlled by the PLC output (e.g., Q0.2).
- Push Buttons and Lamps:
- Start Button (I0.0)
- Stop Button (I0.1)
- Emergency Stop Button (I0.2)
- Indicator lamps connected to PLC outputs for visual feedback.
6. Programming the PLC
The PLC program is divided into three main sections:
Section 1: Conveyor Control
- Start and Stop Logic: The conveyor starts when the Start button is pressed and stops when the Stop or Emergency Stop button is pressed.
- Use a latching relay to keep the conveyor running after pressing the Start button.
Ladder Logic Example (Conveyor Control):
|---[ I0.0 (Start) ]----+----[ Q0.2 (Conveyor Motor) ]---( )----|
|
+----[ I0.1 (Stop) ]------------|
|
+----[ I0.2 (Emergency Stop) ]--|
Section 2: Object Detection and Sorting
- Tall Objects: When the height sensor detects a tall object, it triggers Actuator A for 1 second using a timer.
- Short Objects: If no tall object is detected, Actuator B is triggered for 1 second using another timer.
Ladder Logic Example (Sorting):
// Tall Object Detection and Sorting
|---[ I0.3 (Height Sensor) ]--------[ TON Timer1 (1s) ]---( Q0.0 Actuator A )---|
// Short Object Detection and Sorting
|---[ Not I0.3 ]---------------------[ TON Timer2 (1s) ]---( Q0.1 Actuator B )---|
Section 3: Timer Control for Actuators
Timers ensure that each actuator remains engaged for exactly 1 second, preventing overlap or incomplete sorting actions.
7. Testing and Debugging Tips
- Visual Check: Ensure all connections are secure and components are correctly wired.
- Simulation (if available): Use the PLC’s simulation feature to test the program without hardware.
- Monitor Inputs and Outputs: Verify that the height sensor and actuators are working correctly.
- Check Timer Settings: Ensure the timers are properly configured to avoid conflicts between actuators.
Common Issues:
- Actuators not retracting: Check the timer settings or solenoid valves.
- Height sensor not detecting objects: Ensure proper alignment and calibration of the sensor.
8. Extensions and Advanced Modifications
Once the basic system is operational, consider the following enhancements:
- Speed Control: Add a variable speed drive (VFD) for adjustable conveyor speed.
- Data Logging: Record sorting statistics using an HMI or data logging system.
- Multi-Sensor Sorting: Add additional sensors to classify objects based on multiple criteria (e.g., color, weight).
- Fault Detection: Implement an error detection system that halts the process if an actuator fails.
9. Conclusion
This exercise introduced the principles of PLC programming and industrial automation. By building this system, you gained experience in integrating sensors, actuators, and control logic. With these skills, you’re ready to take on more advanced automation challenges in real-world applications.