automatic mixing & filling bottle using PLC

53
Automatic mixing & Filling bottle Using PLC By PULAGAM LEELA VEERENDRA KUMAR Email: [email protected] Mobile no: 9966108092 Project video has been upload to YouTube. Link https://youtu.be/ib9D0KwAG6Y

Transcript of automatic mixing & filling bottle using PLC

Page 1: automatic mixing & filling bottle using PLC

Automatic mixing & Filling bottle

Using

PLC

By

PULAGAM LEELA VEERENDRA

KUMAR

Email:

[email protected]

Mobile no: 9966108092

Project video has been upload to YouTube. Link

https://youtu.be/ib9D0KwAG6Y

Page 2: automatic mixing & filling bottle using PLC

ABSTRACT

Nowadays, the application of PLC is widely known and use in this digital world

PLC’s application is obviously applied at the industrial sector. Normally, the PLC’s that have

been used at the industrial field is usually to control a mechanical movement either of the

machine or heavy machine in order to create an efficient production and accurate signal

processing. In this project, a discussion about PLC application will be explained in more

details and specified. Whereby, a machine that used to prepare automatic mixing and filling

into the bottle is fully controlled by the SIEMENS PLC S7-1200, which acts as the heart of the

system. The system sequence of operation is designed by ladder diagram and the programming

of this project by using totally integrated automation portal software (V-10.5).several

electronics and electric devices that usually been controlled by the PLC are submersible motor

pump, sensor, conveyor belt, solenoid valve, push buttons, relays and other devices.

Page 3: automatic mixing & filling bottle using PLC

[email protected]

Chapter 1

1.1 INTRODUCTION

A programmable logic controller (PLC) is a solid state device designed to previously

accomplish by electromechanically relays. PLC is a basically a controller not continuous but logic

state, i.e., on-off controller. Hence sequences of logic states are programmed. All operation is to

control a process, operation of manufacturing equipment and machinery. PLCs are in the

computer family. They are used in commercial and industrial applications

Initially the plc was used to replace relay logic, but its ever-increasing range of function

means that it is found in the many and more complex applications. As the structure of a plc is

based on the same principle as those employed in computer architecture, it is capable of

performing not only relay switching tasks but also other applications such as counting, calculating

comparing and the processing of analog signals.

1.2 Basic principle of PLC

PLC was invented in the 60/70’s for the automotive manufacturing industry. Since this

time, they have developed into one of the most versatile tools used for industrial automation. A

working knowledge of PLCs and other microprocessor based control system are critical to

technical personal who are staying current with technology in industry.

PROGRAMMABLE LOGIC CONTROLLER or PLC is the hub of many manufacturing

processes. These micro processor based units are used in processes as simple as boxing machines

or bagging equipment to controlling and tacking sophisticated manufacturing processes. They are

in virtually all new manufacturing, processing and package equipment in one form or another.

Because of their population in industry, it becomes increasingly more important to learn skills

related to these devices. Click on the buttons to learn more about industrial automation and this

invaluable tool.

Page 4: automatic mixing & filling bottle using PLC

[email protected]

The microprocessor or processor module is the brain of a PLC system. It consists of the

microprocessor, memory integrated from memory. It also includes communications ports to other

peripherals, other PLCs or programming terminals.

Today’s processors vary widely in their capabilities to control real devices. Some control as few

as 6 inputs and outputs and other 40,000 or more. One processor can control more than one

process of manufacturing line. Processor are often linked together in order to provide continuity

throughout the process. The number of inputs and outputs PLCs can control are limited by the

overall capacity of the PLC system hard ware and memory capabilities. The job of the processor is

to monitor status or state of input devices, scan and solve the logic of a user program, control on

or off state of output devices.

1.3 Objectives

There are four objectives to be achieved in this project. Below are the following

Objectives:

To design appropriate model for automatic mixing & filling bottle.

To design program using PLC for automatic mixing & filling bottle.

To interface PLC module with the inputs and outputs component.

To design a prototype system for automatic mixing & filling bottle.

1.4 Scope of the Project

To achieve the objectives and purpose of the project, the scope of study and research can

be divided into following areas:

Design and develop the prototype for the automatic mixing & filling bottle by

using PLC as the controller to enhance the existing system.

This project will develop the prototype which is respect to the actual system.

Page 5: automatic mixing & filling bottle using PLC

[email protected]

1 . 5 The development of hardware and software

A. Hardware

1) Literature study of the hardware including PLC and others components.

2) Programmable logic controller (PLC) will used the as the brain of the project

3) Dc supply 24V

4) Solenoid valve is a bottle filling component

5) Conveyor moves bottle

6) Submersible motors used pump the water and flavor into mixing container

7) Mixing motor for mix water and flavor motor

B. Software

1) Totally integrated automation on portal v-10.5

2) Simatic s7-1200

3) Ladder diagram as the source code to the PLC.

1.6 Conditions of the project

There are three containers, first container contains water, second container contains flavor,

and middle container is mixing & filling container. Water and flavor container consists of two

submersible motors. Mixing container contains a mixing fan and a solenoid valve is fixed to it.

Conveyor system arranged below the filling container, one end point of conveyor is starts from

below the solenoid valve exactly and photo electric sensor is below solenoid valve to sense the

bottle to fill it.

Page 6: automatic mixing & filling bottle using PLC

[email protected]

Figure 1.1 Photo of project

Page 7: automatic mixing & filling bottle using PLC

[email protected]

Chapter2:

Programmable Logic Controller (PLC)

2.1 History of PLC

In the late 1960's PLCs were first introduced. The primary reason for designing such a device was

eliminating the large cost involved in replacing the complicated relay based machine control systems.

Bedford Associates (Bedford, MA) proposed something called a Modular Digital Controller (MODICON)

to a major US car manufacturer. Other companies at the time proposed computer based schemes, one of

which was based upon the PDP-8. The MODICON 084 brought the world's first PLC into commercial

production.

When production requirements changed so did the control system. This becomes very expensive

when the change is frequent. Since relays are mechanical devices they also have a limited lifetime which

required strict adhesion to maintenance schedules. Troubleshooting was also quite tedious when so many

relays are involved. Now picture a machine control panel that included many, possibly hundreds or

thousands, of individual relays. The size could be mind boggling. How about the complicated initial

wiring of so many individual devices! These relays would be individually wired together in a manner that

would yield the desired outcome. As can be seen, there were many problems with this relay based design.

These "new controllers" also had to be easily programmed by maintenance and plant engineers.

The lifetime had to be long and programming changes easily performed. They also had to survive the

harsh industrial environment. That's a lot to ask! The answers were to use a programming technique most

people were already familiar with and replace mechanical parts with solid-state ones.

In the mid70's the dominant PLC technologies were sequencer state-machines and the bit-slice

based CPU. The AMD 2901 and 2903 were quite popular in Modicon and A-B PLCs. Conventional

microprocessors lacked the power to quickly solve PLC logic in all but the smallest PLCs. As

conventional microprocessors evolved, larger and larger PLCs were being based upon them. However,

even today some are still based upon the 2903. (Ref A-B's PLC-3) Modicon has yet to build a faster PLC

than their 984A/B/X which was based upon the 2901.6 Communications abilities began to appear in

approximately 1973. The first such system was Modicon's Modbus. The PLC could now talk to other

PLCs and they could be far away from the actual machine they were controlling. They could also now be

Page 8: automatic mixing & filling bottle using PLC

[email protected]

used to send and receive varying voltages to allow them to enter the analog world. Unfortunately, the lack

of standardization coupled with continually changing technology has made PLC communications a

nightmare of incompatible protocols and physical networks. Still, it was a great decade for the PLC.

The 80's saw an attempt to standardize communications with General Motor's manufacturing

automation protocol (MAP). It was also a time for reducing the size of the PLC and making them software

programmable through symbolic programming on personal computers instead of dedicated programming

terminals or handheld programmers. Today the world's smallest PLC is about the size of a single control

relay.

The 90's have seen a gradual reduction in the introduction of new protocols, and the modernization

of the physical layers of some of the more popular protocols that survived the 1980's. The latest standard

(IEC 1131-3) has tried to merge plc programming languages under one international standard. We now

have PLCs that are programmable in function block diagrams, instruction lists, C and structured text all at

the same time! PC's are also being used to replace PLCs in some applications. The original company who

commissioned the MODICON 084 has actually switched to a PC based control system.

2.1.1 Advantages of PLC

Less wiring.

Wiring between devices and relay contacts are done in the PLC program.

Easier and faster to make changes.

Trouble shooting aids make programming easier and reduce downtime.

Reliable components make these likely to operate for years before failure.

2.1.2 Disadvantages

PLC was designed for relay logic ladder and has difficulty with some smart devices.

To maximize, PLC performance and flexibility, a number of option modulus must be

added.

2.1.3 Applications of plc

Page 9: automatic mixing & filling bottle using PLC

[email protected]

It is used in process automation

It is used to optimize the process.

It is used to integrate the different processing level s.

By using PLCs quality of production is possible.

System accuracy is increased by using PLCs.

Automatic traffic control system is possible.

It is used in twisting machines, automatic suspension of rotary system

Numerous applications are possible by using PLCs in the industry.

After wiring of relay panel if the event sequence is to be changed, it is necessary to rewire

all or part of the panel.

Many of the control relay of the ladder diagram can be replaced by software which means

less hardware failure.

It is easy to make change in programmed sequence of events when it is only in software.

2.2 Plc compared with other control system

PLCs are well adapted to a range of automation tasks. These are typically industrial

processes in manufacturing where the cost of developing and maintaining the automation system

is high relative to the total cost of the automation, and where changes to the system would be

expected during its operational life. PLCs contain input and output devices compatible with

industrial pilot devices and controls; little electrical design is required, and the design problem

centres on expressing the desired sequence of operations. PLC applications are typically highly

customized systems, so the cost of a packaged PLC is low compared to the cost of a specific

custom-built controller design. On the other hand, in the case of mass-produced goods,

customized control systems are economical. This is due to the lower cost of the components,

Page 10: automatic mixing & filling bottle using PLC

[email protected]

which can be optimally chosen instead of a "generic" solution, and where the non-recurring

engineering charges are spread over thousands or millions of units.

For high volume or very simple fixed automation tasks, different techniques are used. For

example, a consumer dishwasher would be controlled by an electromechanical cam timer costing

only a few dollars in production quantities.

A microcontroller-based design would be appropriate where hundreds or thousands of

units will be produced and so the development cost (design of power supplies, input/output

hardware and necessary testing and certification) can be spread over many sales, and where the

end-user would not need to alter the control. Automotive applications are an example; millions of

units are built each year, and very few end-users alter the programming of these controllers.

However, some specialty vehicles such as transit buses economically use PLCs instead of custom-

designed controls, because the volumes are low and the development cost would be

uneconomical.

Very complex process control, such as used in the chemical industry, may require

algorithms and performance beyond the capability of even high-performance PLCs. Very high-

speed or precision controls may also require customized solutions; for example, aircraft flight

controls. Single-board computers using semi-customized or fully proprietary hardware may be

chosen for very demanding control applications where the high development and maintenance

cost can be supported. "Soft PLCs" running on desktop-type computers can interface with

industrial I/O hardware while executing programs within a version of commercial operating

systems adapted for process control needs.

Programmable controllers are widely used in motion control, positioning control and

torque control. Some manufacturers produce motion control units to be integrated with PLC so

that G-code (involving a CNC machine) can be used to instruct machine movements.

PLCs may include logic for single-variable feedback analog control loop, a proportional,

integral, derivative (PID) controller. A PID loop could be used to control the temperature of a

manufacturing process, for example. Historically PLCs were usually configured with only a few

analog control loops; where processes required hundreds or thousands of loops, a distributed

control system (DCS) would instead be used. As PLCs have become more powerful, the boundary

between DCS and PLC applications has become less distinct.

Page 11: automatic mixing & filling bottle using PLC

[email protected]

PLCs have similar functionality as remote terminal units (RTU). An RTU, however, usually does

not support control algorithms or control loops. As hardware rapidly becomes more powerful and

cheaper, RTUs, PLCs and DCSs are increasingly beginning to overlap in responsibilities, and

many vendors sell RTUs with PLC-like features and vice versa. The industry has standardized on

the IEC 61131-3 functional block language for creating programs to run on RTUs and PLCs,

although nearly all vendors also offer proprietary alternatives and associated development

environments.

In recent years "safety" PLCs have started to become popular, either as standalone models

or as functionality and safety-rated hardware added to existing controller architectures (Allen

Bradley Guard logic, Siemens F-series etc.). These differ from conventional PLC types as being

suitable for use in safety-critical applications for which PLCs have traditionally been

supplemented with hard-wired safety relays. For example, a safety PLC might be used to control

access to a robot cell with trapped-key access, or perhaps to manage the shutdown response to an

emergency stop on a conveyor production line. Such PLCs typically have a restricted regular

instruction set augmented with safety-specific instructions designed to interface with emergency

stops, light screens and so forth. The flexibility that such systems offer has resulted in rapid

growth of demand for these controllers.

2.3 What constitutes a PLC

The PLC is programmed interface between the input field element and output field elements

2.4 PLC consists of

Input module

CPU (central process unit)

Program memory

Output module

Power supply

Page 12: automatic mixing & filling bottle using PLC

[email protected]

2.4.1 Input module

There are two types of input modules

a. Digital inputs

b. Analog inputs

A. Digital inputs

These convert the external binary signal from the process to the internal digital signal

level of programmable controller.

Digital Input devices

Push buttons

Switches

Limit switch

Proximity sensor

Photo sensor

B. Analog inputs

fig 2.1 block diagram of PLC

Page 13: automatic mixing & filling bottle using PLC

[email protected]

Analog inputs cards converts’ continuous signal via a analog to digital converter into

discrete values for the PLC

Analog inputs devices

Pressure transmitter

Flow transmitter

Level transmitter

Load cell

Thermo couples

2.4.2 CPU (central processing unit)

The CPU is the brain of the system. The CPU is a very microprocessor based system that

replaces control relays, counter, timers and sequencers. A processor appears only once in a plc

and it can be either a one bit (or) a word logic operation. PLCs with word processors are used

when processing text and numerical data, calculations, gauging, controlling and recording as well

as the simple processing of signals in binary code are required. The CPU accepts (reads) input

data from various sensing devices, executes the stored user program from memory and sends

appropriate commands to control device. A direct current (dc) source is required to produce the

flow level voltage used by the processor and the inputs and outputs modules.

This power supply can be housed in the CPU unit (or) may be a separately mounted unit

depending on the PLC system manufacturer. Most of the CPUs contain the backup batteries that

keep the operating program in storage in the event of a plant power failure.

The processor memory module is a major part of the CPU housing. Memory is where the

control plan or program is held or stored in the controller the information stored in the memory

relates to the way the input and output data should be processed. The amount of memory required

is based on the complexity of the program. Memory elements store individual pieces of

information called bits (for binary digits).

The main purpose of the CPU is “scanning”. It performs the three main functions like

Read the inputs

Page 14: automatic mixing & filling bottle using PLC

[email protected]

Depends up on reading executes

Return to the values of the output

These three functions done simultaneously by the CPU called CPU scan cycle.

The time required to complete the only one cycle is called “CPU scan time”. The CPU scan time

depends upon our logic. If the scan time is increase the plc speed decreases. If the scan time is

decreases the plc speed increases

a. CHECK INPUT STATUS (read the inputs)

First the PLC takes a look at each input to determine if it is on or off. In other words, is

the sensor connected to the first input on? , Then the second input? , Then the third and so

on… It records this data into its memory to be used during the next step.

b. EXECUTE PROGRAM (depends up on reading executes)

Next the PLC executes your program one instruction at a time. Maybe the program says

that if the first input was on then it should turn on the first output. Since it already knows which

inputs are on/off from the previous step it will be able to decide whether the first output

should be turned on based on the state of the first input. It will store the execution results for use

later during the next step.

c. UPDATE OUTPUT STATUS (return to values of the output)

Finally the PLC updates the status of the outputs. It updates the outputs based on which inputs

were on during the first step and the results of executing your program during the second step.

Based on the example in step 2 it would now turn on the first output because the first input

was on and your program said to turn on the first output when this condition is true. After the

third step the PLC goes back to step one and repeats the steps continuously. One scan time is

defined as the time it takes to execute the 3 steps listed above.

The basic elements of a PLC include input modules or points, a central processing unit

(CPU), output modules or points, and a programming device. The type of input modules

or points used by a PLC depends upon the types of input devices used. Some input

Page 15: automatic mixing & filling bottle using PLC

[email protected]

modules or points respond to digital inputs, also called discrete inputs, which are either on or

off. Other modules or inputs respond to analog signals. These analog signals represent machine

or process conditions as a range of voltage or current values. The primary function of a

PLC’s input circuitry is to convert the signals provided by these various switches and

sensors into logic signals that can be used by the CPU.

The CPU evaluates the status of inputs, outputs, and other variables as it executes

a stored program. The CPU then sends signals to update the status of outputs. Output modules

convert control signals from the CPU into digital or analog values that can be used to control

various output devices. The programming device is used to enter or change the PLC’s

program or to monitor or change stored values. Once entered, the program and associated

variables are stored in the CPU. In addition to these basic elements, a PLC system may also

incorporate an operator interface device to simplify monitoring of the machine or process.

In our case the input module will be composed of an array of switches that help us

to input Logic ones or Logic zeros to the PLC; the output module is made of LEDs to display

the status of the system; our programming device is the SIEMENS provided STEP 7 MicroWin

and the operator interface is a WinCC based Human Machine Interface, herein referred to HMI

2.4.3Output modules

There are two types of input modules

1. Digital outputs

2. Analog outputs

Digital outputs

These convert the internal signal level of the programmable controller into the binary

signal level required externally by the process.

Digital outputs devices

Relays

Page 16: automatic mixing & filling bottle using PLC

[email protected]

Contractor

Values

Led

Solenoid value

Coilers

Analog outputs

Analog outputs cards converts’ digital values in the PLC to converts continuous

signals via a digital to analog converts.

Analog outputs devices

Flow control values

Pressure control values

Drive inputs

Values

Analog ports

2.4.4 Program memory

In program memory is classified into three types

I. System memory

II. Load memory

III. Work memory

System memory

In system memory contain all hardware configuration details

Load memory

Each CPU has an internal load memory. The size of this internal load memory depends on the

CPU used.

Page 17: automatic mixing & filling bottle using PLC

[email protected]

This internal load memory can be replaced by using external memory cards. If there is no

memory card inserted, the CPU uses the internal load memory; if a memory card is inserted,

the CPU uses the memory card as load memory.

The size of the usable external load memory cannot, however, be greater than the internal

load memory even if the inserted SD card has more free space.

Work memory

Work memory is a non-retentive memory area for storing elements of the user program that

are relevant for program execution. The user program is executed exclusively in work

memory and system memory.

It divided into two

I. Run mode

II. Stop mode

Is the working area of the PLC consisting of data regarding the status of input

and output, mathematics, calculations, timer and counter values etc?

2.4.5 Power supply

Here the power supply is separately mention because for plc to power up it requires only 24v dc

so, to convert 230v ac to 24vdc one converter is used called SMPS(switch mode power supply )

2.5 PLC memory organization:

Memory can be categorized into voltaic and non volatile and non volatile memory. Volatile

memory will lose its stored information if all operating power is lost (or) removed. Volatile

memory is easily altered and quite suitable for most applications when supported by battery

backup. Non volatile memory can retain stored information when power is removed accidentally

Page 18: automatic mixing & filling bottle using PLC

[email protected]

or intentionally. Plc makes use of many different types of volatile and non volatile memory

devices.

Common memory types description:

1. RAM: Random access memory (RAM) is designed so that information can be

written into (or) read from the memory today’s controllers use the CMOS-RAM

with battery support for user program memory. RAM provides an excellent means

for easily creating and altering a problem.

2. ROM: Read- only memory (ROM) is designed so that information stored in

memory can be read and cannot be changed under ordinary circumstances.

3. EPROM: Erasable programmed read only memory (EPROM) is designed so that

it can be reprogrammed after being entirely erased with the use of an ultraviolet

light source.

4. EEPROM: Electrically erasable programmed read- only memory. (EEPROM) is

a non volatile memory that offers the same programmed flexibility as does RAM.

It provides permanent storage of the program but can be easily changed using

standard programming devices.

2.6 Basic PLC architecture

CPU

Power supply

Memory

Input blocks

Output blocks

Communication

Expansion connections

2.7 Siemens Characteristics:

2.7.1 SIMATIC S7-1200

Page 19: automatic mixing & filling bottle using PLC

[email protected]

In the field of automation, powerful components are a key factor to success. But what really

gives us a unique advantage, is all of them working together. The new modular SIMATIC S7-1200

controller provides simple but highly precise Automation tasks.

The SIMATIC S7-1200 controller is modular and compact, versatile, a secure investment, and

is powerfully fit for a full range of applications. It features an integrated PROFINET interface,

powerful integrated technology functions and a highly scalable and flexible design, a communication

interface that fulfills the highest standards of industrial communication and a full range of powerful

integrated technology functions make this controller an integral part of a complete and comprehensive

automation solution.

2.7.2 Scalable and flexible design:

The SIMATIC S7-1200 controller family was designed with maximum flexibility to fit any

individual machine requirements. This allows us to custom design our controller system to meet the

requirements; it also makes future system expansions quick and easy.

2.7.3 Industrial communication:

The SIMATIC S7-1200‘s integrated PROFINET interface provides seamless communication

with the SIMATIC STEP 7 Basic engineering system for programming, with SIMATIC HMI Basic

Panels for visualization, with additional controllers for PLC-to-PLC communication and with third-

party devices for advanced integration options.

2.7.4 Integrated technology:

The name SIMATIC has been a reliable symbol in the field of automation for many years.

They have integrated proven and innovative technology functions into the new controller – ranging

from counting and measuring, speed, position and duty cycle control to simple process control

functionality. This wide variety of functionality guarantees the ability to solve a wide array of

applications based on technology that has proven its validity in the field for many years. Up to 3

communication modules can be added to any of the SIMATIC S7-1200 CPUs. The RS485 and RS232

communication modules provide the connection for performing point-to-point serial communication.

Page 20: automatic mixing & filling bottle using PLC

[email protected]

2.7.5 High-speed inputs & outputs:

The new SIMATIC S7-1200 controller comes with 6 high-speed counters. Three inputs at 30

kHz are integrated for counting and measuring. Two high-speed pulse train outputs at 100 kHz are

integrated for controlling the speed and position of a stepper motor or a servo drive. They can

alternatively be used as pulse-width-modulated outputs for controlling the speed of a motor, position.

2.7.6 Memory:

Up to 50 KB of integrated work memory is provided with a floating boundary between the user

program and user data. Up to 2 MB of integrated load memory and 2 KB of integrated retentive

memory are also provided. The optional SIMATIC Memory Card provides an easy way to transfer

programs to multiple CPUs. This card can also be used for storing miscellaneous files or to update the

firmware of the controller system.

2 .7.7 Signal modules:

Up to eight signal modules can be connected to the largest CPUs for the support of additional

digital and analog I/O’s. With the addition of a signal board, you can increase the number of digital or

analog I/O’s on the controller to custom-fit your needs without increasing the controller‘s footprint.

The SIMATIC S7-1200 system comes in three different models, CPU 1211C, CPU 1212C and CPU

1214C, that may each be expanded to exactly fit your machine requirements. One signal board can be

added inside the front of any CPU to easily expand the digital or analog I/O’s without affecting the

physical size of the controller. Signal modules can be connected to the right side of the CPU to further

expand the digital or analog I/O capacity. CPU 1212C accepts two and CPU 1214C accepts eight

signal Modules. CPU 1214C has a width measuring only 110 mm and both the CPU 1212C and CPU

1211C are only 90 mm wide. Together with the small footprint of the communication modules and

signal modules, this modular and compact system saves valuable space and offers you the highest

level efficiency and flexibility during the installation process.

High-speed outputs for speed, position or duty cycle control, two high-speed outputs are integrated

into the SIMATIC S7-1200 controller for use as either pulse train outputs or pulse-width-modulated

outputs. When configured as a PTO, a 50 percent duty cycle pulse train is provided at a rate of up to

Page 21: automatic mixing & filling bottle using PLC

[email protected]

100 kHz for the open-loop speed and position control of stepper motors and servo drives. Feedback for

the pulse train outputs is provided internally using two of the high-speed counters. When configured as

a PWM output, a fixed cycle time output with a variable duty cycle is provided for controlling the

speed of a motor, position of a valve, or duty cycle of a heating element.

2.8. INTERFACING OF PLC WITH PC

A PLC user program can also be created using a personal or industrial to develop the user

ladder program, a PLC ladder development software package is used. The primary difference

between a personal computer and an industrial computer is that the industrial computer has been

hardened to withstand the factory environment.

When the entire user ladder program has been developed, entered and verified for correctness, the

next step is to download the program into the processor’s memory. Transferring the PLC program

from a personal computer’s memory to PLC memory is called downloading the program.

Before downloading a user program, the processor must be in program mode. After downloading

the program, if all input and output signals are wired to the correct screw terminals, the processor

can be put in run mode. In run mode, the program will continuously run and solve the

programmed instructions. Solving the programmed instructions are called solving the logic. This

continual running of the program in a PLC is called scanning. As part of the processor’s problem

solving routine, the PLC will look at the incoming signals; follow the preprogrammed output field

devices

2.8.1 Communication

PLCs have built in communications ports, usually 9-pin RS-232, but optionally EIA-

485 or Ethernet. Modbus, BACnet or DF1 is usually included as one of the communications

protocols. Other options include various fieldbuses such as Device Net or Profibus. Other

communications protocols that may be used are listed in the List of automation protocols.

Most modern PLCs can communicate over a network to some other system, such as a

computer running a SCADA (Supervisory Control And Data Acquisition) system or web browser.

Page 22: automatic mixing & filling bottle using PLC

[email protected]

PLCs used in larger I/O systems may have peer-to-peer (P2P) communication between

processors. This allows separate parts of a complex process to have individual control while

allowing the subsystems to co-ordinate over the communication link. These communication links

are also often used for HMI devices such as keypads or PC-type workstations.

Formerly, some manufacturers offered dedicated communication modules as an add-on

function where the processor had no network connection built-in.

2.8.2 Limitations of Ethernet

There are practical limits to

the size of our Ethernet network. A

primary concern is the length of the

shared cable. Electrical signals

propagate along a cable very quickly,

but they weaken as they travel, and

electrical interference from neighboring devices (fluorescent lights, for example) can scramble the

signal. A network cable must be short enough that devices at opposite ends can receive each

other's signals clearly and with minimal delay. This places a distance limitation on the maximum

separation between two devices on an Ethernet network. Additionally, since in CSMA/CD only a

single device can transmit at a given time, there are practical limits to the number of devices that

can coexist in a single network. Ethernet networks face congestion problems as they increased in

size. If a large number of stations connected to the same segment and each generated a sizable

amount of traffic, many stations may attempt to transmit whenever there was an opportunity.

Under these circumstances, collisions would become more frequent and could begin to choke out

Fig 2.2 Ethernet

Page 23: automatic mixing & filling bottle using PLC

[email protected]

successful transmissions, which could take inordinately large amounts of time to complete. One

way to reduce congestion would be to split a single segment into multiple segments, thus creating

multiple collision domains. This solution creates a different problem, as now these now separate

segments are not able to share information with each other. To alleviate these problems, Ethernet

networks implemented bridges. Bridges connect two or more network segments, increasing the

network diameter as a repeater does, but bridges also help regulate traffic. They can send and

receive transmissions just like any other node, but they do not function the same as a normal node.

The bridge does not originate any traffic of its own; like a repeater, it only echoes what it hears

from other stations.

Chapter 3

PLC PROGRAMMING WITH INSTRUCTIONS

3.1 Introduction

Page 24: automatic mixing & filling bottle using PLC

[email protected]

The programming language allows the user to communicate with programmable controller

(PC) via a programming device. PC manufactures use several different programming languages

but they all convey to the system, by means of instruction a basic control plan.

The four must common types of languages encountered in programmable controller system design

are:

I. Ladder diagram,

II. Boolean mnemonics,

III. Function blocks and

IV. The sequential function chart.

These languages can be grouped into two major categories the first two ladder and

Boolean basic p c languages while function charting are considered high –level languages. The

basic programmable controller languages consist of a set of instructions that will perform the most

primitive type of control functions. the functions are relay replacement, timing, counting and

ON/OFF control. High level languages are used for analog control. Data manipulation, repeating

and other function that is not possible with the basic instruction sets. The languages used in a pc

actually dictate the range of applications in which the controller can be applied. Depending on the

size and capabilities of the controller on or more languages may be used typical combination of

languages are:

a) Ladder diagrams only

b) Boolean only

c) Ladder diagrams and functional blocks

d) Ladder and sequential function chart

e) Ladder function blocks, sequential function chart

3.2 Ladder language:

The ladder language is a symbolic instruction set that is used to create a programmable controller

program. It is composed of six categories of instruction that include relay-type, timer/counter, data

manipulation, arithmetic, data transfer, and program control. The ladder instruction symbols can

be formatted to obtain control logic that is to entered into memory.

Page 25: automatic mixing & filling bottle using PLC

[email protected]

The main function of the ladder diagram program is to control outputs based on the input

condition. This control is accomplished through the use of what is referred to as a ladder rung.

In general, a rung consists of a set of input conditions represented by relay contact type instruction

and an output Instruction at end of the rung represented by the coil symbol. Throughout the

section the contact instruction for a rung may be referred to as input conditions rung conditions, or

control logic

Coils and contacts are the basic symbols of the ladder diagram instruction set. The contact symbol

programmed in a given rung represents conditions to be evaluated in order to determine the

control of the output all

The format of the rung contacts is dependent on the desired control logic. Contacts may be placed

in any configuration such as series parallel or series parallel that is required to control a given

output for an output to be activated or energized at least one left-to –right path of contacts must be

closed. A complete closed path is referred to as having logic continuity. When logic continuity

exists in at least one path, it is said that the rang condition is TRUE. The rung condition is

FALSE. If no path has continuity.

In the early year, the standard ladder instruction set was limited to performing only relay

equivalent functions, using the basic relay-type contact and coil symbols similar to those

illustrates in

A need for greater flexibility coupled with developments in technology, led to extended ladder

diagram instructions that perform data manipulation, arithmetic and program flow control.

3.3 Bit logics

3.3.1 Normally open

Symbol ---| |---

Description

The activation of the normally open contact depends on the signal state of the associated

operand. If the operand has signal state "1," the normally open contact is closed. Power flows

Page 26: automatic mixing & filling bottle using PLC

[email protected]

from the left power rail through the normally open contact into the right power rail and the

signal state at the output of the operation is set to "1".

If the operand has signal state "0," the normally open contact is not activated. The power flow

to the right power rail is interrupted and the signal state at the output of the operation is reset to

"0".

Two or more normally open contacts are linked bit-by-bit by AND when connected in

series. With a serial connection, power flows when all contacts are closed.

The normally open contacts are linked by OR when connected in parallel. With a parallel

connection, power flows when one contact is closed.

Placement

The "Normally open contact" operation can be placed at any position in the network

3.3.2 Normally close

Symbol —| / |—

Description

The activation of the normally closed contact depends on the signal state of the associated

operand. When the operand has signal state "1," the contact "opens" and the power flow to the right

power rail is interrupted. The output of the operation in this case has signal state "0".

If the operand has signal state "0," the normally closed contact is "closed". Power flows through the

normally closed contact into the right power rail and the output of the operation is set to signal state

"1".

Two or more normally closed contacts are linked bit-by-bit by AND when connected in series.

With a serial connection, power flows when all contacts are closed.

The normally closed contacts are linked by OR when connected in parallel. With a parallel

connection, power flows when one contact is closed.

Placement

The operation can be placed at any position in the network.

3.3.3 Output coil

Symbol --- ( ) ---

Page 27: automatic mixing & filling bottle using PLC

[email protected]

Description

You can use the "Output coil" operation to set the bit of a specified operand. When the

result of logic operation (RLO) at the input of the coil is "1," the specified operand is set to

signal state "1". When the signal state is "0" at the input of the coil, the bit of the specified

operand is reset to "0".

The operation does not influence the RLO. The RLO at the input of the coil is sent

immediately to the output.

Placement

The "Output coil" operation can be placed at any position in the network. Using branches,

several coils can be placed within each other

3.3.4 NOT operation

Symbol ---| NOT |---

Description

You can use the "Invert result of logic operation" operation to invert the signal state of the result of

logic operation (RLO). When the signal state is "1" at the input of the operation, the output of the

operation provides the signal state "0". When the signal state is "0" at the input of the operation, the

output of the operation provides the signal state "1".

Placement

The "Invert result of logic operation" operation can be placed at any position in the network

3.4 TIMERS

Timers are used to ON&OFF the output with same delay. Timers occupy one word

of memory. By using timers the time delay will be 0milli seconds to 9990 seconds.

Page 28: automatic mixing & filling bottle using PLC

[email protected]

Types of timers:

1. ON delay timer

2. OFF delay timer

3. Pulse extent timer

Parameters of the timers

TV = timer interval

R= reset

S=set

Q= output

BI=balancing interval

BCD= blocking interval but it is in BCD form.

3.4.1 TP: Pulse generation timer

Symbol

Description

You can use the "Generate pulse" operation to set the Q output for a pre-programmed period of

time. The operation is started when the result of logic operation (RLO) at the IN input changes

from "0" to "1". When the operation is started, the time programmed for PT starts running.

Output Q is set for the period of time, PT, regardless of the subsequent course of the input

signal. Even when a new positive edge is detected, the signal state at the Q output is not

affected as long as PT is running.

It is possible to query how long the current timer function has been running at output ET. This

time starts at T#0s and ends when the value set for the PT timer is reached. The value at the ET

output can be queried as long as the PT timer is running and the input IN has signal state "1".

Page 29: automatic mixing & filling bottle using PLC

[email protected]

'When inserting the "Generate pulse" operation, an instance data block is created in which the

operation data is saved.

Placement

The "Generate pulse" operation requires a preceding logic operation for

the edge evaluation. It can placed within or at the end of the network.

Pulse diagram

3.4.2 TON: On delay timer

Symbol

Page 30: automatic mixing & filling bottle using PLC

[email protected]

Description

You can use the "On delay" operation to delay a rising edge by the time set at PT. The "On delay"

operation is executed when the result of logic operation (RLO) changes from "0" to "1" at input

IN (rising edge). When the operation is started, the time set for PT starts running. When the PT

time expires, output Q has signal state "1". Output Q remains set as long as the start input is still

"1". If there is a signal change at the start input from "1" to "0", output Q is reset. The timer

function is started again when a new positive edge is detected at the start input.

The ET output supplies the time that has elapsed since the last rising edge at the IN input. This

time starts at T#0s and ends when the value set for the PT timer is reached. The elapsed time can

be queried at output ET as long as input IN has signal state "1".

'When inserting the "On delay" operation, an instance data block is created in which the operation

data is saved.

Placement

The "On delay" operation requires a preceding logic operation for the edge evaluation. It can place

within or at the end of the network.

Pulse diagram

Page 31: automatic mixing & filling bottle using PLC

[email protected]

3.4.2 TOF: Off delay

Symbol

Description

You can use the "Off delay" operation to delay a falling edge by the time set at

PT. The Q output is set when the result of logic operation (RLO) at input IN changes from "0" to

"1". When the signal state at the IN input switches back to "0", the time set at PT starts. Output Q

remains set as long the time set at PT is running. The Q output is reset when the PT time expires.

If the signal state at the IN input changes to "1" before the time set at PT time expires, the timer is

reset. The signal state at the Q output will continue to be "1".

It is possible to query how long the current timer function has been running at output ET. This

time starts at T#0s and ends when the value set for the PT timer is reached. When the time set at

PT expires, output ET remains set to the current value until input IN changes back to "1". If the IN

input switches to "1" before the PT time has expired, the ET output is reset to the value T#0.

'When inserting the "OFF delay" operation, an instance data block is created in which the

operation data is saved.

Page 32: automatic mixing & filling bottle using PLC

[email protected]

Placement

The "Off delay" operation requires a preceding logic operation for the edge evaluation. It can

placed within or at the end of the network.

Pulse diagram

Chapter 4

4.1 Relay

Page 33: automatic mixing & filling bottle using PLC

[email protected]

A relay is an electrically operated switch. Many relay use an electromagnet to

operate a switching mechanism mechanically, but other operating principle are also used

relays are used where it is necessary to control a circuit by a low-power signal (with

complete electrical isolation between control and controlled and circuit), or where several

circuits must be controlled by on signal.

FIG 4.1 RELAY TERNMINALS

The relay's switch connections are usually labeled COM, NC and NO:

COM = Common, always connect to this; it is the moving part of the switch.

NC = Normally Closed, COM is connected to this when the relay coil is off.

NO = Normally Open, COM is connected to this when the relay coil is on.

o Connect to COM and NO if you want the switched circuit to be on when the relay coil is

on.

Connect to COM and NC if you want the switched circuit to be on when the relay coil is

off.

4.2 Advantages of relays:

Relays can switch AC and DC, transistors can only switch DC.

Relays can switch high voltages, transistors cannot.

Relays are a better choice for switching large currents (> 5A).

Relays can switch many contacts at once.

FIG 4.2 RELAY

Page 34: automatic mixing & filling bottle using PLC

[email protected]

4.3 Disadvantages of relays:

Relays are bulkier than transistors for switching small currents.

Relays cannot switch rapidly (except reed relays), transistors can switch many times per

second.

Relays use more power due to the current flowing through their coil.

Relays require more current than many chips can provide, so a low power transistor

may be needed to switch the current for the relay's coil.

4.4 Specification of relay

Contact rating

Contact ratings 1A,1C

Contact material AgCdO

Contact resistance 100MΩ(1A 6VDC)

Contact capacity 5A 250VAC, 5A 30VDC

Specification

Insulation resistance 100M O .500VDC

Page 35: automatic mixing & filling bottle using PLC

[email protected]

Dielectric strength BCC 1500V 1min

BOC 750v 1min

Operate time 10ms/5ms

Terminal type PCB

Coil rating

Normal coil power 0.36W/0.45W

Page 36: automatic mixing & filling bottle using PLC

[email protected]

Chapter 5

5.1 Solenoid valve

A solenoid valve is an electromechanical device used for controlling liquid or gas flow.

The solenoid valve is controlled by electrical current, which is run through a coil. When the coil is

energized, a magnetic field is created, causing a plunger inside the coil to move. Depending on the

design of the valve, the plunger will either open or close the valve. When electrical current is

removed from the coil, the valve will return to its de-energized state.

In direct-acting solenoid valves, the plunger directly opens and closes an orifice inside the

valve. In pilot-operated valves (also called the servo-type), the plunger opens and closes a pilot

orifice. The inlet line pressure, which is led through the pilot orifice, opens and closes the valve

seal.

The most common solenoid valve has two ports: an inlet port and an outlet port. Advanced

design may have three or more ports. Some designs utilize a manifold-type design.

Solenoid valves make automation of fluid and gas control possible. Modern solenoid

valves offer fast operation, high reliability, long service life, and compact design.

FIG 5.1 SOLENOID VALVE

Page 37: automatic mixing & filling bottle using PLC

[email protected]

5.2 Different parts of a solenoid valve

The illustration below depicts the basic components of a solenoid valve. The valve shown in the

picture is a normally-closed, direct-acting valve. This type of solenoid valve has the most simple

and easy to understand principle of operation.

1. Valve Body

2. Inlet port

3. Outlet port

4. Coil/solenoid

5. Coil windings

6. Lead wire

7. Plunger

8. Spring

9. orifice

5.3 How does a solenoid valve work?

The media controlled by the solenoid valve enters the valve through the inlet (Part 2 in the

illustration above). The media must flow through the orifice (9) before continuing into the outlet

port (3). The orifice is closed and opened by the plunger (7).

The valve pictured above is a normally-closed solenoid valve. Normally-closed valves use

a spring (8) which presses the plunger tip against the opening of the orifice. The sealing material

at the tip of the plunger keeps the media from entering the orifice, until the plunger is lifted up by

an electromagnetic field created by the coil.

FIG 5.2 SOLENOID VALVE PARTS

Page 38: automatic mixing & filling bottle using PLC

[email protected]

5.4 SPECFICTIONS OF SOLENOID VALVE

Model no: HT-SV-24

Supply power: 24v

Pressure: 0 ~0.7pa

Page 39: automatic mixing & filling bottle using PLC

[email protected]

Chapter 6

6.1 Submersible pump

In either centrifugal or positive displacement pumps the materials used in the wet portions

of the pumps are critical to their safe use. Whatever materials are used for these wetted parts, they

should not contaminate the fluids being pumped nor should the fluids being pumped degrade the

materials used in the pump. For the record, stainless steel will eventually corrode in saltwater and

should be avoided when possible, titanium is OK but expensive and brittle. Most wetted parts of

the pumps we use are plastic or other non-metallic materials, such as ceramics, that are safe for

saltwater. If you are pumping liquids other than saltwater (as in the case of trace element

replacement systems) make sure that the fluids you are pumping are safe with the materials used

in the pump (outfits such as Cole-Palmer and other chemical equipment houses normally provide

tables that indicate what materials are safe together).

As most centrifugal pumps operate via electric motors, you also need some means of

isolating the motor from the wetted portions of the pump to prevent the pump fluids from

eventually damaging the motor, while at the same time rotating the impeller in order for the pump

to work. This connection between motor and wetted portions of the pumps used in aquariums is

most often accomplished by magnetically coupling the impeller

shaft to a rotating magnet attached to the motor. The impeller

shaft has a second magnet attached to it (normally coated to

prevent contaminating the fluid being pumped) that is attracted

to the rotating motor magnet. By relying on magnetic attraction

of the two magnet assemblies it is not necessary to have direct

physical contact between the impeller and motor; thus, the two

can be sealed from each other

FIG 6.1 Submersible pumps

Page 40: automatic mixing & filling bottle using PLC

[email protected]

In some centrifugal pumps even the motor portion of the pump is completely sealed,

allowing the whole pump to be submersed in the fluid being pumped (power heads being the most

common example of this). These "submersible" pumps offer some advantages over their non-

submersible counter parts as well as introduce some shortcomings. In an upcoming part of this

series on water pumps, we will discuss the installation of pumps in more detail, but it should be

fairly obvious that a pump that can be fully submersed is much easier to install. A second

advantage is based on the fact that water is a better heat conductor than air (i.e., draws heat away

from the pump at a faster rate), so a submersible pump can be made smaller than an equally

performing non-submersible pump since heat buildup is not a factor in their design. This greater

heat transferring property of water also leads to one of submersible pumps potential disadvantages

- more heating of the systems water.

FIG 6.2 Internal view of submersible motor

Most aquarium systems are fairly easy to heat by use of relatively inexpensive electric

heaters. Cooling a tank, on the other hand, is often much more difficult and may require the use of

expensive chillers. It is, therefore, highly desirable to control the amount of unintended heating a

tank receives. A submersible pump of a given performance will heat a tank more than its non-

submersible counterpart. Almost all of a submersible's heat is transferred to the tank; whereas a

significant portion of a non-submersible's heat is transferred to the air.

Page 41: automatic mixing & filling bottle using PLC

[email protected]

The second possible problem with submersible pumps is the greater danger of electrical shorting

to the tank. Most submersible pumps are designed to prevent water from reaching any of the

electrical parts, but wear and/or damage to the pump may expose some of these electrical

connections, causing dangerous shorts. It is highly recommended that one use GFI (Ground Fault

Interrupters) outlets/breakers when using any electrical equipment around water such as pumps,

but especially submersible pumps. These GFI devices will detect when electrical shorts occur and

immediately shut off the offending pump or piece of equipment, thus reducing the danger to both

you and your tank. These two limitations of submersible pumps, namely greater heat transfer and

danger of electrical shorting, are likely why you do not often see larger capacity submersible

pumps (another potential disadvantage depending on your application requirements).

Page 42: automatic mixing & filling bottle using PLC

[email protected]

Chapter 7

7.1 Conveyor system

A conveyor belt is the carrying medium of a belt conveyor system (often shortened to belt

conveyor). A belt conveyor system is one of many types of conveyor systems. A belt conveyor

system consists of two or more pulleys (sometimes referred to as drums), with an endless loop of

carrying medium—the conveyor belt—that rotates about them. One or both of the pulleys are

powered, moving the belt and the material on the belt forward. The powered pulley is called the

drive pulley while the unpowered pulley is called the idler pulley. There are two main industrial

classes of belt conveyors; Those in general material handling such as those moving boxes along

inside a factory and bulk material handling such as those used to transport large volumes of

resources and agricultural materials, such as grain, salt, coal, ore, sand, overburden and more.

Today there are different types of conveyor belts that have been created for conveying different

kinds of material available in PVC and rubber materials.

FIG 7.1 VIEW OF CONVEYOR BELT

Page 43: automatic mixing & filling bottle using PLC

[email protected]

FIG7.2 CONVEYOUR SYSTEM

The belt consists of one or more layers of material. Many belts in general material handling have

two layers. An under layer of material to provide linear strength and shape called a carcass and an

over layer called the cover. The carcass is often a woven fabric having a warp & weft. The most

common carcass materials are polyester, nylon and cotton. The cover is often various rubber or

plastic compounds specified by use of the belt. Covers can be made from more exotic materials

for unusual applications such as silicone for heat or gum rubber when traction is essential.

7.2 Motor used for conveyor system

Gear motor

FIG 7.3 GEAR MOTOR

Page 44: automatic mixing & filling bottle using PLC

[email protected]

Specifications motor

Supply voltage 12v

High torque

Page 45: automatic mixing & filling bottle using PLC

[email protected]

CHAPTER 8

8.1 Photoelectric Sensor

A photoelectric sensor is another type of position sensing device. Photoelectric sensors use a

modulated light beam that is either broken or reflected by the target. The control consists of an

emitter (light source), a receiver to detect the emitted light, and associated electronics that

Evaluate and amplify the detected signal causing the photo electric’s output switch to change

state.

8.2 Advantages

Senses all Kinds of Material s

Long Life

Longest Sensing Range

Very Fast Response Time

8.3 Disadvantages

Lens Subject to Contamination

Sensing Range Affected by Colour and Reflectivity of Target

8.4 Applications

Packaging

Material Handling

Parts Detection

FIG 8.1 Photo of sensor

Page 46: automatic mixing & filling bottle using PLC

[email protected]

8.5 Wiring of sensor

This sensor is PNP type, it has three wires first wire vcc is connected to the DC 24v, and

Enable wire is output of the sensor, it is connected to the input of PLC and the third wire is

ground.

FIG 8.2 Wiring connection of Sensor to PLC

Page 47: automatic mixing & filling bottle using PLC

[email protected]

Chapter 9

9.1 Wiring of the project

FIG 9.1 WIRING OF COMPONENTS WITH PLC KIT

Input addressing

I0.0- Main switch

I0.1- Starting switch

I0.2- Photo electric sensor

NOTE: - Reaming are in use

Output addressing

Q0.0- water motor

Q0.1-flavour motor

Q0.2- mixing motor

Q0.3- solenoid valve

Q0.4-conveyor motor

Page 48: automatic mixing & filling bottle using PLC

[email protected]

Q0.5 – is not used

9.2CONNECTIONS OF SINGLE PHASE AC MOTOR WITH PLC

The output power of the plc is just 24V DC but we have to operate AC motor which requires

230V AC, in order to supply it, we are using the relays. It operates at 24V DC, the common of the

relay is connected to phase of supply and motor is connected to NO in series with neutral.

When relay is energized then only motor runs.

FIG 9.2 RELAY CONNECTIONS WITH AC MOTOR

Page 49: automatic mixing & filling bottle using PLC

[email protected]

9.3 Ladder diagram for automatic mixing &filling bottle

Page 50: automatic mixing & filling bottle using PLC

[email protected]

The program was created and damped in the plc module as per our requirement. In

our program, first main switch is ON and then starting switch is ON to start the

submersible motors. The program was designed to run water motor for 10seconds

and the flavor motor 7 seconds. When the flavor motor stops, the mixing motor

which is in the mixing and filling container, mixes the water and flavor for 10

seconds when the mixing motor stops and when the bottle is placed on the conveyor

and when the sensor senses the bottle the solenoid valve will be opened the bottle

below it will be filled for 15 seconds, then filled bottle will move forward on

conveyor system for 3seconds.

9.4 SPECIFICATIONS OF SIEMENS S7-1200 MODULE

No. Of inputs: - 08

External inputs: - 08

No of outputs: - 06

Input voltage of module: 230VOLTS

CPU: - 1212C

Software required: Totally integrated automation on portal v-10.5

FIG 9.3 PLC module

Page 51: automatic mixing & filling bottle using PLC

[email protected]

FIG 9.4 Indication of each part of the project

Page 52: automatic mixing & filling bottle using PLC

[email protected]

Chapter 10:

10.1 Conclusion

The project ‘Automatic mixing and filling bottle using plc” has been successfully

designed and executed.

Presence of every equipment has been reasoned out and placed carefully thus

contribution to the best working of the project.

Page 53: automatic mixing & filling bottle using PLC

[email protected]

Chapter 11

11.1BIBLIOGRAPHY

11.1.1 Web Sites:

www.elprocus.com

www.plc simulator.net

www.automation.com

www.plc.doc.net

www.plcgoods.com

www.mikroe.com

www.siemens.com

11.1.2 Books

Programmable logic controllers by JOHN W.WEBB

Siemens s7 1200 manual