This article discusses product sorting as per their weight classification using the Siemens TIA-Portal. The system is designed to separate products and place them into containers according to their weight categories. The products are classified into three weight categories: 7 grams, 12 grams, and 25 grams. The process begins with weighing the products, followed by transporting them using a conveyor to the appropriate container. This PLC system also includes a feature to count the number of sorted products, with an option to reset the product counter data.
Program Objective

1. System Initialization:
- The system is activated and enters standby mode.
- The product sensor waits to detect the presence of a product.
2. Product Detection and Weighing:
- The product sensor detects the presence of a product in the weighing area.
- The weighing process is carried out for 5 seconds.
- The product’s weight data is obtained and stored in the system.
3. Initial Transportation:
- Actuator A is activated to push the product onto Conveyor A.
- Conveyor A starts moving to transport the product.
4. Product Routing:
- The product’s weight data is compared with the predefined threshold values.
- Based on the comparison results:
- If the product’s weight ≤ 7 grams, Actuator B is activated.
- If 7 grams < product’s weight ≤ 12 grams, Actuator C is activated.
- If the product’s weight > 12 grams, Actuator D is activated.
5. Final Transportation:
- The activated actuator pushes the product onto the appropriate conveyor line.
- Appropriate conveyors are activated to send product to the collection containers.
6. Process Termination:
- The product-out sensor in the collection containers sends a signal.
- All actuators and conveyors are stopped.
7. Product Counting:
- The system counts the number of products in each collection bin based on signals from the sensors.
Mapping Details
| S.No. | Comment | Input (I) | Output (Q) | Memory Bit | Memory Word | Timer |
|---|---|---|---|---|---|---|
| 1 | PB_START | I0.0 | ||||
| 2 | PB_STOP | I0.1 | ||||
| 3 | SENS_PRODUCT | I0.2 | ||||
| 4 | LS_OPEN_ACT1 | I0.3 | ||||
| 5 | SENS_OUT1 | I0.4 | ||||
| 6 | SENS_OUT2 | I0.5 | ||||
| 7 | SENS_OUT3 | I0.6 | ||||
| 8 | RESET COUNTER | I0.7 | ||||
| 9 | ACTUATOR_A | Q0.0 | ||||
| 10 | CONVEYOR_A | Q0.1 | ||||
| 11 | ACTUATOR_B | Q0.2 | ||||
| 12 | CONVEYOR_B | Q0.3 | ||||
| 13 | ACTUATOR_C | Q0.4 | ||||
| 14 | CONVEYOR_C | Q0.5 | ||||
| 15 | ACTUATOR_D | Q0.6 | ||||
| 16 | CONVEYOR_D | Q0.7 | ||||
| 17 | PV_PRODUCT_WEIGHT | MW0 | ||||
| 18 | COUNT_PRODUCT_7GRAMS | MW2 | ||||
| 19 | COUNT_PRODUCT_12GRAMS | MW4 | ||||
| 20 | COUNT_PRODUCT_25GRAMS | MW6 | ||||
| 21 | SYSTEM_ON | M8.0 | ||||
| 22 | M_TIMER1 | M8.1 | ||||
| 23 | TIMER1 | DB1 |
Siemens TIA Portal for Weight Classification

NETWORK 1 (SYSTEM START)
In this network, the memory bit SYSTEM_ON (M8.0) will be in the HIGH state if the PB_START(I0.0) button is pressed.
Because it uses Latching, even though the PB_START (I0.0) button has been released, the memory bit SYSTEM_ON (M8.0) will remain in the HIGH state.
The memory bit SYSTEM_ON (M8.0) will be in the LOW state if the PB_STOP (I0.1) button is pressed.
NETWORK 2 (ACTUATOR A)
In this Network, Timer TIMER1 (DB1) will start counting if the NO contact of the memory bit SYSTEM_ON (M8.0) and SENS_PRODUCT (I0.2) Sensor is in the HIGH state.
Timer TIMER1 (DB1) will start counting up to 5 seconds, and after finishing counting, the memory bit M_TIMER1 (M8.1) will be in HIGH state and the output ACTUATOR_A (Q0.0) will be ON.
When the NC contact of the Limit Switch LS_OPEN_ACT1 (I0.3) is in the HIGH state, the output ACTUATOR_A (Q0.0) will be OFF.

NETWORK 3 (CONVEYOR A ON)
In this network, when the NO contact of the memory bit SYSTEM_ON (M8.0) and Limit Switch LS_OPEN_ACT1 (I0.3) are in the HIGH state, the output CONVEYOR_A (Q0.1) will be ON. Even though the NO contact of the Limit Switch LS_OPEN_ACT1 (I0.3) is in the LOW state, the CONVEYOR_A (Q0.1) output will remain ON because it uses Latching.
If one of the NC contacts of the SENS_OUT1 (I0.4), SENS_OUT2 (I0.5), SENS_OUT3 (I0.6) Sensors is in the HIGH state, then the CONVEYOR_A (Q0.1) output will be OFF.
NETWORK 4 (ACTUATOR B & CONVEYOR B)
In this Network, if the NO contact of the memory bit SYSTEM_ON (M8.0) in the HIGH state and the memory word PV_PRODUCT_WEIGHT (MW0) is Equal To “7”, then the output ACTUATOR_B (Q0.2) and CONVEYOR_B (Q0.3) will be ON. The ACTUATOR_B (Q0.2) and CONVEYOR_B (Q0.3) outputs will remain ON even if the memory word PV_PRODUCT_WEIGHT (MW0) is Not Equal To “7”. Because it uses Latching.
When the NC contact of the SENS_OUT1 (I0.4) sensor is in the HIGH state, the ACTUATOR_B (Q0.2) and CONVEYOR_B (Q0.3) outputs will be OFF.

NETWORK 5 (ACTOATOR C & CONVEYOR C)
In this Network, if the NO contact of the memory bit SYSTEM_ON (M8.0) is in the HIGH state and the memory word PV_PRODUCT_WEIGHT (MW0) is equal to “12”, then the output ACTUATOR_C (Q0.4) and CONVEYOR_C (Q0.5) will be ON. The ACTUATOR_C (Q0.4) and CONVEYOR_C (Q0.5) outputs will remain ON even if the memory word PV_PRODUCT_WEIGHT (MW0) is not equal to “12”. Because it uses Latching.
If the NC contact of the SENS_OUT2 (I0.5) sensor is in the HIGH state, then the ACTUATOR_C (Q0.4) and CONVEYOR_C (Q0.5) outputs will be OFF.
NETWORK 6 (ACTOATOR D & CONVEYOR D)
In this Network, when the NO contact of the memory bit SYSTEM_ON (M8.0) is in the HIGH state and the memory word PV_PRODUCT_WEIGHT (MW0) is Equal To “25”, then the output ACTUATOR_D (Q0.6) and CONVEYOR_D (Q0.7) will be ON. The ACTUATOR_D (Q0.6) and CONVEYOR_D (Q0.7) outputs will remain ON even if the memory word PV_PRODUCT_WEIGHT (MW0) is not equal to “25”. Because it uses Latching.
If the NC contact of the SENS_OUT3 (I0.6) sensor is in the HIGH state, then the ACTUATOR_D(Q0.6) and CONVEYOR_D (Q0.7) outputs will be OFF.

NETWORK 7 (COUNTER)
In this Network, the value in the memory word COUNT_PRODUCT_7GRAMS (MW2) will increase by (+1) if the NO contact of the memory bit SYSTEM_ON (M8.0) and Sensor SENS_OUT1 (I0.4) are in the HIGH state.
The value in the memory word COUNT_PRODUCT_12GRAMS (MW4) will increase by (+1) if the SENS_OUT2 (I0.5) Sensor is in the HIGH state.
The value in the memory word COUNT_PRODUCT_25GRAMS (MW6) will increase by (+1) if the SENS_OUT3 (I0.6) sensor is in the HIGH state.

NETWORK 8 (RESET COUNTER)
In this Network, the values in the memory words COUNT_PRODUCT_7GRAMS (MW2), COUNT_PRODUCT_12GRAMS (MW4), and COUNT_PRODUCT_25GRAMS (MW6) will become zero “0” if the RESET COUNTER (I0.7) button is pressed.
Read Next:
- Omron PLC Program for Hot and Cold Water Tanks
- PLC Bottle Grading System With Counters & Actuators
- PLC Control Programming for Sand Sieve System
- Omron PLC Two-Hand Safety Press Machine Program
- Automated Waste Sorting PLC System Using TIA-Portal