October 11, 2021

Parts counting and packaging system

This is PLC Program to count and pack parts from conveyor.

 

Problem Description:-

Objects are moving on conveyor 1. We need to pack five objects in the empty box. When empty box is filled. It is carried to the storage via conveyor belt 2. Implement this automatic cycle in PLC using ladder language.

 

Problem Diagram









https://plcscadaacademy.blogspot.com








Problem Solution.

Mostly inductive and proximity sensors are used to detect objects. Here we mount proximity sensor for the object detection and empty box detection.

 

Inductive sensor are mostly used to detect metal parts and proximity sensors are used to detect metal parts and other parts.

 

Here one proximity sensor is for object detection and other is for box detection. Objects are moving on conveyor 1 and boxes are moving on conveyor 2.

We will write automatic cycle for this application in PLC. So when empty box is detected on conveyor 2, conveyor 1 will be ON automatically.

And when box is filled with five objects, conveyor belt 2 will start automatically.


Note:-Here we consider simple application for counting and packaging application. We have taken here proximity sensor for simplicity. Proximity sensor will sense the object and counter will count the total objects.

 

Program

Here is PLC program to count and pack parts from conveyor.

List of inputs/outputs

Digital Inputs

Start:-I0.0

Stop:-I0.1

Proximity:-I0.2 (part detection)

Proximity:-I0.3 (Box detection)

Counter reset PB:-I0.4

Digital Inputs

Cycle ON:-Q0.0

Conveyor belt 1:- Q0.1

Conveyor belt 2:-Q0.2

M memory

Total objects:-MW10

Relay coil: - M0.2


Ladder diagram to count and pack parts from conveyor.


https://plcscadaacademy.blogspot.com

https://plcscadaacademy.blogspot.com

https://plcscadaacademy.blogspot.com

https://plcscadaacademy.blogspot.com

https://plcscadaacademy.blogspot.com

https://plcscadaacademy.blogspot.com


 

 

                                                   









































Program Description

 

For this application we use S7-300 PLC and TIA portal software for programming. We can implement this logic by using other PLC also.

Network 1:- In first network we used latching circuit for cycle ON. Here we used START PB (I0.0) to start the cycle and STOP PB (I0.1) to stop the cycle.

Network 2:-Here when empty box is detected (I0.3) and cycle is ON, conveyor 1 (Q0.0) will be ON.

Network 3:- Counter is used to count the objects moving on the conveyor 1. Objects are moving on the conveyor 1 (Q0.0) and mounted proximity sensor (I0.2) is detecting the objects. Now counter counts in the incremental way. Total counted objects will be stored in the memory word or register (MW10).

Network 3:- Counter is used to count the objects moving on the conveyor 1. Objects are moving on the conveyor 1 (Q0.0) and mounted proximity sensor (I0.2) is detecting the objects. Now counter counts in the incremental way. Total counted objects will be stored in the memory word or register (MW10).

Network 4:-When five box completely packed in the box, counter output will be ON and as per logic relay coil (M0.2) will be latched for timer operation.

Network 5:-Timer instruction is executed when relay coil (M02.) is activated.

Network 6:-Box is filled with five objects or counter output is ON and empty box is not detected, conveyor belt 2(Q0.2) will be activated.

 

When objects are moving on the conveyor 1, counter will count the objects. We need to pack three objects in the box. So when box is filled with five object, timer will stop the conveyor belt 1 and conveyor belt 2 will start automatically.

Here we have not considered all interlocks for simplicity. Belts synchronization are assumed because we have used timer based synchronization.

Note:-Above application may be different from actual application. This example is only for explanation purpose only. We can implement this logic in other PLC also. This is the simple concept of counting and packaging application. By using this concept we can count objects moving on the conveyor and pack it automatically.

All parameters considered in example are for explanation purpose only, parameters may be different in actual applications.

 

Runtime Test Cases

Inputs

Outputs

Physical Elements

I0.0=1

Q0.0=1

Cycle ON

I0.1=1

Q0.0=0

Cycle OFF

I0.3=1

Q0.1=1

Conveyor belt 1 ON

I0.2=1

Counter increase

MW10=1, 2, 3, 4….

"Counter".Q=1&I0.3=0

Q0.2=1

Conveyor belt 2 OFF

M0.1

MW10=0

Total count zero

 

April 27, 2021

SESSION2 : ADDING DEVICE AND HARDWARE CONFIGURATION

Software Used: TIA portal 15.1

CPU used : S7-1200 1214C DCDCDC CPU SIEMENS

Click "Read More"  For video

Please like, Share and Subscribe our YouTube Channel : A Creative - YouTube

Subscribe Our Channel : Free Subscribe!!



April 26, 2021

SESSION1: INTRODUCTION OF TIA PORTAL SOFTWARE


Software Used: TIA portal v15.1

CPU used : S7-1200 1214C DCDCDC CPU SIEMENS

Click "Read More"  For video

Please like, Share and Subscribe our YouTube Channel : A Creative - YouTube

Subscribe Our Channel : Free Subscribe!!

November 7, 2020

Small part hot plate welding.

Small part hot plate welding.

Application:-Weld two small plastic parts with the hot plate welding method. Write the PLC program for the hot plate welding process using a ladder diagram language.

Diagram:-












Explanation:-

Hot plate welding the method is a popular method for plastic part welding in the plastic industry. Generally, two parts are melted at a certain temperature and joint together in this method. We can use this method for two plastic parts welding.

 

Special Rules to design ladder diagram logic

-Signals selection, Decisions section and Actions Section

-The sequence of the logic should be left to right

October 25, 2020

NORM_X AND SCALE_X value scaling in the S7-1200 PLC

Design and implement a PLC program in Siemens S7‑1200 that processes the analog signal from the pressure transmitter, normalizes it, and scales it into engineering units (bar), ensuring accurate and reliable pressure monitoring for display and control using NORMA_X and SCALE_X

zxsds
PLCSCADACADEMY


Explanation

1. Hardware Integration (S7-1200)

The S7-1200 typically features onboard analog inputs (0-10V) or uses signal boards/modules for current signals (4-20mA).

Wiring the Pressure Transmitter

  • 2-Wire Transmitter: The transmitter is powered by the loop. The PLC provides 24V DC.

             Path: L+ → Transmitter (+) → Transmitter (-) → PLC Input (+) → PLC Input (-) → M.

  • 4-Wire Transmitter: The transmitter has separate power and signal wires.

             Path: Signal (+) → PLC Input (+) | Signal (-) → PLC Input (-).

S7-1200 Addressing & Range

  • Onboard AI: Usually %IW64 and %IW66.
  • Expansion Modules: Addressing starts at %IW96 or higher.
  • Digital Range: 0 to 27648 (Normal range).
  • Deadband/Wire Break: For 4-20mA, if the raw value drops to -4864, it indicates 0 mA (wire break).

2. Technical Case Study: Pressure Measurement

Application: Monitoring a hydraulic line pressure.

  • Sensor: 4-20 mA Pressure Transmitter.
  • Physical Range: 0.0 to 100.0 Bar.
  • PLC: S7-1200 with an AI 4x13 bit SM 1231 module.

Signal Mapping Table

Pressure (Bar)

Signal (mA)

S7 Raw Value (%IW)

S7 Normalized (0.0 - 1.0)

0.0 Bar

4 mA

0

0.00

25.0 Bar

8 mA

6,912

0.25

50.0 Bar

12 mA

13,824

0.50

75.0 Bar

16 mA

20,736

0.75

100.0Bar

20 mA

27,648

1.00

 

PLC program:-

Write the ladder program for the above application using ladder diagram language. Here for ladder logic, we can use any supported PLC system like S7-1200, S7-300, S7-1500, or any other PLC which can support this instruction. For PLC logic we need digital inputs and outputs.

Define the memory register for the program as per the following address,

List of M Memory

MW10:-For analog value (0 to 27648). ( Convert int to real for real value )

MW12:-Out of NORM_X ( Convert int to real for real value )

MW14:-Output value ( Convert int to real for real value )

 

PLCSCADAACADEMY







PLCSCADAACADEMY









PLC program Explanation:-

 Network 1 – Input Value Conversion (NORM_X)

  • Instruction used: NORM_X
  • Purpose: To normalize the raw analog input value into a floating‑point number between 0.0 and 1.0.
  • Why needed:
    • Analog input modules return integer values (e.g., 0 to 27648 for 0–20 mA).
    • These raw values are not directly meaningful in engineering terms.
    • Normalization ensures that no matter the input range, the value is scaled into a standardized ratio (0.0–1.0).

Process:

  1. The PLC reads the raw analog input (e.g., 0–27648).
  2. NORM_X divides the input by the maximum possible value.

  1. Result is always between 0.0 (minimum) and 1.0 (maximum).

Example:

  • Raw input = 13,824 (half of 27,648)
  • Normalized value = 0.5

So, the sensor signal is now expressed as a percentage of full scale.

Network 2 – Output Value Conversion (SCALE_X)

  • Instruction used: SCALE_X
  • Purpose: To convert the normalized value (0.0–1.0) into a desired engineering unit range.
  • Why needed:
    • Engineers want values in real units (temperature, pressure, speed, etc.).
    • SCALE_X maps the normalized ratio into the chosen engineering range.

Process:

  1. Take the normalized value from Network 1.
  2. Multiply it by the engineering unit span (Max – Min).
  3. Add the minimum engineering unit value.

Example:

  • Normalized value = 0.5
  • Engineering unit range = 0–100
  • Calculation:

So, the PLC output is 50 units (e.g., 50.0 bar if measuring bar).


Putting It Together

  • Network 1 (NORM_X): Converts raw sensor signal → normalized ratio (0.0–1.0).
  • Network 2 (SCALE_X): Converts normalized ratio → engineering units (0–100).

This two‑step process ensures:

  • Flexibility (any input range can be normalized).
  • Accuracy (engineering values are scaled correctly).
  • Simplicity (easy to reuse across different sensors and outputs).