Automated Sorting System PLC Program

In the era of automation, an automatic sorting system is highly desirable in approximately every industry. Its main objective is to reduce human efforts and time which can ultimately raise its efficiency.

An automated sorting system is an integral part of the Material Management System (MMS) that is being widely used in many industries. In this article, we have discussed how to draw a ladder logic diagram for an automated sorting system.

PLC based Automated Sorting System

Material management system(MMS) is a major requirement of almost every manufacturing industry and it can be done through storage, controlling, protection, and sorting with respect to their dimensions, colors using machine vision, or material of an object. An automatic sorting machine performs the task of sorting components according to their different parameters such as materials, sizes, etc.

Problem Statement

Draw a ladder logic diagram for an automated sorting system to sort the objects according to their materials (wood, metal, and plastic).

Automated Sorting System - Positional Sketch
Automated Sorting System – Positional Sketch
  • Detect the incoming objects with the help of a photoelectric sensor, proximity, and color sensor.
  • Use a belt conveyor to move the objects from one place to another place that will be operated with the help of an electric motor.
  • Take sensors such as inductive proximity sensor, capacitive proximity sensor, and a photoelectric sensor.
  • Determine whether the object is wooden, metallic, or plastic.
  • Make a program to sort these objects according to their material.
  • Use pneumatic cylinders and a mechatronics system to push to objects in their respective collectors/buckets.

The flow chart of the automated sorting system is shown in the figure below.

Automated Sorting System Flow Chart
Automated Sorting System Flow Chart

List of Input and Output Tags

Before we see look up to the required input and output tags, we will see the components that will act as inputs and outputs of the automated sorting system.

An automated sorting system consists of 2 pneumatic cylinders that have 2 magnetic position sensors to sense the forward and retract the position of the cylinder. Position of each cylinder act as an input that will further be used in the PLC program.

cylinder position sensor
Cylinder Position Sensor

The pneumatic cylinders are operated with the help of 5/2 double solenoid pilot-operated direction control valves and act as an output generating device in the system.

Apart from these, an inductive proximity sensor, a capacitive proximity sensor, and a photoelectric sensor are used in the system and act as input devices.

A flat belt conveyor is operated with the help of an electric motor and it also needs a ladder logic program for its control.

AddressSymbolDescriptionType
I0.0S1START PUSH BUTTON (N.O)INPUT
I0.1S2RESTART PUSH BUTTON (N.O)INPUT
I0.2S3AUTO/MANUAL SELECTOR SWITCHINPUT
I0.3S4EMERGENCY STOP PUSH BUTTON (N.C)INPUT
I0.41B2CYLINDER 1 RETRACT POSITIONINPUT
I0.51B1CYLINDER 1 EXTEND POSITIONINPUT
I0.62B2CYLINDER 2 RETRACT POSITIONINPUT
I0.72B1CYLINDER 2 EXTEND POSITIONINPUT
I1.0B1CAPACITIVE SENSOR B1 (N.O)INPUT
I1.1B2INDUCTIVE SENSOR B2 (N.O)INPUT
I1.2B3COMPONENT COLOR SENSOR B3 (N.C)INPUT
Q0.01Y1CYLINDER 1 RETRACT (SOLENOID OF DCV1)OUTPUT
Q0.11Y2CYLINDER 1 EXTEND (SOLENOID OF DCV1)OUTPUT
Q0.22Y1CYLINDER 2 RETRACT (SOLENOID OF DCV2)OUTPUT
Q0.32Y2CYLINDER 2 EXTEND (SOLENOID OF DCV2)OUTPUT
M0.0CONVEYOR MOTOR OFF MEMORYMEMORY
M0.1CONVEYOR MOTOR ON MEMORYMEMORY
M1.1B1MSENSOR B1 MEMORYMEMORY
M1.2B2MSENSOR B2 MEMORYMEMORY
M1.3B3MSENSOR B3 MEMORYMEMORY
DB1DB1T-ON TIMER 5 SECONDSTIMER
DB2DB2T-ON TIMER 5 SECONDSTIMER
Q0.43YCONVEYOR MOTOR ONOUTPUT

Automated Sorting System Ladder Logic Diagram

In this example, we have used Siemens S7-1200 PLC and Siemens TIA portal for programming a ladder logic diagram. The PLC we selected has a work memory of 100 kb, 24 V DC power supply with 24V DC 14 digital inputs, 10 digital outputs, and 2 analog inputs on board.

We have divided the program into 4 networks. The first network shows the conveyor on/off cycle. The second network shows set sensor memories. The third network shows the actual sorting program and the final fourth network shows reset sensor memories that we have set in network 2.

Network 1

As the conveyor is run through an electric motor, we have used a single push button on/off ladder logic method to turn on and off the conveyor.

Automated Sorting System - Conveyor On Off
Automated Sorting System – Conveyor On Off

When Push Button S1(N.O) is pressed, it turns ON memory M0.1. This will turn ON the conveyor motor 3Y and the conveyor will start. This movement of the conveyor is used to transfer material from one place to another place.

Network 2

In this network, we have set the sensor memories. The reason to set the memories is that there is a distance between the sensors and the pneumatic cylinders. When the object moves forward, sensors will come to its original form (i.e. N.O/N.C) as they don’t sense any object. This gives misleading input to the actuators.

Hence, in order to avoid this problem, we have set the memory for each sensor when it senses the object.

Automated Sorting System - Set Sensor Memory
Automated Sorting System – Set Sensor Memory

When capacitive sensor B1 senses the object, it sets its memory B1M and retracts cylinder 1 (Q0.1) and cylinder 2 (Q0.3). Similarly, sensors B2 and B3 set their memories when they sense any object.

Network 3

It is the main sorting program that decides which object will be sorted at what station. Using this ladder logic program, we have sorted all three materials i.e. plastic, metal, and wood in their respective collectors.

Cylinder 1 is used to sort plastic objects whereas cylinder 2 is used to sort metallic objects, and if it’s a wooden object, it will be sorted out at last by default.

Automated Sorting System - Sorting Program
Automated Sorting System – Sorting Program
  • Rung 1 shows metallic object sorting. When a metallic object is sensed by sensor B1, B1M (N.O) becomes (N.C). Similarly, B2M and B3M, both N.O becomes N.C. This completes the circuit and cylinder 1 extends (Q0.0) using DCV.
  • Rung 2 shows plastic object sorting. When a plastic object is sensed by sensor B1, B1M (N.O) becomes (N.C). As plastic is not a metallic object, sensor B2 will not give any sensing input. Color sensor B3 senses a plastic object and its N.O becomes N.C. This completes the circuit and cylinder 2 extends (Q0.2) using DCV.
  • The cylinder position sensor senses the extended position and is retracted by using a timer.
  • In our case, we have taken a time of 5 seconds to retract cylinder 1 and cylinder 2.

Network 4

Network 4 shows reset sensor memory. The sensor memories that we set in network 2 needs to be reset to sense the next object. Hence, it is necessary to reset those set memories.

Automated Sorting System - Reset Sensor Memory
Automated Sorting System – Reset Sensor Memory

The above ladder logic program shows that either cylinder 1 extended position (1B1) or cylinder 2 extended position (2B1) resets memories of all the sensors.

Leave a Comment