0% found this document useful (0 votes)
30 views65 pages

PLC Programming with TIA Portal Guide

The document provides an overview of Programmable Logic Controllers (PLCs), specifically focusing on the Siemens S7-1200 series. It details various types of PLCs, their input/output devices, communication protocols, and the specifications of the S7-1200 CPU 1211C. Additionally, it discusses programming languages used in PLCs and the construction and connection of PLC systems.

Uploaded by

Admin Asst
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)
30 views65 pages

PLC Programming with TIA Portal Guide

The document provides an overview of Programmable Logic Controllers (PLCs), specifically focusing on the Siemens S7-1200 series. It details various types of PLCs, their input/output devices, communication protocols, and the specifications of the S7-1200 CPU 1211C. Additionally, it discusses programming languages used in PLCs and the construction and connection of PLC systems.

Uploaded by

Admin Asst
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

Programmable Logic Controller

(PLC Programming With TIA Portal)


S7- 1200 CPU 1212C DC/DC/DC

[Link]
Programmable Logic Controller
A programmable logic controller or programmable controller is an industrial computer that has been
ruggedized and adapted for the control of manufacturing processes, such as assembly lines, machines,
robotic devices, or any activity that requires high reliability, ease of programming, and process fault
diagnosis.

The two major types of PLC

1. 2.

1. Fixed/Integrated/Compact PLC
2. Modular PLC

Type of PLC according to Output

1. Relay Output
2. Transistor Output
3. Triac Output
4. Analog Output

[Link]
PLC Hardware

Input Input Output Motor Induction


CPU
Devices Module Module Starter Motor

HMI
Human Machine Interface [Link]
What are Input/Output devices?
An input device is a piece of computer hardware An output device is any piece of hardware used to
equipment used to provide data, and control communicate the results of data processing carried
signals to an information processing system (IPS). out by an IPS and translate the information into an
o Switches and push buttons understandable form.
o Sensing devices o Valves
o Limit switches o Motor starters
o Proximity sensors o Horns and alarms
o Photoelectric Sensors o Stack lights
o Condition sensors o Control relays
o Vacuum switches o Pumps
o Temperature switches o Printers
o Level switches o Fans
o Pressure switches

Push Button Sensor Limit Switch Pressure Switch Valve Contactor Relay Buzzer
[Link]
Connection and Construction of PLC

• Input Sensing Devices

Programmable Logic Controller


• Input Module
• CPU
• Output Module
• Relay Board
• Power Contactors
• Output Sensing Devices
[Link]
Terminologies Ladder Diagram
o Power Rails – Pairs of vertical lines
o Rungs – Horizontal lines
o Contacts X0, X1, X2 X3… arranged
on rungs Rungs
o In PLC Ladder Logic
➢ No real power flow (like in relay
logic)
➢ There must be continuous path
The processor or controller scans
through the contacts to energize the
ladder rungs from top-to-bottom
output
and from left-to-right.

Five languages are commonly used- Power Rails


1. Functional Block Diagram (FBD) – Graphical (For Process Flow)
2. Ladder Logic (LD) – Graphical (For Electrical Flow)
3. Structured Text (Similar to Pascal) – Textual (Textual, Calculation)
4. Instruction List (Similar to Assembly) – Textual (Boolean)
5. Sequential Function (SFC) – Graphical (Sequential Process)

[Link]
Scan Time
Time taken by the PLC to read the inputs, solve the Logic, and to
write the output is called a PLC Scan Time.
Read
Input
Scan Time depends on-
o Number of inputs
o Number of outputs
o Length of logic
o Speed of PLC processor
o Nature of Input/Output (I/O) signals
Update Scan Execute
Output Program
Cycle
Nature of Input/Output (I/O)
o Digital Inputs
o Digital Outputs
o Analog Inputs Diagnostic
o Analog Outputs &
Communicatio
n
[Link]
Connection and Construction of PLC

[Link]
Input Module Circuit
Connection and Construction of PLC

[Link]
Input Module Circuit
Connection and Construction of PLC

[Link]
Input Module Circuit
Connection and Construction of PLC

[Link]
Output Module Circuit
Connection and Construction of PLC

[Link]
Output Module Circuit
Connection and Construction of PLC

Input Output
CPU
Module Module

[Link]
Connection and Construction of PLC

Input Output
CPU
Module Module

[Link]
Connection and Construction of PLC

Input Output
CPU
Module Module

[Link]
Programmable Logic Controller
(PLC Programming With TIA Portal)
S7- 1200 CPU 1211C DC/DC/DC

[Link]
Communication System

[Link]
RS232 and RS485

RS232

RS485

[Link]
RS232 pinout standards exist for both DB9 and
DB25 connectors as shown below
DB25 SIGNAL DB9 DEFINITION
1 Protective Ground
2 TXD 3 Transmitted Data
3 RXD 2 Received Data
4 RTS 7 Request To Send
5 CTS 8 Clear To Send
6 DSR 6 Data Set Ready
7 GND 5 Signal Ground
8 CD 1 Received Line Signal Detector
9 Reserved for data set testing
10 Reserved for data set testing
11 Unassigned
12 SCF Secndry Rcvd Line Signl Detctr
13 SCB Secondary Clear to Send
14 SBA Secondary Transmitted Data
15 DB Transmisn Signal Timng
DB25 16 SBB Secondary Received Data
RS232 17 DD Receiver Signal Element Timing
18 Unassigned
19 SCA Secondary Request to Send
20 DTR 4 Data Terminal Ready
21 CG Signal Quality Detector
22 9 Ring Indicator
23 CH/CI Data Signal Rate Selector
24 DA Transmit Signal Element Timing
25 Unassigned
DB9, DB25 and RJ45 Connectors

Location of Pin 1 on DB connector


Female Male

25 Pin DB25

25 Pin DB25 Female 25 Pin DB25 Male


9 Pin DB9

8 Pin RJ45

RJ45

25 Pin DB9 Female 25 Pin DB9 Male


[Link]
DB9 Pinout for RS232, RS422 and RS485

RS422 and RS485 DB9 pinout

[Link]
➢ HTTP Hypertext Transfer Protocol
➢ HTTPS Hypertext Transfer Protocol Secure
➢ FTP File Transfer Protocol
➢ SMTP Simple Mail Transfer Protocol
➢ DNS Domain Name System
➢ SNMP Simple Network Management Protocol
➢ TCP Transmission Control Protocol
➢ UDP User Datagram Protocol
➢ ARP Address Resolution Protocol
➢ IP Internet Protocol
➢ ICMP Internet Control Message Protocol
➢ DLL Dynamic Link Library

[Link]
The CPU can communicate with other CPUs, with programming devices, with HMI devices, and with non - Siemens
devices using standard TCP communications protocols.

[Link]
The PROFINET port on the CPU 1211C, 1212C, and 1214C does not contain an Ethernet switching device. A direct
connection between a programming device or HMI and a CPU does not require an Ethernet switch. However, a
network with more than two CPUs or HMI devices requires an Ethernet switch.

[Link]
Communication between two CPUs
➢ The TSEND_C instruction in CPU_1 links to the TRCV_V in CPU_2 over the first connection ("connection ID 1" on
both CPU_1 and CPU_2).
➢ The TRCV_C instruction in CPU_1 links to the TSEND_C in CPU_2 over the second connection ("connection ID 2"
on both CPU_1 and CPU_2).

[Link]
Programmable Logic Controller
(PLC Programming With TIA Portal)
S7- 1200 CPU 1211C DC/DC/DC

[Link]
Siemens PLC Series

S7-200 S7-300 S7-400 S7-1200 S7-1500 ET-200 with integrated CPU

• Compact PLC with • Compact or • It is a rack- • Medium and Low • Advanced and Modular • Distributed I/O
onboard I/Os Modular PLC based system end performance controller • With or Without CPU
• Micro PLC for lower • It is a bus-linked • High range • High and Medium end • Modular PLC
performance range platform performance • Compact PLC with performance • High and Medium end
• Software: Step 7 • Medium and Low and medium onboard I/Os • High system performance performance
Microwin end performance range • It has a very high • up to 32 expansion • Software: TIA Portal
• It has 38 Analog I/O range • Modular PLC processing speed modules as needed to fit • Communication:
capacity and 256 • Technology T • For process • High and Medium your project Ethernet / ProfiNet
Digital I/O capacity version automation end performance • S7-1500 has an inbuilt
• Communication: • Software: Simatic • DCS • Software: TIA Portal display and keypad
RS485 Manager applications • Communication: • Software: TIA Portal
• Models: CPU 221, • Communication: • Software: TIA Ethernet • It has inbuilt PROFINET
222, 224, 224XP, Profibus Portal ports
224XPsi, 226 • Cable: MPI DP / • Communication: Ethernet
• Boolean execution Profibus DP / ProfNet
speed: 0.22 • Software: PCS7
microseconds/instruc Package
tion
Fanuc I/O Board
Siemens S7-200
The S7-200 series of micro-programmable logic controllers (Micro PLCs)
can control a wide variety of devices to support your automation needs.
The S7-200 monitors inputs and changes outputs as controlled by the
user program, which can include Boolean logic, counting, timing,
complex math operations, and communications with other intelligent
devices. The compact design, flexible configuration, and powerful
instruction set combine to make the S7-200 a perfect solution for
controlling a wide variety of applications.

• Compact PLC with onboard I/Os


• Micro PLC for lower performance range
• Software: Step 7 Microwin
• It has 38 Analog I/O capacity and 256 Digital I/O capacity
• Communication: RS485
• Models: CPU 221, 222, 224, 224XP, 224XPsi, 226
• Boolean execution speed: 0.22 microseconds/instruction

[Link]
Siemens S7-300
The Siemens PLC CPU provides more power and additional features with
an easy and simple upgrade path from the S7-200 series PLCs and
includes many of the common features and instructions found in other
models within the range. It is a compact CPU with a wide range of special
attributes like 192KB work memory, 2-port switch, 1 Pt100 sensor, 4 high-
speed counters (60kHz), front connector (2x 40-pole) and a micro
memory card.
• MPI interface for communications with other controllers and
operator panels
• Enhanced communication is possible using either of the two PtP
interfaces (1xRS485 serial interface)
• Communication interface like MPI
• CPU has integral counters, frequency measurement capabilities
and PWM outputs enabling direct control of valves and
actuators
• Simple motion control is possible without additional
components

[Link]
Siemens S7-400

Part of the SIMATIC process controller series, the S7-400 has


been designed for system solutions in the fields of
manufacturing and process automation. This process controller
is ideal for data-intensive tasks that are especially typical for
the process industry. S7-400 and the innovated S7-410 product
line will stay the hardware backbone of the PCS 7 control
system. For standard and failsafe applications within factory
automation the new S7-1500 controller generation takes full
advantage of all TIA Portal features.

[Link]
Siemens S7-1200

The S7-1200 controller provides the flexibility and power to control a


wide variety of devices in support of your automation needs. The
compact design, flexible configuration, and powerful instruction set
combine to make the S7-1200 a perfect solution for controlling a wide
variety of applications. The CPU combines a microprocessor, an
integrated power supply, input and output circuits, built-in PROFINET,
high-speed motion control I/O, and on-board analog inputs in a compact
housing to create a powerful controller. After you download your
program, the CPU contains the logic required to monitor and control the
devices in your application. The CPU monitors the inputs and changes the
outputs according to the logic of your user program, which can include
Boolean logic, counting, timing, complex math operations, and
communications with other intelligent devices.

[Link]
Siemens S7-1500
The SIMATIC S7-1500 is the further development of the SIMATIC S7-300 and
S7-400 automation systems. Through the integration of numerous new
performance features, the S7-1500 automation system offers the user
excellent operability and the highest performance. The new performance
features are:
● Increased system performance
● Integrated Motion Control functionality
● PROFINET IO IRT
● Integrated display for machine-oriented operation and diagnostics
● STEP 7 language innovations with retention of proven functions

The S7-1500 automation system offers the required flexibility and


performance for high bandwidth controller applications in machine and plant
design. The scalable configuration allows you to adapt your control system to
the specific local requirements. The S7-1500 automation system complies
with IP20 degree of protection and is intended for installation in a control
cabinet

The S7-1500 automation system is installed on a mounting rail and can


comprise up to 32 modules. The modules are connected to each other with U
connectors [Link]
Programmable Logic Controller
(PLC Programming With TIA Portal)
S7- 1200 CPU 1211C DC/DC/DC

[Link]
Introduction of S7 - 1200 PLC
The S7-1200 controller provides the flexibility and power to control a wide variety of devices in support of your automation needs. The CPU
combines a microprocessor, an integrated power supply, input and output circuits, built-in PROFINET, high-speed motion control I/O, and on-board
analog inputs in a compact housing to create a powerful controller. The CPU monitors the inputs and changes the outputs according to the logic of
your user program, which can include Boolean logic, counting, timing, complex math operations, and communications with other intelligent
devices.
The CPU provides a PROFINET port for communication over a PROFINET network. Additional modules are available for communicating over
PROFIBUS, GPRS, RS485 or RS232 networks.

[Link]
Specifications of Siemens
S7 1200 1211C DC/DC/DC 6ES7211-1AE40-0XB0
• Physical size (mm) : 90 x 100 x 75
• User memory : Work 30 Kbytes, Load 1 Mbyte
and Retentive 10 Kbytes
• Digital I/O : 6 inputs/4 outputs
• Analog I/O : 2 inputs
• Process image size : Input (I)/Output (Q) 1024
bytes, 1024 bytes
• Bit memory (M) : 4096 bytes
• Signal module (SM) expansion : None
• Signal board (SB), Battery board (BB) and
Communication board (CB) :1
• Communication module (CM) (LS Expansion) :3
• High-speed counters : Total- 3 built-in I/O, 5 with SB
Single phase- 3 at 100 kHzSB: 2 at 30 kHz
Quadrature phase 3 at 80 kHz SB: 2 at 20 kHz
• Pulse outputs1 :4
• Memory card : SIMATIC Memory card (optional)
• Real time clock retention time : 20 days, typ. / 12 days min. at 40 degrees C
(maintenance-free Super Capacitor)
• PROFINET : 1 Ethernet communication port
• Real math execution speed : 2.3 μs/instruction [Link]
• Boolean execution speed : 0.08 μs/instruction
• Comparing the CPU models • Blocks, timers and counters supported by S7-1200

[Link]
• Expansion capability of the CPU
The S7-1200 family provides a variety of modules and plug-in boards for expanding the capabilities of the CPU with additional I/O or other
communication protocols.
1. Communication module (CM), communication processor (CP), or TS Adapter
2. CPU
3. Signal board (SB), communication board (CB), or Battery Board (BB)
4. Signal module (SM)

Expansion of the PLC

[Link]
• Expansion capability of the CPU
The S7-1200 family provides a variety of modules and plug-in boards for expanding the capabilities of the CPU with additional I/O or other
communication protocols.
1. Communication module (CM), communication processor (CP), or TS Adapter
2. CPU
3. Signal board (SB), communication board (CB), or Battery Board (BB)
4. Signal module (SM)

Communication interfaces

Expansion of the PLC

Other boards
[Link]
S7-1200 expansion modules

[Link]
• CPU 1211C DC/DC/DC (6ES7 211-1AE31-0XB0)

Connector pin locations for CPU 1211C DC/DC/DC


General specifications and features

General

CPU features

[Link]
Timers, counters and code blocks supported by CPU 1212C

• Blocks, timers and counters supported by CPU 1212C

[Link]
• Communication • Power supply

Technical Specifications

Sensor power
[Link]
• Digital/Analog inputs and outputs

Digital Inputs
Analog Inputs
Digital outputs
[Link]
Programmable Logic Controller
(PLC Programming With TIA Portal)
S7- 1200 CPU 1211C DC/DC/DC

[Link]
AND, OR or NOT logic Gates

AND Gate OR Gate NOT Gate


X0 X1 Output X0 X1 Output X0 X1 Output
0 0 0 0 0 0 0 0 0
0 1 0 0 1 1 0 1 0
1 0 0 1 0 1 1 0 1
1 1 1 1 1 1 1 1 0

X1 X1 Input Output
Input X1 . X2 Input X1 + X2
X2 Output X2 Output
AND Gate OR Gate NOT Gate
[Link]
AND Logic Gate

X0 X1 Output
OFF OFF OFF
OFF ON OFF
ON OFF OFF
ON ON ON

X1
Input X1 . X2
X2 Output
AND Gate

[Link]
OR Logic Gate

X0 X1 Output
OFF OFF OFF
OFF ON ON
ON OFF ON
ON ON ON

X1
Input X1 + X2
X2 Output
OR Gate

[Link]
NOT Logic Gate
X0 X1 Output
OFF OFF OFF
OFF ON OFF
ON OFF ON
ON ON OFF

Input Output

NOT Gate

[Link]
Programmable Logic Controller
(PLC Programming With TIA Portal)
S7- 1200 CPU 1211C DC/DC/DC

[Link]
CPU 1211C DC/DC/D
(6ES7 211-1AE31-0XB0)
Output type:- Solid State- MOSFET
(Sourcing)
[Link]
CPU 1211C DC/DC/Relay
(6ES7 211-1HE31-0XB0)
Output type:- Relay, dry contact

[Link]
CPU 1211C AC/DC/Relay
(6ES7 211-1BE31-0XB0)
Output type:- Relay, dry contact

[Link]
Programmable Logic Controller
(PLC Programming With TIA Portal)
S7- 1200 CPU 1211C DC/DC/DC

[Link] or [Link]
PLC Tags (Absolute vs Symbolic)
“%I0.0” is Absolute Address (Logical Address in CPU Language)

%I0.0
Limit Switch
“Limit Switch” is Symbolic Address (Human Language)

7
6
5
Where “I” Indicates input image
“0” Represents Byte Zero 4
“.” is period separating Bit address 3
“0” Indicates Bit Zero
2 Byte
1
% character indicates it is an absolute address. Step 7
automatically supplies it if omitted 0
7 6 5 4 3 2 1 0
Bits
[Link] or [Link]
PLC Addressing and Data Types
Byte

7 6 5 4 3 2 1 0

I0.7 I0.6 I0.5 I0.4 I0.3 I0.2 I0.1 I0.0

Bit

I 0 . 0 M 0 . 0 Y 0 . 0

Code Register No. Bit Code Register No. Bit Code Register No. Bit

[Link] or [Link]
PLC Addressing

Bit Type Addressing Register Type Addressing

I0.7 I0.6 I0.5 I0.4 I0.3 I0.2 I0.1 I0.0 7 6 5 4 3 2 1 0


Proximity Sensor

NO Push Button- II

NO Push Button- I

Selector Switch - II

Selector Switch - I

Limit Switch

NC Push Button
Pressure Switch

More than Binary


▪ Analog Value
▪ Numerical value
• Timer
• Counter
• Math Functions (ADD, MUL, DIV, SUB)
Binary Inputs (0 - 1)
• Compare Instruction
▪ NO PB
▪ NC PB
▪ Emergency PB
▪ Selector Switch
▪ Limit Switch
▪ Proximity Sensor
▪ Reed Switch
▪ Pressure Switch
▪ Float Switch [Link] or [Link]
PLC Addressing and Data Types
Register type addressing: Register with BCD (Binary Coded Decimal) coding
▪ Nibble – 4 bit (Unsigned integers: 15)
▪ OCTAL – 8 bit (Unsigned integers: 255)
▪ Decimal – 10 bit (Unsigned integers: 1023) (2n – 1)
▪ Hex. Decimal – 16 bit (Unsigned integers: 65535)

PLC Data Types:

Bool M0.0 0–1


Byte MB0 8 bit
Int MW0 16 bit (2 byte)
Word MW0 16 bit (2 byte)
Dword MD0 32 bit (2 Word / 4 byte)
Real MD0 32 bit (2 Word / 4 byte)

[Link] or [Link]
Below are the available basic data types:
Types Description Values Prefixes

BOOL Boolean (bit) FALSE or TRUE – Stored in 1 byte

SINT Small signed integer in 8 bits -128 to +127 SINT#

USINT Small unsigned integer in 8 bits 0 to +255 USINT#

BYTE Same as USINT

INT Signed integer in 16 bits -32768 to +32767 INT#

UINT Unsigned integer in 16 bits 0 to +65535 UINT#

WORD Same as UINT

DINT Signed double precision in 32 bits -2147483648 to +2147483647

UDINT Unsigned integer in 32 bits 0 to +4294967295 UDINT#

DWORD Same as UDINT [Link] or [Link]


LINT Long signed integer in 64 bits LINT#

ULINT Long unsigned integer in 64 bits ULINT#

LWORD Same as ULINT

Single precision floating point stored in 32 bits -3.4E38 to 3.4E38 and -3.4E-38 to 3.4E-38 (6 to 7 LREAL# ++
REAL ++
significant digits of accuracy)
Single precision floating point stored in 64 bits -1.7E308 to 1.7E308 and -1.7E-308 to 1.7E-308 (14 to LREAL#
LREAL ++
15 significant digits of accuracy)

TIME Time data types is used to specify a time variable- accuracy is 1ms. 0ms to 24h T# OR TIME#

STRING Variable length string with declared maximum length, Each character is store on 1 byte Maximum length cannot exceed 255 characters
Programmable Logic Controller
(PLC Programming With TIA Portal)
S7- 1200 CPU 1211C DC/DC/DC

[Link] or [Link]
Fanuc Manual Pulse Generator
Manual pulse generators are typically rotating knobs that generate electrical pulses. They are normally associated
with computer numerically controlled (CNC) machinery or other devices involving positioning. When the pulse
generator sends an electrical pulse to an equipment controller, the controller then moves a piece of equipment a
predetermined distance with every pulse.

[Link] or [Link]
[Link] or [Link]
Programmable Logic Controller
(PLC Programming With TIA Portal)
S7- 1200 CPU 1211C DC/DC/DC

[Link] or [Link]
Understanding Fundamentals of Analog Inputs

[Link] or [Link]
Analog Scaling

[Link] or [Link]

You might also like