
π‘ PLC Programming Exercise: Conveyor Belt Sorting System
1. π§ Introduction
This exercise walks you through building a PLC-controlled conveyor belt sorting system that detects and sorts objects based on size. It uses sensors to detect packages, timers to delay sorting actions, and actuators to divert packages into bins. The logic is controlled through ladder logic and can be simulated or implemented on real hardware.
2. π― Learning Objectives
By completing this exercise, you’ll learn how to:
- Program a PLC using ladder logic
- Work with sensors, timers, and actuators
- Apply interlocking logic for safe operation
- Simulate and test your logic using software like TIA Portal or RSLogix
3. π§° Tools and Components
Hardware (for physical implementation):
- A small conveyor belt driven by a motor
- Two push buttons: one for Start and one for Stop
- Two proximity sensors: one detects small objects, the other detects large ones
- Two pneumatic arms or solenoids for diverting packages
- Three indicator lamps: one shows the system is running, another for error status, and one to show sorting activity
- A PLC (Siemens S7-1200, Allen-Bradley MicroLogix/CompactLogix)
Software:
- For Siemens users: TIA Portal
- For Allen-Bradley users: RSLogix 500 or Studio 5000
- PLC simulation tools such as PLCSIM (Siemens) or Emulate 500 (Allen-Bradley)
4. π Core Concepts and Definitions
Before jumping in, understand the following key terms:
- Ladder Logic: A graphical programming method used for PLCs, resembling electrical relay logic diagrams.
- TON Timer: A timer that activates an output after a specified time delay, used for precise control.
- Interlock: A control mechanism to prevent conflicting actions or ensure safe sequencing.
- Actuator: A device (like a solenoid or pneumatic arm) that moves in response to a PLC output.
- Sensor: A device that detects the presence or characteristics of an object.
5. π οΈ Step-by-Step Programming Guide
Step 1 β Creating the Start/Stop Control
- Use a normally open contact for the Start button and a normally closed contact for the Stop button.
- Implement a Set/Reset (SR) latch or Latch/Unlatch instruction to control the conveyor motor.
- When the Start button is pressed, the motor and the “System Running” lamp turn ON.
- Pressing the Stop button deactivates all outputs immediately.
Step 2 β Object Detection Logic
- Place a proximity sensor at the start of the conveyor to detect small packages.
- Place another sensor slightly downstream to detect large packages.
- These sensors act as triggers for sorting events.
Step 3 β Sorting Logic for Small Packages
- When the small object sensor is activated:
- Use a TON timer to introduce a 1-second delay before sorting.
- Once the timer completes, activate the small package sorter actuator briefly (e.g., 0.5s).
- Deactivate the actuator after the short delay using a second timer or a momentary pulse.
Step 4 β Sorting Logic for Large Packages
- Similar to the small package logic, use a TON timer for large package detection.
- After the delay, activate the large package sorting actuator for 0.5 seconds.
Step 5 β Interlock Conditions
- Ensure that only one sorter can activate at a time.
- Use logic conditions that check if any sorter is already active before enabling the next.
- Prevent the conveyor from accepting new objects during sorting operations to avoid overlap.
Step 6 β Safety and Emergency Stop
- Pressing the Stop button should immediately reset all timers and outputs.
- Implement a master control relay (MCR) rung that turns OFF all outputs in an emergency.
6. π§ͺ Testing and Debugging
Hereβs how to verify your logic:
- Simulate each sensor input and observe output behavior.
- Confirm timers activate with the proper delay.
- Check that only one sorting actuator moves at a time.
- Verify the motor runs only after the Start button is pressed and stops with the Stop button.
- Use indicator lamps or HMI feedback for visual cues during simulation.
- Watch for issues like simultaneous sensor triggers and refine the logic to handle them gracefully.
7. π Suggested Extensions
Once your basic project works, you can expand it with:
- A third sensor for medium-sized packages
- Package counting using CTU (count up) instructions
- HMI panel integration to show package counts and sorter activity
- Logging sort history to a SCADA system
- Adding photoelectric sensors for more precise detection
- A buzzer or alarm for error or mis-sort events