0% found this document useful (0 votes)
5 views17 pages

Introduction

This document serves as an introduction to the Siemens Technical Education Program's course on Basics of PLCs, aimed at enhancing distributors' ability to sell Siemens products. It outlines key learning objectives, including understanding PLC components, programming, and operation, while emphasizing the importance of prior knowledge in electricity. Additionally, it discusses the advantages of PLCs over traditional hard-wired control systems, including ease of modification and integrated diagnostics.

Uploaded by

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

Introduction

This document serves as an introduction to the Siemens Technical Education Program's course on Basics of PLCs, aimed at enhancing distributors' ability to sell Siemens products. It outlines key learning objectives, including understanding PLC components, programming, and operation, while emphasizing the importance of prior knowledge in electricity. Additionally, it discusses the advantages of PLCs over traditional hard-wired control systems, including ease of modification and integrated diagnostics.

Uploaded by

Emanuel Paucara
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Introduction

Welcome to another course in the STEP series, Siemens Technical Education Program,
designed to prepare our distributors to sell Siemens Industry, Inc. products more
effectively. This course covers Basics of PLCs and related products.

Upon completion of Basics of PLCs you should be able to:

• Identify the major components of a PLC and describe their functions

• Convert numbers from decimal to binary, BCD, and hexadecimal

• Identify typical discrete and analog inputs and outputs

• Identify key differences of the various S7-200 models

• Identify the types of expansion modules available for S7-200 PLCs

• Describe the types or programming available for S7-200 PLCs

• Describe the operation of commonly used program functions such as timers


and counters

• Identify the proper manual to refer to for programming or installation of an S7-


200 PLC

This knowledge will help you better understand customer applications. In addition, you
will be better able to describe products to customers and determine important
differences between products. You should complete Basics of Electricity before
attempting Basics of PLCs. An understanding of many of the concepts covered in Basics
of Electricity is required for this course.

After you have completed this course, if you wish to determine how well you have
retained the information covered, you can complete a final exam online as described
later in this course. If you pass the exam, you will be given the opportunity to print a
certificate of completion.

Siemens is a trademark of Siemens AG. Product names mentioned may be trademarks


or registered trademarks of their respective companies. Specifications subject to
change without notice.

PLCs
A programmable logic controller (PLC), also referred to as a programmable controller,
is the name given to a type of computer commonly used in commercial and industrial
control applications. PLCs differ from office computers in the types of tasks that they
perform and the hardware and software they require to perform these tasks. While
the specific applications vary widely, all PLCs monitor inputs and other variable values,
make decisions based on a stored program, and control outputs to automate a process
or machine. This course is meant to supply you with basic information on the functions
and configurations of PLCs with emphasis on the S7-200 PLC family.

Indicator
Light
Pum
S
F/
DI
p
A
G

Sens Pushbutt
or on

Basic PLC Operation

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 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.

Hard-Wired Control

Prior to PLCs, many control tasks were performed by contactors, control relays, and
other electromechanical devices. This is often referred to as hard-wired control. Circuit
diagrams had to be designed, electrical components specified and installed, and wiring
lists created. Electricians would then wire the components necessary to perform a
specific task. If an error was made, the wires had to be reconnected correctly. A
change in function or system expansion required extensive component changes and
rewiring.

M OL T1
L1
M OL T2
460 VAC L2 OL T3 Motor
M
L3

OL

1 M
CR

24 VAC

Start
Stop
2 CR

CR

Advantages of PLCs

PLCs not only are capable of performing the same tasks as hard-wired control, but are
also capable of many more complex applications. In addition, the PLC program and
electronic communication lines replace much of the interconnecting wires required by
hard-wired control. Therefore, hard-wiring, though still required to connect field
devices, is less intensive. This also makes correcting errors and modifying the
application easier.

Some of the additional advantages of PLCs are as follows:

• Smaller physical size than hard-wire solutions.

• Easier and faster to make changes.

• PLCs have integrated diagnostics and override functions.

• Diagnostics are centrally available.

• Applications can be immediately documented.

• Applications can be duplicated faster and less expensively.

Totally Integrated Automation (TIA) concept is based. Because the needs of end users
and machine builders vary widely, SIMATIC PLCs are available as conventional modular
controllers, embedded automation products, or as PC-based controllers.

Modular SIMATIC controllers are optimized for control tasks and can be adapted to
meet application requirements using plug-in modules for input/output (I/O), special
functions, and communications. Examples of products in this category include: LOGO!,
S7-200, and S7-1200 micro automation products, S7-300 and S7-400 modular system
PLCs, C7 combination controller and panel, and ET 200 distributed I/O system with
local intelligence.

Other SIMATIC Controllers


SIMATIC embedded automation products are available in

a microbox, panel PC, or multi-functional PC-based system. All products utilize rugged,
fan-free, diskless hardware platforms with an operating system optimized for each
platform. Examples of products in this category include:

Microbox 420-RTX, Microbox 420-T, Panel PC 477-HMI/RTX, and WinAC MP.

SIMATIC PC-based controllers are available as software that can run on standard PC
systems or in a plug-in card (slot PLC) for increased reliability. This category includes
WinAC software and WinAC slot PLC.

SIMATIC Software

SIMATIC software is the universal configuring and

programming environment for SIMATIC controllers, human machine interface systems,


and process control systems. SIMATIC software with STEP 7 and numerous engineering
tools supports all phases of product deployment, from hardware configuration of the
system and parameterization of modules to service of the installed system. A variety

of programming options are available. This includes basic programming languages


(Instruction List, Ladder Diagram, and Function Block Diagram), high-level languages
(Structured Text and Sequential Function Chart), and engineering tools (S7 Structured
Control Language, S7-Graph, S7-PLCSIM, S7- HiGraph, and Continuous Function Chart).

Number Systems

Because a PLC is a computer, it stores information in the form of on or off conditions (1


or 0), referred to as bits. Sometimes bits are used individually and sometimes they are
used

to represent numerical values. Understanding how these bits can be used to represent
numerical values requires an understanding of the binary number system.

Decimal System

In order to understand the binary number system, it is first useful to recall some of the
basics of the decimal number system. All number systems have the same three
characteristics: digits, base, weight.

For example, the decimal system has the following characteristics:

Ten digits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9

Base 10
Weights Powers of base 10 (1, 10, 100, 1000,…)

Binary System

The binary system has the following characteristics: Two digits: 0, 1

Base 2

Weights Powers of base 2 (1, 2, 4, 8, 16, )

The binary system has a base of 2 and uses only two characters, 1 and 0. Each bit is
associated with a power of 2 based on its position in the number. The further to the
left, the higher the power of 2. The number in the far left-hand column is referred to as
the most significant bit or MSB and the number in the far right-hand column is referred
to as the least significant bit or LSB. A 1 is placed in a position if that power of 2 is used
in the number. Otherwise, a 0 is placed in a position.

Bits, Bytes, and Words

Each position in a binary number is called a bit. The number

of bits used to represent numbers varies with the device. However, instructions and
data are usually grouped in bytes and eight bits make up one byte. Two bytes, or 16
bits, make up one word.

Logic 0, Logic 1

While PLCs are capable of sensing and generating analog

values, programmable controllers internally use signals that are on or off. These on and
off conditions correspond to the binary values 1 and 0. For example, a binary 0, also
called logic 0, can be used to indicate that a switch is off, and a binary 1 (logic 1) can be
used to indicate that a switch is on.

Hexadecimal

Hexadecimal is another system used in PLCs. The ten digits of the decimal system are
used for the first ten characters of the hexadecimal system. The first six letters of the
alphabet are used for the remaining six characters.

The hexadecimal system is used in PLCs because it allows the status of a large number
of binary bits to be represented in a small space such as on a computer screen or
programming device display. Each hexadecimal character represents the exact status
of four binary bits.

Terminology
Developing an understanding of PLCs requires learning some basic terminology. This
section provides an overview of commonly used PLC terms, beginning with the terms
sensor and actuator.

Sensors

Sensors are devices that convert a physical condition into an electrical signal for use by
a controller, such as a PLC. Sensors are connected to the input of a PLC. A pushbutton
is one example of a sensor that is often connected to a PLC input. An electrical signal
indicating the condition (open or closed) of the pushbutton contacts is sent from the
pushbutton to the PLC.

Actuators

Actuators are devices that convert an electrical signal from a controller, such as a PLC,
into a physical condition. Actuators are connected to the PLC output. A motor starter is
one example of an actuator that is often connected to a PLC output. Depending on the
status of the PLC output, the motor starter either provides power to the motor or
prevents power from flowing to the motor.

Discrete Inputs and Outputs

Discrete inputs and outputs, also referred to as digital inputs and outputs, are either
on or off. Pushbuttons, toggle switches, limit switches, proximity switches, and relay
contacts are examples of devices often connected to PLC discrete inputs. Solenoids,
relay and contactor coils, and indicator lamps are examples of devices often connected
to PLC discrete outputs.

In the on condition, a discrete input or output is represented internal to the PLC as a


logic 1. In the off condition, a discrete input or output is represented as a logic 0.

Analog Inputs and Outputs

Analog inputs and outputs are continuous, variable signals.

Typical analog signals vary from 0 to 20 milliamps, 4 to 20 milliamps, or 0 to 10 volts.

In the following example, a level transmitter monitors the level of liquid in a storage
tank and sends an analog signal to a PLC input. An analog output from the PLC sends
an analog signal to a panel meter calibrated to show the level of liquid in the tank. Two
other analog outputs, not shown here, are connected to current-to-pneumatic
transducers that control air-operated flow- control valves. This allows the PLC to
automatically control the flow of liquid into and out of the storage tank.

Ladder Logic Programming

A program consists of instructions that accomplish specific


tasks. The degree of complexity of a PLC program depends upon the complexity of the
application, the number and type of input and output devices, and the types of
instructions used.

Ladder logic (LAD) is one programming language used with PLCs. Ladder logic
incorporates programming functions that are graphically displayed to resemble
symbols used in hard-wired control diagrams.

The left vertical line of a ladder logic diagram represents the power or energized
conductor. The output coil instruction represents the neutral or return path of the
circuit. The right vertical line, which represents the return path on a hard-wired control
line diagram, is omitted. Ladder logic diagrams are read from left-to-right and top-to-
bottom. Rungs are sometimes referred to as networks. A network may have several
control elements, but only one output coil.

Statement List and Function Block Diagrams

While ladder logic programs are still common, there are many other ways to program
PLCs. Two other common examples are statement list and function block diagrams.

Statement list (STL) instructions include an operation and an operand. The operation
to be performed is shown on the left. The operand, the item to be operated on, is
shown on the right.

Function block diagrams (FBD) include rectangular functions with inputs shown on the
left side of the rectangle and outputs shown on the right side.

In addition to LAD, STL, and FBD, multiple other types of programming languages are
used for PLCs. Each type of programming has its advantages and disadvantages.
Factors such as application complexity, types of programming available for a specific
PLC model, and user standards and preferences determine which type of programming
is used for an application.

PLC Scan

The PLC program is executed as part of a repetitive process referred to as a scan. A PLC
scan starts with the CPU reading the status of inputs. Next, the application program is
executed. Then, the CPU performs internal diagnostics and communication tasks. Finally,
the CPU updates the status of outputs. This process repeats as long as the CPU in the
run mode. The time required to complete a scan depends on the size of the program,
the number of I/Os, and the amount of communication required.

Memory Types and Size


Kilo, abbreviated k, normally refers to 1000 units. When talking about computer or PLC
memory, however, 1k means 1024. This is because of the binary number system
(210=1024). 1k can refer to 1024 bits, bytes, or words, depending the context.

Random Access Memory (RAM) is memory that allows data to written to and read
from any address (location). RAM is used as a temporary storage area. RAM is volatile,
meaning that

the data stored in RAM will be lost if power is lost. A battery backup is required to
avoid losing data in the event of a power loss.

Read Only Memory (ROM) is a type of memory used were it is necessary to protect
data or programs from accidental erasure. The original data stored in ROM can be
read, but not changed. In addition, ROM memory is nonvolatile. This means that
information will not be lost as the result of a loss of electrical power. ROM is normally
used to store the programs that define the capabilities of the PLC.

Erasable Programmable Read Only Memory (EPROM) provides a level of security


against unauthorized or unwanted changes in a program. EPROMs are designed so that
data stored in them can be read, but not easily altered. Changing EPROM data requires
a special effort. UVEPROMs (ultraviolet erasable programmable read only memory) can
only be erased with an ultraviolet light. EEPROM (electronically erasable
programmable read only memory), can only be erased electronically.

Software, Hardware, and

Software is the name given to computer instructions, Firmware regardless of the


programming language. Essentially, software includes the instructions or programs
that direct hardware.

Hardware is the name given to all the physical components of a system. The PLC, the
programming device, and the connecting cable are examples of hardware.

Firmware is user or application specific software burned into EPROM and delivered as
part of the hardware. Firmware gives the PLC its basic functionality.
Putting it Together

The user memory of a PLC, such as the S7-200 PLC shown in the following illustration,
includes space for the user program as well as addressable memory locations for
storage of data. The amount of program and data space available depends on the CPU
model.

User program space stores instructions that are executed repetitively as part of the
PLC scan. The user program is developed using a programming device, such as a
personal computer (PC) with programming software, then loaded into the user
program memory of the PLC.

A variety of addressable memory locations are used for storage of data that is available
to the user program. Among other things, this includes memory locations for variable
data, discrete inputs and outputs, analog inputs and outputs, timers, counters, high-
speed counters, etc.

I0.0 Q0
I0.1 .0
I0 Q0
.4 .1
I0
.5

Basic Requirements

Throughout this course we will be using the S7-200 PLC for specific examples of PLC
concepts. The S7-200 PLC is used for this purpose because of its ease of use and wide-
spread application.

The items shown in the following illustration are needed to create or change an S7-200
PLC program. The program is created using STEP 7-Micro/WIN programming software,
which runs on a Windows-based personal computer (Win2000, Windows XP, and
higher operating system).
A special cable is needed when a personal computer is used as a programming device.
Two versions of this cable are available. One version, called an RS-232/PPI Multi-
Master Cable, connects a personal computer’s RS-232 interface to the PLC’s RS-485
connector. The other version, called a USB/PPI Multi- Master Cable, connects a
personal computer’s USB interface to the PLC’s RS-485 connector.1

S7-200 Micro PLCs

The S7-200 Micro PLC is the smallest member of the SIMATIC S7 family of
programmable controllers.

Each S7-200 central processing unit (CPU) model also includes input and output points
in the same housing as the CPU.

Inputs and outputs (I/O) are the system control points. Inputs monitor field devices,
such as switches and analog sensors. Outputs control other devices, such as motors
and control valves.

The programming port is the connection to the programming device and also provides
a means for connecting the PLC to other devices, such as display panels.
SF/DIAG

S7-200 Models There are six S7-200 CPU types (CPU 221, CPU 222, CPU 224,

CPU 224XP, CPU 224XPsi, and CPU 226) and two power supply configurations for each
type.

Model Power Supply Input Types Output Types Comm


Description Ports

221 DC/DC/DC 20 .4 -28 .8 VDC 6 x 24 VDC 4 x 24 VDC 1

221 85 -264 VAC, 47 6 x 24 VDC 4 x Relay 1


AC/DC/Relay -63 Hz

222 DC/DC/DC 20 .4 -28 .8 VDC 8 x 24 VDC 6 x 24 VDC 1

222 85 -264 VAC, 47 8 x 24 VDC 6 x Relay 1


AC/DC/Relay -63 Hz

224 DC/DC/DC 20 .4 -28 .8 VDC 14 x 24 VDC 10 x 24 VDC 1

224 85 -264 VAC, 47 14 x 24 VDC 10 x Relay 1


AC/DC/Relay -63 Hz

224 XP 20 .4 -28 .8 VDC 14 x 24 VDC, 2 x 10 x 24 VDC, 1 x 2


DC/DC/DC Analog Analog

224 XP 85 -264 VAC, 47 14 x 24 VDC, 2 x 10 x Relay, 1 x Analog 2


AC/DC/Relay -63 Hz Analog

224 XP s i 20 .4 -28 .8 VDC 14 x 24 VDC, 2 x 10 x 24 VDC (current s 2


DC/DC/DC Analog inking),

1 x Analog

226 DC/DC/DC 20 .4 -28 .8 VDC 24 x 24 VDC 16 x 24 DC 2

226 85 -264 VAC, 47 24 x 24 VDC 16 x Relay 2


AC/DC/Relay -63 Hz

In the model description, the first term following the CPU type indicates the power
supply type, the second term indicates the input type, and the third term indicates the
output type.

For example, a 222 AC/DC/Relay model is powered from an AC source, has DC input
points, and relay contact output points.

S7-200 Features

The S7-200 family includes a range of CPUs which provide a variety of features to aid in
designing a cost-effective automation solution. The accompanying table provides a
summary of the major features, many of which are covered in this course. Note that
the CPU 224XPsi has 10 current sinking digital outputs, but its other features are the
same as for the CPU 224XP.

Feature CPU 221 CPU 222 CPU 224 CPU 224XP CPU 226
CPU 224XPsi
Memory
Program (with 4096 Bytes 4096 Bytes 8192 Bytes 12288 Bytes 16384 Bytes
run mode edit)
Program (w/o run 4096 Bytes 4096 Bytes 12288 Bytes 16384 Bytes 24576 Bytes
mode edit)
User Data 2048 Bytes 2048 Bytes 8192 Bytes 10240 Bytes 10240 Bytes
Optional Memory 64k or 256k Bytes 64k or 256k 64k or 256k 64k or 256k 64k or 256k
Cartridges Bytes Bytes Bytes Bytes
Memory Backup 50 Hours typical 50 Hours 100 Hours 100 Hours 100 Hours
(super cap) typical typical typical typical
Memory Backup 200 Days typical 200 Days 200 Days 200 Days 200 Days
(opt. battery) typical typical typical typical
I/O
Digital I/O 6 In/4 Out 8 In/6 Out 14 In/10 Out 14 In/10 Out 24 In/16 Out
without Exp.
Modules
Analog I/O None None None 2 In/1 Out None
without Exp.
Modules
Max Expansion None 2 7 7 7
Modules
Instructions
Internal Relays 256 256 256 256 256
Counters 256 256 256 256 256
TImers 256 256 256 256 256
32-Bit, Floating- Yes Yes Yes Yes Yes
Point Math (+-*/)
Enhanced Features
High-Speed 4 (30 KHz) 4 (30 KHz) 6 (30 KHz) 4 (30 KHz), 6 (30 KHz)
Counters 2 (200 KHz)
Pulse Outputs 2 (20 KHz) 2 (20 KHz) 2 (20 KHz) 2 (20 KHz) 2 (20 KHz)
(DC)
Timed Interrupts 2 (1ms - 255ms) 2 (1ms - 2 (1ms - 2 (1ms - 2 (1ms -
255ms) 255ms) 255ms) 255ms)
Edge Interrupts 4 4 4 4 4
Real-Time Clock Optional Optional Built-In Built-In Built-In
Password Yes Yes Yes Yes Yes
Protection
Communications
Number of Ports 1 (RS-485) 1 (RS-485) 1 (RS-485) 2 (RS-485) 2 (RS-485)
PPI, MPI Slave, PPI, PPI, MPI PPI, MPI PPI, MPI
Protocols
Freeport MPI Slave, Slave, Slave,
Supported Port 0
Slave, Freeport Freeport Freeport
Freepor
t
Optional Not Expandable PROFIBUS DP PROFIBUS DP PROFIBUS DP PROFIBUS DP
Communcations Slave, Slave, Slave, Slave,
AS- AS-Interface AS-Interface AS-Interface
Interface Master, Master, Master,
Master, Ethernet, Ethernet, Ethernet,
Ethernet, Internet, Internet, Internet,
Internet, Modem Modem Modem
Modem

Power Sources

Depending on the CPU model, an S7-200 CPU is powered from either a 24 VDC or a 120
to 240 VAC power supply. For example, an CPU 221 DC/DC/DC model is powered from
a 24 VDC power supply and a CPU 222 AC/DC/Relay model is powered from a 120 or
240 VAC power supply.
DC Voltage Source 24 VDC
(Nominal Voltage)

AC Voltage Source 120 to 240 VAC


(Nominal Voltage)
Mode Switch and Analog

Each S7-200 CPU has a mode switch with three positions, Adjustment RUN, STOP,
and TERM. When the mode switch is in the RUN position, the CPU is in the RUN mode
and executing the program, unless a fault has occurred. When the mode switch is in
the STOP position, the CPU is in the STOP mode and not executing the user program.
When the mode switch is in the TERM position, the programming device can select the
operating mode.

An analog adjustment is available to increase or decrease values stored in special


memory. This can allow a variable in the user program to change as the analog
adjustment is changed. CPU 221 and CPU 222 models have one analog adjustment.
CPU 224, CPU 224XP, CPU 224 XPsi, and CPU 226 have two analog adjustments.
CPU Status Indicators

The CPU status indicators display the current CPU mode.

When the CPU is in the RUN mode, the green RUN indicator is lit. When the CPU is in
the STOP mode, the yellow STOP indicator is lit. The System Fault/Diagnostic
(SF/DIAG) indicator turns red for a system fault and yellow to indicate certain
diagnostic conditions.

CPU Status Indicators

The I/O status indicators represent the on or off status of corresponding inputs and
outputs. For example, when the CPU senses an input is on, the corresponding green
indicator is lit.

Optional Cartridges

S7-200 CPUs support an optional memory cartridge that provides portable EEPROM
storage for the user program. The cartridge can be used to copy a program from one
S7-200 PLC to a like S7-200 PLC. Two memory cartridge sizes are available, 64k and
256k bytes.
Two other cartridges are also available. A real-time clock with battery is available for
use on the CPU 221 and CPU 222. (CPU 224, CPU 224XP, CPU 224XPsi, and CPU 226
have a real-time clock built in.) The battery provides up to 200 days of data retention
time in the event of a power loss. Another cartridge is available with a back-up battery
only.
Inputs and Outputs

Input devices, such as switches, pushbuttons, and other sensors are connected to the
terminal strip under the bottom cover of the PLC.
A convenient method of testing a program is to wire toggle switches to the inputs.
Input simulators with pre-wired toggle switches are available for use with S7-200 PLCs.
Switches are wired between the 24 VDC power supply (L+) and the inputs. For
example, the switch on the far left is wired between the first input (0.0) and L+. When
the switch is closed, 24 VDC is applied to the input. When the switch is open, 0 VDC is
applied to the input.
Output devices, such as relays, are connected to the terminal strip under the top cover
of the PLC. When testing a program, it is not necessary to connect output devices. The
LED status indicators signal if an output is active.

Local Output Points

SF/DIAG

SF/DIAG

You might also like