In this PLC programming, we do sorting and distribution of boxes by height into the designated storage bins using sensors and conveyors.
This PLC program distributes the specified number of parts according to their size.
PLC Sorting Boxes by Height
The below simulation shows the working principle of PLC logic for sorting boxes based on their height. Here we have 3 different size boxes like small, medium, and large sizes.
There are three storage bins for each box size. There are three pushers and three conveyors. Each box size has one pusher and one conveyor.
The robot places the boxes randomly on the conveyor. The sensors are used to detect the box’s size. The conveyors are started and stopped when the respective box size reaches there using the sensors.
The respective pusher is activated and moves the respective box size to the dedicated storage bins.
PLC I/O List
The below table lists the inputs and outputs of this system.
Type | Device No. | Device Name | Operation |
Input | X0 | Starting point | ON when the robot is at starting point. |
Input | X1 | Upper | ON when the part is detected. |
Input | X2 | Middle | ON when the part is detected. |
Input | X3 | Lower | ON when the part is detected. |
Input | X4 | Sensor | ON when the part is detected on the incline. |
Input | X5 | Sensor | ON when the part is detected on the incline. |
Input | X6 | Sensor | ON when the part is detected on the incline. |
Input | X7 | Sensor | ON when the part is detected at the right end. |
Input | X10 | Detect part | ON when the part is detected in front of the pusher. |
Input | X11 | Detect part | ON when the part is detected in front of the pusher. |
Input | X12 | Detect part | ON when the part is detected in front of the pusher. |
Output | Y0 | Supply command | One part is supplied When Y0 is ON. A process cycle begins: Wooden part repeats in order M, S, L, M, M, L, S, S, L, L. |
Output | Y1 | Conveyor forward | The conveyor moves forward when Y1 is ON. |
Output | Y2 | Conveyor forward | The conveyor moves forward when Y2 is ON. |
Output | Y3 | Conveyor forward | The conveyor moves forward when Y3 is ON. |
Output | Y4 | Conveyor forward | The conveyor moves forward when Y4 is ON. |
Output | Y5 | Pusher | Extends when Y5 is ON and retracts when Y5 is OFF. The pusher cannot be stopped in the mid-stroke. |
Output | Y6 | Pusher | Extends when Y6 is ON and retracts when Y6 is OFF. The pusher cannot be stopped in the mid-stroke. |
Output | Y7 | Pusher | Extends when Y7 is ON and retracts when Y7 is OFF. The pusher cannot be stopped in the mid-stroke. |
Program Description
Programming a Programmable Logic Controller (PLC) for Box Sorting Based on Height and Component Distribution.
Initiating the robot’s operation involves pressing the pushbutton PB1 (X20) located on the control panel, which activates the Robot Supply Command (Y0).
The Robot Supply Command (Y0) is deactivated upon the robot completing the part movement and returning to its initial position.
The Conveyor Movement Command is controlled by the Switch SW1 (X24) on the control panel. Activating the switch (turning it ON) propels the conveyor’s movement forward while deactivating it (turning it OFF) brings the conveyor to a halt.
Sorting of parts, segregated into large, medium, and small sizes, is executed through the input from the Upper (X1), Middle (X2), and Lower (X3) sensors. Post-sorting, the parts are conveyed to their designated trays.
The presence of a part in the pusher is identified by the activation (turning ON) of the Part Detection Sensors (X10, X11, or X12). Upon part detection, the conveyor is brought to a halt, and the detected part is displaced onto the tray.
Note: The operation of the pusher is governed by the Pusher Actuation Command. Upon receiving an ON signal, the pusher fully extends, while an OFF signal causes the pusher to retract.
Each tray is to contain a specific number of parts, depending on their size. Any parts exceeding these specified numbers bypass the pusher and are ejected from the conveyor at the right end.
The designated number of parts per size is as follows:
- Large: 3 parts
- Medium: 2 parts
- Small: 2 parts
PLC Ladder Logic
Source: Mitsubishi Electric
If you liked this article, then please subscribe to our YouTube Channel for Instrumentation, Electrical, PLC, and SCADA video tutorials.
You can also follow us on Facebook and Twitter to receive daily updates.
Read Next:
- SCADA System Architecture
- Two-Hand Press Safety Circuit
- Feedback Monitoring in PLC
- PLC Power Supply and Voltages
- Automation System Power Supply