0% found this document useful (0 votes)
35 views48 pages

Report GTTC (1) - Merged

Uploaded by

amuthad266
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views48 pages

Report GTTC (1) - Merged

Uploaded by

amuthad266
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 48

INTERNSHIP REPORT

ON PLC & IOT

An Internship Report Submitted to


Visvesvaraya Technological University, Belagavi,
in partial fulfillment of the requirements for the award of the degree of
BACHELOR OF ENGINEERING
IN
ELECTRICAL AND ELECTRONICS ENGINEERING
Submitted by
Name USN
SHASHANK R A 4VM22EE448

Under the Guidance of


Internal Guide External Guide
Mrs. Sowmya G Mrs. Yashaswini
Assistant Professor Trainer
Dept. of EEE GTTC
VVIET, Mysuru. Mysuru.

VIDYA VIKAS INSTITUTE OF ENGINEERING AND TECHNOLOGY


MYSURU – 570 028
2022-23

|
VIDYA VIKAS INSTITUTE OF ENGINEERING AND TECHNOLOGY
MYSURU – 570 028

AFFILIATED TO VISVESVARAYA TECHNONOLOGICAL UNIVERSITY


BELAGAVI

DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING


CERTIFICATE

Certified that Internship work entitled “PLC & IOT” is Bonafede work carried out by SHASHANK R A
(4VM22EE448), in the department of Electrical & Electronics Engineering from VIDYA VIKAS
INSTITUTE OF ENGINEERING AND TECHNOLOGY, MYSURU submitted in partial fulfilment
for the award of Bachelor of Engineering in Electrical and Electronics Engineering prescribed by the
Visveswaraya Technological University, Belagavi during the year 2022-23. It is certified that all
suggestions recommended for Internal Evaluation have been incorporated in the report deposited in the
departmental library. The internship report has been approved as it satisfies the academic requirements
with respect to Internship work prescribed for the said degree.

Signature of the guide Signature of the HOD Signature of the Principal Signature of the trainer
Mrs. Sowmya G Dr. Shamala N Dr. Manjunath T S Mrs. Yashaswini
Assistant Professor Professor & Head Assistant Professor Trainer
Dept of EEE of Dept of EEE Dept of EEE VVIET, Dept of
VVIET, Mysuru VVIET, Mysuru Mysuru GTTC, Mysuru

|
ACKNOWLEDGEMENT

The joy and satisfaction that the accompany successful completion of any task would be
incomplete without the mention of the people who made it possible.
I owe my gratitude to our beloved Chairman, Sri Vasu and Secretary, Sri Kaveesh Gowda V
for their encouragement and support in all our Endeavors.
I am thankful to Principal, Dr. Manjunatha T S for his constant encouragement in every needed
sphere.

I would like to express my deep indebtedness to Dr. Shamala N, Professor and Head,
Department of Electrical and Electronics Engineering for her valuable suggestions and
support throughout the course. I express my deep sense of gratitude to internal guide Mrs.
Sowmya G, Assistant professor, Vidya Vikas Institute of Engineering and Technology
Department of Electrical and Electronics Engineering for her inspirational and dedicated
guidance, valuable suggestions, sportive encouragement and much needed support in every
needed sphere. The environment of interactive study created by her helped me to learn better
and ask doubts, none of which went unanswered.
I express my deep sense of gratitude to external guide Mrs. Yashaswini, Government Tool
Room and Training Center, Mysuru, for her inspirational and dedicated guidance, valuable
suggestions, sportive encouragement and much needed support in every needed sphere. The
environment of interactive study created by her helped me to learn better and ask doubts, none
of which went unanswered.

I sincerely thank all the Faculties of my department for their valuable suggestions extended
throughout this work

SHASHANK R A [4VM22EE448]
|
Internship report on PLC & IoT

CHAPTER 1

INTRODUCTION
Control engineering has evolved over time. In the past humans were the main methods for
controlling a system. More recently electricity has been used for control and early electrical
control was based on relays. These relays allow power to be switched on and off without a
mechanical switch. It is common to use relays to make simple logical control decisions. The
development of low-cost computer has brought the most recent revolution, the Programmable
Logic Controller (PLC). The advent of the PLC began in the 1970s, and has become the most
common choice for manufacturing controls. PLCs have been gaining popularity on the factory
floor and will probably remain predominant for some time to come. Most of this is because of
the advantages they offer.

 Cost effective for controlling complex systems.


 Flexible and can be reapplied to control other systems quickly and easily.
 Computational abilities allow more sophisticated control.
 Trouble shooting aids make programming easier and reduce downtime.
 Reliable components make these like to operate for years before failure.

The Internet of Things (IoT) refers to the network of interconnected physical devices, vehicles,
appliances, and other objects embedded with sensors, software, and network connectivity.
These devices collect and exchange data, allowing them to communicate and interact with each
other. The goal of IoT is to enable these devices to collect and share information in real-time,
leading to smarter, more efficient, and autonomous decision-making.

Page | 1
Internship report on PLC & IoT

AUTOMATION
Automation involves the use of technology to perform tasks with minimal human intervention,
aiming to increase efficiency, accuracy, and productivity in various sectors. In industrial
settings, automation often employs programmable logic controllers (PLCs) and robotics to
carry out repetitive and complex tasks. This can include activities such as assembly line
manufacturing, where robots perform precise and repetitive actions, leading to higher
production rates and improved product consistency. Automation extends beyond
manufacturing and into areas like information technology, where automated scripts and
algorithms streamline routine tasks, such as software deployment, system monitoring, and data
analysis. The integration of sensors, actuators, and control systems enables automation to
respond to real-time information, adjusting processes dynamically and optimizing overall
performance.

The advent of artificial intelligence (AI) and machine learning further enhances automation
by allowing systems to learn from data, adapt to changing conditions, and make decisions
without explicit programming. While automation brings numerous benefits, such as increased
efficiency and reduced labour costs, it also presents challenges, including concerns about job
displacement, the need for cybersecurity measures, and the initial investment required for
implementation. As technology continues to advance, automation is likely to play an
increasingly pivotal role in reshaping industries, improving workflows, and driving
innovation.

History of Automation

Automation has a rich history, evolving from the early mechanization of the Industrial
Revolution to the sophisticated technologies of today. The introduction of assembly lines by
Henry Ford in 1913 revolutionized manufacturing, setting the stage for increased efficiency.
The development of Programmable Logic Controllers (PLCs) in the 1960s allowed for more
flexible and programmable control systems. Robotics emerged in the 1970s, transforming
industries with automated tasks. With advancements in microprocessors and information
technology, automation expanded beyond the physical realm, incorporating software
automation and real-time monitoring.

Page | 2
Internship report on PLC & IoT

COMPANY PROFILE

Fig 1.1: Company Front View

It’s precision that makes the world go round” A premier Tool Room and Training Centre
established in 1992 at Mysore, Karnataka, India with assistance of the Government of Denmark,
has extensive facilities in Tool making and training. Government tool and Training Centre
(GTTC) is a modern tool room and training center with state-of-art CAD/CAM equipment,
machinery and inspection facilities to meet the complex needs of discerning customers.
GTTC is committed to achieve customer satisfaction in quality and delivery of tool engineering
education, services and precision machining.
GTTC has acquired mastery in Tool Engineering and vast experience in conducting well
structured, practical oriented training programmers’ leading to post graduation, diplomas and
certificates.
Realizing the need to update and upgrade the skills of existing technical personnel in industry,
GTTC conducts a number of short-term programs in tool design, advanced manufacturing
techniques, design analysis and CNC programming for manufacture and other aspect of
manufacture.
The state-of-art sophisticated manufacturing facility consist of 3 to 5 axis high-speed CNC
machining centers, CNC jig grinding, CNC wire EDM, CNC co-ordinate measuring machine
and other supporting machineries and facilities.
The computer integrated manufacturing facility in DNC network and supported by high end
software’s such as I-DEAS, for design and manufacturing, Uni-Graphics, pro-E, Master-cam,
Page | 3
Internship report on PLC & IoT

Mechanical Desktop and Analysis package like C-Mold, Mold Flow and Pro-Cast.

The main objectives of Tool Room

 To conduct industry oriented technical program to youth with employable skills.

 To assist MSME units in technological upgradation by providing quality tooling.

 To provide highly skilled work force to industries of various sectors.

The main activities of GTTC

 Offering hands on experience in Long-term, Short-term and need based training programs.

 Design and manufacturing of press tools, Dies for sheet metals and plastics parts, jigs &
fixtures etc.

 The center conducting many courses which is approved by Government of Karnataka and
all India Council for Technical Education (AICTE), New Delhi.

It offers courses like Computer Aided Design (CAD), Mechatronics, Automation, Robotics,
CNC Turning, CNC Milling, Design & Validation, 3D printing
Today’s highly increasing competitiveness over the industry demands high quality and most
consistent products with a competitive price. To address this challenge number of industries
considering various new product designs and integrated manufacturing techniques in parallel
with the use of automated devices.
Automation takes a step further mechanization that uses a particular machinery mechanism
aided human operators for performing a task. Mechanization is the manual operation of a task
using powered machinery that depends on human decision making.

Page | 4
Internship report on PLC & IoT

CHAPTER 2

INTERNSHIP DESCRIPTION
A Programmable Logic Controller (PLC) serves as the brain of industrial automation, providing
a robust and flexible solution for controlling and monitoring complex processes. PLCs are
programmable devices that execute specific tasks based on user-defined logic. They have
evolved from traditional relay control systems, offering greater efficiency, reliability, and
adaptability in industrial environments. PLCs operate by continuously scanning input signals
from sensors and switches, executing programmed instructions, and then activating output
devices such as motors or valves to control various aspects of a manufacturing or processing
system.

One of the key features of PLCs is their ability to be easily programmed and reprogrammed.
Engineers use specialized programming languages like ladder logic to define the behavior of
the control system. This adaptability allows for quick adjustments to accommodate changes in
production requirements or to introduce new functionalities, making PLCs a versatile tool in
dynamic industrial settings.

PLCs find widespread application in industries such as manufacturing, energy, and chemical
processing. Their reliability, real-time operation, and modularity make them essential for tasks
ranging from simple logic operations to complex automation processes. As technology
advances, modern PLCs integrate with other technologies, including the Internet of Things
(IoT) and artificial intelligence, further enhancing their capabilities and expanding their role in
the evolving landscape of industrial automation.

Fig 2.1: General PLC Diagram

Page | 5
Internship report on PLC & IoT

Block diagram of PLC

The block diagram of a Programmable Logic Controller (PLC) provides a visual representation
of its fundamental components and their interactions within an industrial control system. At its
core lies the Central Processing Unit (CPU), the brain of the PLC, responsible for executing
programmed instructions. The CPU communicates with two primary modules: the Input
Module and the Output Module. The Input Module interfaces with various sensors and input
devices, converting physical signals, such as from switches or sensors, into digital data that the
PLC can interpret. This data is processed by the CPU according to the programmed logic stored
in the system's memory. Once processed, the CPU sends signals to the Output Module, which
interfaces with actuators and output devices, converting digital signals from the CPU into
physical actions, such as controlling motors, valves, or indicators.

The system's memory plays a crucial role in storing the user-defined program, system data, and
temporary variables. This memory includes both volatile (RAM) and non-volatile (ROM)
storage. The programming device serves as the interface for engineers and technicians to create,
edit, and upload the control program into the PLC. Additionally, the power supply ensures that
the entire PLC system receives the necessary electrical power for operation. Communication
ports facilitate connectivity, allowing the PLC to exchange data with external devices, such as
Human-Machine Interfaces (HMIs), Supervisory Control and Data Acquisition (SCADA)
systems, or other PLCs, enabling seamless integration and data exchange within the industrial
automation environment. The block diagram showcases the flow of information and signals
within the PLC, emphasizing its ability to receive input, process it based on programmed logic,
and generate appropriate output signals to control industrial processes and machinery.

Fig 2.2: Block diagram of PLC

Page | 6
Internship report on PLC & IoT

A Programmable Logic Controller (PLC) is composed of several key components, each playing
a specific role in the control and automation of industrial processes. Here are the main
components of a typical PLC:

1. Central Processing Unit (CPU):


The CPU is the core of the PLC, responsible for executing the control program. It interprets the
logic written by the user, processes input signals, and generates output signals based on the
programmed instructions. The CPU also manages communication with other devices.

2. Input Modules:
Input modules interface with external sensors, switches, and other devices to collect information
about the state of the process. These modules convert physical signals from the input devices
into digital signals that the PLC's CPU can process.

3. Output Modules:
Output modules connect to actuators, motors, valves, and other devices to control the industrial
process. They convert digital signals generated by the CPU into physical actions or outputs that
affect the controlled system.

4. Memory:
PLCs have two types of memory: RAM (Random Access Memory) and ROM (Read-Only
Memory). RAM is used for temporary storage of variables and data during program execution,
while ROM stores the user-defined control program and other fixed data.

5. Programming Device:
The programming device is used by engineers and technicians to create, edit, and download
control programs into the PLC. It can be a computer running specialized programming software,
a handheld programming device, or even a built-in programming interface on the PLC itself.

6. Power Supply:
The power supply provides the necessary electrical power for the entire PLC system. It ensures
that the CPU, input modules, and output modules receive the correct voltage for proper
operation.
Page | 7
Internship report on PLC & IoT

7. Communication Ports:
Communication ports allow the PLC to connect and exchange data with other devices, such as
Human-Machine Interface (HMI) panels, Supervisory Control and Data Acquisition (SCADA)
systems, or other PLCs. This facilitates data exchange and integration within the broader
automation system.

8. I/O Interface:
The Input/Output (I/O) interface manages the interaction between the input and output modules
and the rest of the PLC system. It ensures that data flows smoothly between the CPU and the
external devices.

9. Clock/Timer:
Some PLCs include an internal clock or timer that helps in scheduling and sequencing
operations within the control program.

These components work together to form a cohesive system that can monitor, control, and
automate various industrial processes. The flexibility and modularity of PLCs allow for
customization to suit specific applications and industries.

PLC Programming Language (PLC)

 Ladder Logic (LAD)

 Functional Block Diagram (FBD)

 Statement List (STL)

 Sequential List (SFC)

 S7- Graph

 Continuous Function Chart (CFC)

Simatic S7-1200 Memory card

 Load memory expansion

 Distribution of programs

Page | 8
Internship report on PLC & IoT

 Firmware update

 Documentation

 Memory card binding

 Unliked DBs

 Module exchange without PG


Fig 2.3: S7-1200 Memory Card

CPU Modes Run Mode


 The CPU scans the user program.

 Reading/uploading a program from CPU is possible.

 Changed program can be downloaded into the CPU

Stop Mode

 The CPU does not scan the user program.

 Reading/uploading a program from CPU is possible.

 Changed program can be downloaded into the CPU.

Page | 9
Internship report on PLC & IoT

Error modes
 designed to detect and manage abnormal conditions that may arise during its operation.
 These error modes serve as critical diagnostic tools
 When errors occur, the PLC enters a designated error-handling mode, providing
diagnostic information

Fig 2.4: Modes of CPU

Page | 10
Internship report on PLC & IoT

PROGRAMMING LANGUAGE USED IN A PLC

Ladder Logic is a graphical programming language commonly used in Programmable Logic


Controllers (PLCs) for designing and implementing control logic in industrial automation. The
name "Ladder Logic" comes from its visual representation, which resembles a ladder. The
language is designed to mimic relay logic diagrams used in traditional control systems, making
it familiar to individuals with a background in electrical systems.

Key elements of Ladder Logic:

1. Rungs:
Ladder Logic programs are organized into rungs, each resembling a horizontal step on a ladder.
Each rung represents a specific control function or operation.

2. Contacts and Coils:


Contacts and coils are the fundamental building blocks of Ladder Logic. Contacts represent
input conditions, such as sensors or switches, while coils represent output devices, like motors
or valves.

3. Logic Symbols:
Ladder Logic uses standard logic symbols such as AND gates, OR gates, and NOT gates to
create logical relationships between input conditions (contacts) and output actions (coils).

4. Power Rails:
The vertical sides of the ladder diagram represent the power rails. These rails typically
symbolize the positive and negative sides of the power supply, and they provide power to the
various components in the rungs.

5. Series and Parallel Connections:


Series and parallel connections are created by arranging contacts and coils on the rungs. Series
connections (represented horizontally) imply an AND relationship, and parallel connections
(represented vertically) imply an OR relationship.

Page | 11
Internship report on PLC & IoT

Example of a simple Ladder Logic rung:

Fig 2.5: ladder logic

Ladder Logic is known for its simplicity, clarity, and ease of understanding, making it a widely
used programming language in industrial automation. Engineers and technicians can quickly
interpret ladder diagrams, facilitating the design, maintenance, and troubleshooting of control
systems.

Addressing for input and output

For Input:-I:0.00.1

For Output: -O0:0.0/0,0:0.0/1

INPUT/OUTPUT DEVICES

INPUTS OUTPUTS
Switches Relays
Pushbuttons Lamps
Limit Switches Contactors
Proximity Sensors Alarm Hooters
Photo Sensors LED
Contactors Solenoid Valves
Condition Sensor Control Relays
Pressure Switches Counter
Level Switches Printer

Table 2.1: I/O Devices

Page | 12
Internship report on PLC & IoT

2.2.1 Hardware overview


1. PLC Processor (CPU)

At the heart of every PLC system is a processor. It is arguably the most crucial PLC hardware
component. Sometimes the PLC processor is also referred as the PLC controller or PLC CPU
(Central Processing Unit). Whatever you choose to call this piece of PLC hardware.

The PLC processor is the workhorse of the PLC system responsible for all the logic
computation and number crunching. The PLC processor can be embedded into the PLC unit or
come as a separate PLC module. Generally fixed PLC types have their processor embedded in
the PLC itself. While modular and distributed PLC types have their PLC processors as a
separate module.

The PLC processor contains 3 fundamental components:


 PLC CPU (Central Processing Unit)
 PLC Memory
 PLC Programming port

2. PLC Hardware Mounting Systems


The hardware mounting system of a PLC provides the means to physically connect the various
hardware components of the PLC system. PLC hardware mounting systems can vary from one
PLC manufacturer to another and can also vary depending on the type of PLC used.

The 3 main PLC mounting systems used in industrial automation projects are:
 Rack mounted PLC
 Rail mounted PLC
 Panel mounted PLC

3. PLC Power Supply


The main purpose of a PLC power supply is to convert the available power supply voltage into
a voltage that is usable by the PLC processor (CPU) and other PLC modules. The most common

Page | 13
Internship report on PLC & IoT

PLC power supply input voltages are 120VAC, 240VAC, AC voltage range (like 85-265VAC)
and 24VDC. While the most common PLC power supply outputs are 24DC and 5VDC.

There are 3 main types of PLC power supplies:


 Integrated PLC power supply
 PLC power supply module
 Remote PLC power supply

4. PLC Input and Output Hardware Interface


In an industrial PLC system the PLC input and output modules are a common interface between
the field devices and the PLC processor (CPU). The PLC inputs and outputs are generally
connected to the field devices via a terminal strip. Communication modules with fieldbus
protocols like Ethernet IP, Profinet etc. can also be used as a PLC input and output interface.
In a PC (Personal Computer) the input and output interface is the connection between the
peripheral devices and the PC. The keyboard and mouse are examples of input devices and the
USB port is an example of the input interface. The monitor is an example of an output device
and the monitor port is an example of the output interface.

In a PLC, the inputs are connected to PLC input devices like pushbuttons, limit switches,
proximity sensors, temperature transmitters, pressure transmitters, level transmitters, encoders
etc. And the PLC outputs are connected to PLC output devices such as relays, motor contactors,
VFDs (Variable Frequency Drives), solenoid valves, proportional vales, indication lights,
sirens etc.

Fig 2.6: PLC Inputs and Outputs

Page | 14
Internship report on PLC & IoT

Types of PLC Input and Outputs


The 2 main types of PLC input and output signals are analog and digital (discrete). Analog and
digital inputs both measure external field conditions and report it back to the PLC processor
(CPU). And analog and digital outputs both send command signals from the PLC processor
(CPU) in order to activate field devices. So what’s the difference?

The main difference between PLC analogue I/O and digital I/O are:
 Signal Format
 Signal Wiring
 Signal Processing
PLC Input and Output Hardware Connection
There are various PLC input and output connection methods. Some connection methods are
more tedious than others. In general connection of field devices to PLC inputs and outputs is a
labor intensive exercise, especially when there are large volumes of PLC I/O.

The most common PLC input and output hardware connection methods are:
 Hardwire connection with terminals
 Fieldbus network connection

5. PLC Communication Hardware Interface


PLCs can communicate to multiple devices by using a communication interface. The
communication interface has communication ports which allows cable connection to devices
such as other PLCs, remote I/O drops, fieldbus devices, touch screens, programming PCs and
servers. Multiple communication interfaces may be required for larger and more complex
applications.
The PLC communication interface can exist as either embedded communication ports on the
PLC processor or as communication modules. If there is a need for multiple communication
interfaces then it’s quite common to see both embedded communication ports on the PLC
processor and extra communication modules slotted into the rack.

PLC communication ports commonly use either a Serial based communication protocols or
Ethernet based communication protocols. Serial communication ports on a PLC usually use D-

Page | 15
Internship report on PLC & IoT

sub connectors or terminal connectors, while Ethernet communication ports usually use RJ45
connectors.

Fig 2.7: PLC hardware


PLC Communication Ports
Some popular Ethernet based protocols used for PLC communication include Ethernet IP,
Profinet, Ether cat, Modbus TCP/IP and BACnet IP. With Serial communication ports, some
of the common protocols are Device Net, Profibus DP, Modbus RTU, CAN open, BACnet
MS/TP, MPI, Direct Net, RS-485, RS-422 and RS-232.

PLC communication ports that have serial protocols are now considered “old school” by some.
However, they are readily available, generally cheaper and are still useful in certain
applications. However they are generally slower and cannot handle the same data bandwidth
as modern day industrial Ethernet based protocols.

6. PLC Programming Device


The last, but by no means the least, is the PLC programming device. Programmable Logic
Controllers need to be programmed somehow. There are 2 devices that can do it.

The two most common PLC programming devices are handheld programming devices and
personal computers (PC). Both are used to develop the PLC program (like ladder logic) and

Page | 16
Internship report on PLC & IoT

then transfer it into the PLC memory. The PLC programming devices connect to the PLC using
a cable and transfer the PLC program using either an Ethernet or Serial based communication
protocol.
Handheld programming devices are propose built to develop PLC program. But they have
limited programming memory, have a very basic display, simple keyboard input functions and
are slow and tedious to use. They are generally limited to programming small applications with
low numbers of I/O.

Page | 17
Internship report on PLC & IoT

CHAPTER 3

SKILLS LEARNT IN THE COMPANY

PROGRAMMING IN PLC:

PLC programs are typically written in a special application on a personal computer, then
downloaded by a direct-connection cable or over a network to the PLC. The program is stored
in the PLC either in battery-backed-up RAM or some other non-volatile flash memory. Often,
a single PLC can be programmed to replace thousands of relays.
Ladder Logic is a programming language that represents a program by a graphical diagram
based on the circuit diagrams of relay-based logic hardware. It is primarily used to develop
software for Programmable Logic Controllers (PLCs) used in industrial control applications.
The name is based on the observation that programs in this language resemble ladders, with
two vertical rails and a series of horizontal rungs between them. Ladder logic is widely used to
program PLCs, where sequential control of a process or manufacturing operation is required.
Ladder logic is useful for simple but critical control systems, or for reworking old hardwired
relay circuits. As programmable logic controllers became more sophisticated it has also been
used in very complex automation systems.

Fig 3.1: Simple Ladder Logic

If a path can be traced between the left side of the rung and the output, through asserted (true or
"closed") contacts, the rung is true and the output coil storage bit is asserted (1) or true. If no
path can be traced, then the output is false (0) and the "coil" by analogy to electromechanical
relays is considered "de- energized. Ladder logic has contacts that make-or-break circuits to
control coils. Each coil or contact corresponds to the status of a single bit in the programmable
controller's memory. Unlike electromechanical relays, a ladder program can refer any number
of times to the status of a single bit, equivalent to a relay with an indefinitely large number
of contacts.
Page | 18
Internship report on PLC & IoT

So-called “contacts” may refer to physical (Hard) inputs to the programmable controller from
physical devices such as pushbuttons and limit switches via an integrated or external input
module, or may represent the status of internal storage bits which may be generated elsewhere
in the Each rung of ladder.

COMMUNICATION OF PLC WITH PC

We will use S7-1200 PLC. The model that we will be using is 1215C direct current (DC). The
advantage of S7-1200 is the price and the integrated IO. As shown in the below figure this
PLC have 14 digital inputs (DI) and 10 digital outputs (DQ) and 2 analog inputs (AI) and 2
analog outputs (AQ). It has also high-speed counters (HSC) and pulse generators (PWM).

Fig 3.2: Siemens S7-1200 PLC

Fig 3.3: CPU DC/DC/DC 6ES7 214-1BG40-0XB0

Page | 19
Internship report on PLC & IoT

How to open TIA portal


Double click on TIA Portal and create a new device. Say configure a device and add new
device in that controller option select Simatic S7-1200 within that CPU select
(CPU1214ACDCRelay) and select 6ES72141BG400XBO double click on that and add. The
new device will be the PLC.

Fig 3.3: Create a new project and add S7-1200PLC Set IP Address

After Creating a new PLC, the first step is to set its IP address. To set the IP address, you need
to open the property dialog of the PLC. If you click on the PLC image you need to go to profinet
interface, Ethernet address. If you click on the Ethernet ports on the PLC image you can see
directly the entry Ethernet address.

Fig 3.4: Set IP Address

Page | 20
Internship report on PLC & IoT

Download Configuration

Click on save Project and Click on the icon for compile options to check for the errors and if
there is no error then download start search then save and stop all then click on load then finish.

Simple Program:

Let suppose we wire a lamp to the first digital output of the PLC. In the configuration of the
PLC, we give that output a name or a tag. The name can also be given in the PLC tags table.
The following animations illustrate how to create a tag and write a small program in order to
blink lamp.

Fig 3.6: Blink an output with a frequency of 1Hz

In this example we use the tag or variable clock 1Hz in order to turn on and off the lamp output,
with a frequency of 1Hz.

Plc instructions

There are various instructions which are useful for making ladder logic for PLC Programming.
These are as follows:

o XIC (Examine if closed)

Page | 21
Internship report on PLC & IoT

Use the XIC instruction in your ladder program to determine if a bit is ON. When the
Instruction executed, if the bit addressed is on (1), then the instruction is evaluated as true.
When the instruction is executed, if the bit addressed is off (0), then the instruction is evaluated
as false. XIC (Examine if closed):

Input Output
0 1
1 1
Examples of devices that turn on or off include:

 A push button wired to an input (addressed as I: 0/4).

 An output wired to a pilot light (addressed as O: 0/2).

 A timer controlling a light (addressed as T4:3/DN).

o XIO (Examine if open)

Use the XIO instruction in your ladder program to determine if a bit is OFF. When the
Instruction is executed, if the bit addressed is off (0), then the instruction is evaluated as true.
When the instruction is executed, if the bit addressed is on (1), thenthe instruction is evaluated
as false.
Examples of devices that turn on or off include:

 Motor overload normally closed (N.C.) wired to an input (I: 0/10).

 An output wired to a pilot light (addressed as O: 0/4).

Input Output
0 1
1 0

 A timer controlling a light (addressed as T4:3/DN)

Page | 22
Internship report on PLC & IoT

o Output Energize (OTE)

Use the OTE instruction in your ladder program to turn on a bit when rung conditions are
evaluated as true. An example of a device that turns on or off is an output wired to a pilot light.
(Addressed as O:0/4).

OTE instructions are reset when:

• The SLC enters or returns to the REM Run or REM Test mode or Power is restored.

• The OTE is programmed within an inactive or false Master Control Reset (MCR) zone.

Training example:
Q: Once the photoelectric sensor detects 10 products, the robotic arm will begin to pack up.
When the action is completed, the robotic arm and the counter will be reset.

Sol:

Number of PLC Inputs Required:-


X0 – Photoelectric sensor for counting products. X0 = ON when products are detected.
X1 – Robotic arm action completed sensor.
X1 = ON when packing is completed.

Page | 23
Internship report on PLC & IoT

Number of PLC Counter Required:-


C0 – Counter: 16-bit counting up (general purpose)

Number of PLC Outputs Required:-


Y0 – Robotic arm for packing

Plc ladder diagram for above question


Working:

 Once the photoelectric sensor detects a product, X0 will go from OFF to ON once, and
C0 will count for one time.
 When the present value in C0 reaches 10, the Normally Open contact C0 will be closed.
Y0 = ON, and the robotic arm will begin to pack.
 When the packing is completed, the robotic arm action completed sensor will be
enabled. X1 will go from OFF to ON and RST instruction will be executed. Y0 and C0
will be reset for the next packing task.

Timers and counters:

Timers are used to perform the timing operations. Time base is the minimum value of time in
Second that can be taken by the timer. Preset value is the total number of the seconds for which
the timing operation has to be done Accumulator starts increasing the time in seconds up to the
preset value. Up to the preset value of the accumulator the enable bit of timer is high & the
timer runs. When accumulator reaches the preset value thenthe timer stops and the done bit of
the timer becomes high.

Page | 24
Internship report on PLC & IoT

Types of Timers

 TP – Pulse Timer
 TON – On delay Timer

Pulse Timer - The first timer is called the pulse timer, because it is used to generate a pulse of
a specific length. It takes two inputs and has two outputs. So far, we have only seen function
blocks where the inputs and outputs where Boolean. This is still true for the IN and Q of the
TP block. Built is a little different with the PT and ET. They both take variables of the
datatype TIME.
PT stands for Preset Time and is an input to the block. This is where you put the time you want
to pulse at Q to be. As soon as the input IN is true, the output Q will be set for PT time. ET
stands for Elapsed Time. This is the time Q has been active.

Fig 3.7: Pulse Timer


TON – On delay Timer

The next type of timer is the On Delay Timer or just referred to as TON. But instead of
setting the time for the pulse, it is used to set a delay for the pulse. When the input is on the
timer will start counting. After the time PT has elapsed the output Q will be set. This is also
the reason for its name. It turns on the output after a delay.
The on-delay timer has the same input and output pins as the pulse timer. And again, it still
has the ET to see how much time has elapsed.

Page | 25
Internship report on PLC & IoT

Fig 3.8: TON Timer

TOF- OFF delay Timer

The functionality of the off-delay timer (TOF) is very similar to the TON. But with one big
difference. It turns off the output after a delay.
In the moment the input is set to true, the output will be set. As long as the input stays true the
output will stay on until the PT time has elapsed. After that time the output will be turned off.

Fig 3.9: TOF Timer

TONR-On delay with Reset Timer

The ON delay with Reset Timer (TONR) instruction counts time when the enabling input
is ON. When the current value (Txxx) is greater than or equal to the preset time (PT), the timer
bit is ON. The current value of the Retentive On-Delay timer is maintained when the input is
OFF.

COUNTERS

Counters are used to count the number of operations. Its function is same as the timer accepts
that the timer counts the number of seconds and the counter counts the number of operations or
pulses. At each operation the value of the accumulator increases and when the value of the
accumulator comes to the preset value ofthe counter then the counter stops.

Page | 26
Internship report on PLC & IoT

 CTU (Counter Up)

 CTD (Counter Down)

 CTUD (Counter Up and Down)

CTU (Count Up)

The CTU is an instruction that counts false-to-true rung transitions. Rung transitions can be
caused by events occurring in the program (from internal logic or by external field devices)
Such as parts traveling past a detector or actuating a limit switch. When rung conditions for a
CTU instruction have made a false-to-true transition The accumulated value is retained when
the rung conditions again become false. The accumulated count is retained until cleared bya
reset (RES) instruction that has the same address as the counter reset.

Fig 3.10: up counter

CTD (Count Down)

The CTD is an instruction that counts false-to-true rung transitions. Rung transitions can be
caused by events occurring in the program such as parts traveling past a detector or
actuating a limit switch.

Fig 3.11: down counter

When rung conditions for a CTD instruction have made a false-to-true transition, the
accumulated value is decremented by one count, provided that the rung containing the CTD

Page | 27
Internship report on PLC & IoT

instruction is evaluated between these transitions. The accumulated counts are retained when
the rung conditions again become false. The accumulated count is retained until cleared by a
reset (RES) instruction that has the same address as the counter reset.

CTUD (Counter Up and Down)

An up-down counter is a combination of an up-counter and a down-counter. It can count in


directions, increasing as well as decreasing. The up-down counter counts the value from zero to
the preset value or from the preset value to zero. In other words, this counter can be act as down
counter or up counter. CD input is used to get counter enable bool input. S input is used to get
the set input, once S input changes from 0 to 1, counter accumulator value changes to 999,
which is counter’s higher limit. PV is word input where you can give preset value with the
format of C#. R input is the reset Bool input’s output is used to get counter enable output. CV
and CV_BCD used to get the counter’s accumulator value in integer format and BCD format.
Up-down counter is known as ‘CTUD’.

Fig 3.12: up & down counter


MEMORY TYPES IN SIEMENS PLC
In general, the S7 PLC memory is composed of 4 parts

Fig 3.13: types of memory

Page | 28
Internship report on PLC & IoT

Load Memory

Stores any data downloaded from the PC to the PLC, this means that any PLC program
downloaded to the PLC is stored in the Load Memory. Integrated RAM in CPU, External
memory card are part of load memory (Hard disk is the best example).

There are two types of Load Memory

 Internal Load Memory.

 External Load Memory.

Working Memory

It’s part of memory where it can store the executive part of the PLC program, it looks like the
RAM in the Computer, and in this case, the load memory is the hard disk.
Running relevant code blocks and running relevant data blocks will present. When PLC
executes the instruction related codes, related values will store in work memory (PC RAM is
the best example).

System memory

It’s part of the memory where it can store the addressing part of the PLC program like Inputs,
Outputs, Timers, Counters, and Bit memory.
Retentive Memory

It’s part of the memory where it can store data permanently, for instance, if you want to keep the data in
specific bit memory stored permanently where in the case of electricity cut off this bit memory is not
impacted.

Different types of blocks

In the Siemens PLC programming software, these blocks are as follow:

 Organization Block (OB)

Page | 29
Internship report on PLC & IoT

 Function Block (FB)

 Function (FC)

 Data Block (DB)


Fig 3.14: siemens PLC programming block structure

 Organization Block

Data blocks are called by the OS cyclically and are the interface between the user program and
the OS. In this organization block, the PLC control unit is informed by means of block call
commands as to which program blocks it has to process.

 Function Block

For each call (instance), the function block needs an assigned memory area. When a function
block is called a data block for ex can be assigned to it as instance DB. The data in this instance
DB is then accessed by means of the variables of the FB. Different Memory areas have to be
assigned to an FB if it is called several times.

 Function (FCs)
Page | 30
Internship report on PLC & IoT

A function does not have an assigned memory area. The local data of a function is lost after the
function is processed. Users can create a part of the logic in the Function (FC) block of the PLC.
These are some common examples of Function (FC) like

a. Control Valve Open/Close

b. Mathematical Calculation or Conversion

c. Operation of a Particular Area of the entire plant, etc.

 Data Block (DC)

DBs are used to provide memory for the data variables. There are two types of data blocks:
global DBs where all OBs, FBs and FCs can read the stored data or themselves can write data
into the DB and instance DBs that are assigned to certain FB.

Page | 31
Internship report on PLC & IoT

CHAPTER 4
IoT (internet of things)

The internet of things, or IoT, is a network of interrelated devices that connect and exchange
data with other IoT devices and the cloud. IoT devices are typically embedded with technology
such as sensors and software and can include mechanical and digital machines and consumer
objects.

Increasingly, organizations in a variety of industries are using IoT to operate more efficiently,
deliver enhanced customer service, improve decision-making and increase the value of the
business.

With IoT, data is transferable over a network without requiring human-to-human or human-to-
computer interactions.

A thing in the internet of things can be a person with a heart monitor implant, a farm animal
with a biochip transponder, an automobile that has built-in sensors to alert the driver when tire
pressure is low, or any other natural or man-made object that can be assigned an Internet
Protocol address and is able to transfer data over a network.

Fig 4.1: internet of things

Page | 32
Internship report on PLC & IoT

Working of IoT
An IoT ecosystem consists of web-enabled smart devices that use embedded systems -- such
as processors, sensors and communication hardware -- to collect, send and act on data they
acquire from their environments.

IoT devices share the sensor data they collect by connecting to an IoT gateway, which acts as
a central hub where IoT devices can send data. Before the data is shared, it can also be sent to
an edge device where that data is analyzed locally. Analyzing data locally reduces the volume
of data sent to the cloud, which minimizes bandwidth consumption.

Sometimes, these devices communicate with other related devices and act on the information
they get from one another. The devices do most of the work without human intervention,
although people can interact with the devices -- for example, to set them up, give them
instructions or access the data.

The connectivity, networking and communication protocols used with these web-enabled
devices largely depend on the specific IoT applications deployed.

IoT can also use artificial intelligence and machine learning to aid in making data collection
processes easier and more dynamic.

Importance of IoT

IoT helps people live and work smarter. Consumers, for example, can use IoT-embedded
devices -- such as cars, smartwatches or thermostats -- to improve their lives. For example,
when a person arrives home, their car could communicate with the garage to open the door;
their thermostat could adjust to a preset temperature; and their lighting could be set to a lower
intensity and colour.

In addition to offering smart devices to automate homes, IoT is essential to business. It provides
organizations with a real-time look into how their systems really work, delivering insights into
everything from the performance of machines to supply chain and logistics operations.

Page | 33
Internship report on PLC & IoT

IoT enables machines to complete tedious tasks without human intervention. Companies can
automate processes, reduce labor costs, cut down on waste and improve service delivery. IoT
helps make it less expensive to manufacture and deliver goods, and offers transparency into
customer transactions.

IoT is one of the most important technologies and it continues to advance as more businesses
realize the potential of connected devices to keep them competitive.

Architecture of IoT

Sensing Layer –

The sensing layer is the first layer of the IoT architecture and is responsible for collecting data
from different sources. This layer includes sensors and actuators that are placed in the
environment to gather information about temperature, humidity, light, sound, and other
physical parameters. These devices are connected to the network layer through wired or
wireless communication protocols.

Network Layer –

The network layer of an IoT architecture is responsible for providing communication and
connectivity between devices in the IoT system. It includes protocols and technologies that
enable devices to connect and communicate with each other and with the wider internet.
Examples of network technologies that are commonly used in IoT include WiFi, Bluetooth,
Zigbee, and cellular networks such as 4G and 5G. Additionally, the network layer may include
gateways and routers that act as intermediaries between devices and the wider internet, and
may also include security features such as encryption and authentication to protect against
unauthorized access.

Data processing Layer –

The data processing layer of IoT architecture refers to the software and hardware components
that are responsible for collecting, analyzing, and interpreting data from IoT devices. This layer
Page | 34
Internship report on PLC & IoT

is responsible for receiving raw data from the devices, processing it, and making it available
for further analysis or action.The data processing layer includes a variety of technologies and
tools, such as data management systems, analytics platforms, and machine learning algorithms.
These tools are used to extract meaningful insights from the data and make decisions based on
that data.Example of a technology used in the data processing layer is a data lake, which is a
centralized repository for storing raw data from IoT devices.

Application Layer –

The application layer of IoT architecture is the topmost layer that interacts directly with the
end-user. It is responsible for providing user-friendly interfaces and functionalities that enable
users to access and control IoT devices. This layer includes various software and applications
such as mobile apps, web portals, and other user interfaces that are designed to interact with
the underlying IoT infrastructure. It also includes middleware services that allow different IoT
devices and systems to communicate and share data seamlessly. The application layer also
includes analytics and processing capabilities that allow data to be analyzed and transformed
into meaningful insights. This can include machine learning algorithms, data visualization
tools, and other advanced analytics capabilities.

Fig 4.2: datonis architecture

Page | 35
Internship report on PLC & IoT

Communications Protocols

 Modbus
 Profibus
 CANBUS
 CANOpen
 Profinet
 OPC
 OPC DA
 OPCUA
 Ethernet/IP

Fig 4.3: stages of IoT

 PROFINET (Process Field Net) is a standard for Industrial Ethernet based on Industrial
Ethernet according to IEEE 802.

 TCP/IP for Profinet CBA and the commissioning of a plant with reaction times in the
range of 100 ms.

 RT (real-time) protocol for Profinet CBA and Profinet IO applications up to 10 ms cycle


times.

 IRT (Isochronous Real-Time) for Profinet.

Page | 36
Internship report on PLC & IoT

The 4 Building Blocks of IoT Device Hardware

 Thing - The asset you want to control or monitor.


 Data Acquisition Module - Acquire physical signal and convert to digital.
 Data Processing Module - The “Computer” to process data, perform analytics, store data
 locally and other edge computing.
 Communications Module - Communicate with 3rd party systems, either locally or in the
cloud.

Data acquisition hardware

Fig 4.4: hardware component

Page | 37
Internship report on PLC & IoT

 Embedded Linux Boards

 Development boards are general purpose programmable boards

 Provide rich interface for prototyping application with operating system

 Sometimes also be used instead of microcontrollers for their enhanced capabilities

 Small form factor

 Low powered

Fig 4.5: IoT sensors

 A sensor is a device that detects, measures or indicate any specific physical quantity such
as light, heat, motion, moisture, pressure, or similar entities by converting them into any
other form which is mostly, electrical pulses.
 In all these cases sensors are part of the digital data backbone of connected and intelligent
solutions. Anything ‘smart’ and IoT-related is
 built upon sensors and other types of transducers a transducer converts a signal in a form of
energy into a signal in another form. In a context of IoT sensors this simply means that
sensors are able to sense conditions in or around the IoT device in which they are present
and in and around the (state and environments of)physical item to which they are attached.
Page | 38
Internship report on PLC & IoT

Setting up a platform
1. First you need to create a account in the datonis platform

2. Then you need to invite/accept the user for its platform

3. Then update the user details in he platform

Page | 39
Internship report on PLC & IoT

4. Then create the thing template by clicking add thing template

5. Now update the thing name and description

6. Now update the data type to Boolean and click next

Page | 40
Internship report on PLC & IoT

7. Now your thing template is created

Now we need to update in the edge cloud software


 URL-localhost:8080/edge
 User name-admin
 Password-admin

 Provide gateway key


 Provide access key
 Provide secret key

Page | 41
Internship report on PLC & IoT

Now go to CSV Adapter and click add thing button and add your Thing

 Provide your folder address in Directory URL area.


 In File filter area you will mention your file name but your file should be saved as CSV
format.

Page | 42
Internship report on PLC & IoT

Check your Tag id and Tag Column name, it should be match with your excel sheet column
name.

Now go to enabled option, select true and click apply button.

Now again you select the false button, click to apply button and go to Test configuration and
click the button.

After click you will get your thing data in below format. The format will show your thing
Templates data and associated matrices with that like your temperature values, pressure values,
humidity value, and if any error is there it will show that there is error also.

Page | 43
Internship report on PLC & IoT

Now the data can be monitored in online applications

Page | 44
Internship report on PLC & IoT

CHAPTER 5
CONCLUSION

The internship was successfully completed at Government Tool Room and Training Centre,
and Knowledge was gained about PLC and IoT. It was a great experience as we learnt a lot
through hands on working. In this one month of training, I acquired knowledge about automation
and I got some information about PLC and how we work on it. I learned the programming on
PLC and also learned about the basics of IoT and the programming involved with it.
The report has discussed the programming with PLC and ladder logic made from it.

 Programmable Logic History- This section discussed the history and advancement of
control technology.
 PLC components- This section defined what programmable logic is and
described all hardware associated with it.

 PLC programming- This section covered various techniques of PLC Programming 

 IoT-This section contains basic introduction of IoT system.

Page | 45

You might also like