01 - S7-1200 Training With TIA Portal V15 PDF

Download as pdf or txt
Download as pdf or txt
You are on page 1of 308

TIA-MICRO1

6,75$,1
7UDLQLQJIRU,QGXVWU\
SIMATIC S7-1200 basic course

VLHPHQVFRPVLWUDLQ
1 System Overview

2 Training Unit

3 TIA Portal - Introduction

SITRAIN
Training for Industry 4

D I A
Devices and Networks

I N
SIMATIC S7-
S7-1200 basic course
A I N 5 PLC Tags

IT R
Course TIA-MICRO1
6 Programming Blocks

S 7 Binary Operations

8 Digital Operations

D I A
Functions and Function Blocks

I N
N
Name: 10 Introduction to HMI

Course from: to:

A I
Trainer:

IT R 11 Suggested Solutions

S
Training site:

12 Training and Support


This document was produced for training purposes.
SIEMENS assumes no responsibility for its contents. The
reproduction, transmission, communication or use exploitation
of this document or its contents is not permitted without
express written consent authority. Offenders will be liable to
damages. Non-compliances with this prohibition make the 13
offender inter alia liable for damages.

Copyright © Siemens AG 2018. All rights, including


particularly the rights created by to file a by patent and/or
other industrial property right application and/or cause the
patent and/or other industrial property right to be granted 14
grant or registration of a utility model or design, are reserved.

SITRAIN courses on the internet: www.siemens.com/sitrain


15
Course folder Version: V15.00.00 (for STEP 7 V15)
SIMATIC TIA-MICRO1

Contents 1
1.
I A
System Overview .................................................................................................... 1-2
1.1.

D
SIMATIC S7 Overview .......................................................................................................... 1-3
1.2.
1.3.
I N
TIA Portal Information Center ............................................................................................... 1-4
Overview Controller .............................................................................................................. 1-5
1.3.1.
1.4.
1.4.1.
1.4.2.
N
Positioning the Modular S7 Controllers ................................................................................ 1-6

I
Overview: Available Modules ................................................................................................ 1-7

A
Central Modules .................................................................................................................... 1-7
Signal Modules (Central) ...................................................................................................... 1-8
1.5.
1.5.1.
1.5.2.

IT R
SIMATIC S7-1200: The Modular Mini-PLC........................................................................... 1-9
SIMATIC S7-1200: Modules ............................................................................................... 1-10
SIMATIC S7-1200: Installation and Mounting Positions ..................................................... 1-11

S
1.5.3.
1.6.
1.6.1.
1.7.
1.8.
SIMATIC S7-1200: Signal, Communication or Battery Board ............................................ 1-12
SIMATIC S7-1500: Modular Controller for the Mid to Upper Performance Range............. 1-13
SIMATIC S7-1500: Modules ............................................................................................... 1-14
SIMATIC S7-1200/1500: Memory Card(s) .......................................................................... 1-16
Additional Information ......................................................................................................... 1-17
1.8.1. ET200SP and ET200pro Controller .................................................................................... 1-18
1.8.2. Software Controller ............................................................................................................. 1-19

A
1.8.3. ET200SP Open Controller “All in one” ................................................................................ 1-20
1.8.4.
1.8.4.1.
1.8.5.
1.8.5.1.

D I
SIMATIC S7-300: Modular Automation System ................................................................. 1-21
SIMATIC S7-300: Modules ................................................................................................. 1-22
SIMATIC S7-400: Modular Automation System ................................................................. 1-23
SIMATIC S7-400: Modules ................................................................................................. 1-24

I N
A I N
IT R
S
TIA-MICRO1 - System Overview
Training Document, V15.00.00 1-1
SIMATIC TIA MICRO 1

1. System Overview

At the end of the chapter the participant will ...

...

...
I A
be familiar with the concept of “Totally Integrated Automation” (T.I.A.)

D
be familiar with the TIA Portal Information Center

...

...

I N
have an overview of the available modules

have an overview of the new SIMATIC S7-1200/1500 system family

...

I N
know the S7-300 and S7-400 automation systems

A
IT R
S
D I A
I N
A I N
IT R
S
TIA-MICRO1 - System Overview
1-2 Training Document, V15.00.00
SIMATIC TIA-MICRO1

1.1. SIMATIC S7 Overview

SIMATIC HMI SIMATIC PG SIMATIC Software


SIMATIC PC

SIMATIC NET

D I A
MPI - Network

IN
Industrial Ethernet/PROFINET
PROFIBUS
SIMATIC PC-based
SIMATIC

N
Controller
Controller

A I
IT R AS-Interface
PROFIBUS-DP
PROFINET

S
Introduction
For the operation of machines, equipment and processes in almost all areas of manufacturing
you require control elements in addition to energy supply. It must be possible to initiate, control,
monitor and end the operation of any given machine or process.

Hard-wired Programmed Controller  PLC

I A
In the hard-wired controllers of the past, the program logic was governed by the task-specific
wiring of contactors and relays.

D
Today, programmable logic controllers are used to solve automation tasks. The logic stored in the

I N
program memory of an automation system does not depend on equipment design and wiring and
can be modified at any time with the help of a programming device.

Totally Integrated Automation

I N
Production processes are no longer seen as individual partial processes, but rather as integral

A
components of an entire production process. The total integration of the entire automation
environment is today achieved with the help of:

IT R
one common software environment that integrates all components and tasks into one uniform
easy to use system

S •

a common data management (central database)
a common communication between all participating automation components.

TIA-MICRO1 - System Overview


Training Document, V15.00.00 1-3
SIMATIC TIA MICRO 1

1.2. TIA Portal Information Center

https://support.industry.siemens.com/cs/ww/en/view/65601780
Entry ID 65601780

D I A
I N
A I N
IT R
S By entering the Product/Article No. (Entry ID) 65601780, you arrive at the start page “TIA-Portal -
An Overview of the Most Important Documents and Links”.

Here you will find all important documents and links about the TIA Portal as well as the controllers
S7-1200 and S7-1500.

I A
In addition, you can get to the “TIA Portal Information Center”. Through it you can also get to all
important links and information.

D
I N
A I N
IT R
S
TIA-MICRO1 - System Overview
1-4 Training Document, V15.00.00
SIMATIC TIA-MICRO1

1.3. Overview Controller

Engineered with TIA Portal


System performance

Advanced Controller
Software
SIMATIC S7-1500
Controller

I
SIMATIC

D
S7-1500A
Distributed
Controller

I N
Basic Controller
SIMATIC S7-1200

A I N
SIMATIC
ET 200

IT R
S Application complexity

Depending on the complexity, different controllers from S7-1200 to S7-1500 can be used.

D I A
I N
A I N
IT R
S
TIA-MICRO1 - System Overview
Training Document, V15.00.00 1-5
SIMATIC TIA MICRO 1

1.3.1. Positioning the Modular S7 Controllers

TIA Portal

SIMATIC S7-400

I A
Advanced

SIMATIC S7-1500

SIMATIC S7-300
I N D
A I N
R
Basic

IT
SIMATIC S7-200
SIMATIC S7-1200

S
SIMATIC S7
The programmable logic controllers can be divided into the performance ranges Basic (S7-1200)
and Advanced (S7-1500).
The product range of the S7-1200 and S7-1500 will be expanded in the next few years.

D I A
I N
A I N
IT R
S
TIA-MICRO1 - System Overview
1-6 Training Document, V15.00.00
SIMATIC TIA-MICRO1

1.4. Overview: Available Modules

1.4.1. Central Modules

Standard
S7-1200 S7-1500 S7-300

D I A S7-400

Fail-safe
I N
Compact

A I N
High

IT R
availability

S
Technology
Different
functions
Different functions

T-CPU
T-CPU

More Information under the Link:


TIA Portal Information Center > Product information > Controllers

D I A
I N
A I N
IT R
S
TIA-MICRO1 - System Overview
Training Document, V15.00.00 1-7
SIMATIC TIA MICRO 1

1.4.2. Signal Modules (Central)

S7-1200 S7-1500 S7-300 S7-400

DI/DQ

D I A
AI/AQ

I N
F-DI/F-DQ

A I N
F-AI

IT R
S
More Information under the Link:
TIA Portal Information Center > Product information > Controllers

D I A
I N
A I N
IT R
S
TIA-MICRO1 - System Overview
1-8 Training Document, V15.00.00
SIMATIC TIA-MICRO1

1.5. SIMATIC S7-1200: The Modular Mini-PLC

D I A
I N
A I N
IT R
Features
S • Modular compact control system for the low-end performance range
• Scaled CPU range
• Extensive range of modules



Can be expanded to up to 11 modules (depending on the CPU)
Can be networked with PROFIBUS or PROFINET
Slot rules
D I A


I N
CM left of the CPU (number depends on the CPU)
SM right of the CPU (number depends on the CPU)



I
integrated digital and analog I/O

A
an expansion with signal board N
"Total package" with CPU and I/O in one device

IT R
"Micro PLC" with integrated functions

S
TIA-MICRO1 - System Overview
Training Document, V15.00.00 1-9
SIMATIC TIA MICRO 1

1.5.1. SIMATIC S7-1200: Modules

Communication module(s) Signal module(s)


(max. 3 depending on CPU) (max. 8 depending on
CPU)

D I A
I N
CM/CP
CPU

A I N
DI, DQ, DI/DQ, AI, AQ, AI/AQ
...

IT R
- Point-to-Point
(RS232, RS485)
- PROFIBUS
- ASi
Optional signal,
communication
- DI, DQ, DI/DQ
- AI, AQ, AI/AQ
- Point-to-Point (RS485)

S
Slot Rules

- GPRS or battery board

CM left of the CPU (number depends on the CPU)


- Battery backup of real-time clock

• Signal modules (digital, analog) right of the CPU (number depends on the CPU)

Signal Modules


Digital input, output or mixed modules (24VDC, relay)

D I A
Analog input, output or mixed modules (voltage, current, resistance, thermocouple)

I N
Communication Modules (CM - Communication Module, CP - Communication Processor)
Point-to-point connection (RS232, RS485)



PROFIBUS
ASi-Master

A I
Telecontrol (GPRS functionality) N
Expansion Board

IT R
The CPU can be expanded with a signal board for additional onboard I/O or with a

S communication board.
Alternatively a battery board can be added to provide a long-term battery backup of the CPU real-
time clock.

TIA-MICRO1 - System Overview


1-10 Training Document, V15.00.00
SIMATIC TIA-MICRO1

1.5.2. SIMATIC S7-1200: Installation and Mounting Positions

D I A
Standard
I N
N
mounting rail Bus
Busverbinder
connector

A I 1x expansion cable
Vertical

Horizontal

IT R
S
Installation
Alternative attachment

The modules are mounted on a standard mounting rail or alternatively screwed into the control
cabinet.

A
S7-1200 Expansion Cable

• Either between the CPU and the first SM or between two SMs

D I
It offers additional flexibility in configuring the S7-1200 system. One expansion cable can be used
for each CPU system.

I N
N
Bus Connector

A I
It is located as a mechanical slide on the left side of each SM module.
It is mechanically attached on the right side of each CMs/CP.

IT
Mounting Positions
R
S
A horizontal or vertical mounting is possible.
Caution!
With a vertical mounting, the maximum allowed ambient temperature is 10 °C lower.

TIA-MICRO1 - System Overview


Training Document, V15.00.00 1-11
SIMATIC TIA MICRO 1

1.5.3. SIMATIC S7-1200: Signal, Communication or Battery Board

D I A
I N
A I N
IT R
Available boards:
● analog, digital

S
● RS485
● battery

Application
These boards are used for application-specific adaptation of the CPU to the requirements of the
plant. The physical size of the CPU remains unchanged.

Signal Board (SB)


• Digital signal board
− only inputs
− only outputs

D I A
− inputs and outputs
• Analog signal board
− only inputs
I N
− only outputs

Communication Board (CB)

A I N
Battery Board (BB)

IT R
• RS485 interface

S A battery board (housing for CR1025 battery) provides long-term battery backup for the CPU's
real-time clock.
• Backup time without battery board typically 20 days / minimum 12 days at 40°C
• Backup time with battery board approximately 1 year

TIA-MICRO1 - System Overview


1-12 Training Document, V15.00.00
SIMATIC TIA-MICRO1

1.6. SIMATIC S7-1500: Modular Controller


for the Mid to Upper Performance Range

D I A
I N
A I N
IT R
S
Highlights of the SIMATIC S7-1500 System

• Highest performance of the entire system (terminal-terminal)


− High performance program execution in the CPU
− High performance backplane bus
− PROFINET interface with PROFINET IO IRT on every CPU

D I A
IO channel

I N
− Automatically activated system diagnostics, right down to the

• Trace for all CPU tags

A I N

IT R
CPU - Display for:
− Access to MLFB, FW version and serial number

S − Commissioning (e.g. Setting the IP address, station name)


− Backup/Restore
− Diagnostics

• Simplified programming through user-friendly new


instructions in LAD/FBD/STL

TIA-MICRO1 - System Overview


Training Document, V15.00.00 1-13
SIMATIC TIA MICRO 1

1.6.1. SIMATIC S7-1500: Modules

Single-tier assembly max. 32 central modules in rack


Multi-tier distributed ET200MP

D I A
I N ...

PS/PM
(optional)

A
CPU
I DI, DQ,
AI, AQ N PS
new power
TM:
- Counting
- Position sensing

IT R CM/CP:
segment
- Point-to-Point
(RS232, RS485)
- PROFIBUS
max. 2 per rack
for backplane bus supply of
subsequent I/O modules

S
Slot Rules
• 1x PS/PM Slot 0
- PROFINET

• 1x CPU in Slot 1
• As of Slot 2 any

Signal Modules
• Digital input modules: 24VDC, 230VAC

D I A
N
• Digital output modules: 24VDC, 230VAC


Analog input modules:
Analog output modules:

N I
voltage, current, resistance, thermocouple
voltage, current

A I
Communication Modules (CP - Communication Processor, CM - Communication Module)
Point-to-Point connection

IT R
PROFIBUS
PROFINET

S CPs and CMs are both communication modules.


CPs have, as a rule, somewhat more functionality than CMs (e.g. own web server,
firewall, or the like).

Technology Modules (TM - Technology Module)


• Counting
• Position sensing

TIA-MICRO1 - System Overview


1-14 Training Document, V15.00.00
SIMATIC TIA-MICRO1

Power Supply
I/O modules in the central rack of the S7-1500 require a system power supply via the backplane
bus (communication connection to the CPU) and a load power supply (input or output circuits for
sensors/encoders and actuators).
• PM - Power Module → Load Power Supply
supplies modules with 24VDC for input and output circuits as well as sensors/encoders and
actuators

I A
If the CPU is supplied 24V via a load power supply (PM), it supplies the system power
supply of 12W for the first inserted I/O modules.

D
N
• PS - Power System → System Power Supply

I
supplies S7-1500 modules in the central rack via the backplane bus
Each CPU offers a system power supply of 12W for the first inserted I/O modules.

N
Depending on the I/O modules used, further power segments have to be set up, as
required.

A I
A system power supply (PS) can also supply the load circuit for 24VDC modules in
addition to the CPU.

IT R
Power Supply and Power Segments of the I/O Modules
It is necessary to set up power segments in the central rack for larger configurations or

S configurations with greater I/O module power requirements (as a rule, when using CP, CM, TM).
A maximum of 3 power segments can be set up per rack (1xCPU segment plus 2 more).
If the configuration includes additional power segments, additional system power supply modules
(PS) are inserted to the right next to the CPU. The CPU continues to control all modules of the
rack. Only the system power supply of the I/O modules is subdivided here.

Example of a Small S7-1500 Configuration

D I A
I N
I N
Example of an S7-1500 Configuration with a 2nd. Power Segment

A
IT R
S
Interface Modules for Expansion Rack
There are no plans for a central multi-tier assembly. An expansion can be realized using the
distributed ET200MP I/O system.

TIA-MICRO1 - System Overview


Training Document, V15.00.00 1-15
SIMATIC TIA MICRO 1

1.7. SIMATIC S7-1200/1500: Memory Card(s)

1 Serial number of the SMC card


2 Product version
3 Order number
4 Card size
5

written with:
● Commercially available SD card reader
● Field PG
D I A
Slide switch for write-protect (must not be write-protected)

SIMATIC Memory Card in the S7-1200:


I N SIMATIC Memory Card in the S7-1500:




External load memory
Distribution of programs
Firmware update

A I N ●


Load memory
Firmware update
Documentation


IT R
Documentation
Memory Card Binding
Unlinked DBs



Memory Card Binding
Unlinked DBs
Archiving of data

S Module exchange without PG

Memory Card Binding – Copy Protection


● Module exchange without PG

The executability of the program can be bound to the serial number of the card.

Load Memory


S7-1500

I A
This has no integrated load memory and therefore it is imperative that a card is inserted.
S7-1200

D
This has an integrated load memory. Here, an inserted memory card can replace (expand)

programs).

I N
the integrated load memory or the card can be used for program updates (distribution of

Distribution of Programs ← only S7-1200

I N
The use as Transfer card (card mode = "Transfer") is only supported by the S7-1200. Here, a

A
program can be downloaded into the CPU without a PG if a card is inserted.

IT R
Archiving of Data ← only S7-1500
It is possible to archive process values on the card.

S The use of this functionality influences the operating life of the Memory Card

TIA-MICRO1 - System Overview


1-16 Training Document, V15.00.00
SIMATIC TIA-MICRO1

1.8. Additional Information

D I A
I N
A I N
IT R
S
D I A
I N
A I N
IT R
S
TIA-MICRO1 - System Overview
Training Document, V15.00.00 1-17
SIMATIC TIA MICRO 1

1.8.1. ET200SP and ET200pro Controller

• SIMATIC S7-1500 with the design


of a SIMATIC ET 200SP or
ET200pro

D I A
for machines with distributed
architecture and serial machines

I N •
with limited space

Transfer of the intelligence from

A I N the central control cabinet to


Distributed Controller

IT R • Available in standard and fail-


safe version

S
Further Information under the Link:
TIA Portal Information Center > Product information > Controllers > SIMATIC controllers in
general > Distributed Controllers

D I A
I N
A I N
IT R
S
TIA-MICRO1 - System Overview
1-18 Training Document, V15.00.00
SIMATIC TIA-MICRO1

1.8.2. Software Controller

• Use with industry-suitable SIMATIC IPCs

A
• Runs completely independently of the
Windows system (even with restart or
failure of Windows)

D I
• Flexible controller for special-purpose
machines with high performance and
functional requirements
I N

open interfaces

A I N
Integration of user-specific functions via

R
(for example C++ / Matlab)

IT
S
Further Information under the Link:
TIA Portal Information Center > Product information > PC-Based Automation > SIMATIC
Software Controller

D I A
I N
A I N
IT R
S
TIA-MICRO1 - System Overview
Training Document, V15.00.00 1-19
SIMATIC TIA MICRO 1

1.8.3. ET200SP Open Controller “All in one”

D I A
I N
A I N


IT R
- Controller with central, modular I/Os
- Visualization and Windows applications
- PC interfaces for monitor, mouse and keyboard

S • - Gigabit Ethernet

Further Information under the Link:


TIA Portal Information Center > First steps > Getting Started > SIMATIC Open Controller -
Getting Started

D I A
I N
A I N
IT R
S
TIA-MICRO1 - System Overview
1-20 Training Document, V15.00.00
SIMATIC TIA-MICRO1

1.8.4. SIMATIC S7-300: Modular Automation System

D I A
I N
A I N
IT R
S
Features
• Modular compact control system for the lower and middle performance range
• Scaled CPU range
• Extensive range of modules



Can be expanded to up to 32 modules
Backplane bus integrated in the modules
Can be networked with

D I A
the Multipoint Interface (MPI),
PROFIBUS or

I N
N
Industrial Ethernet or


PROFINET

A I
Central PG/PC connection with access to all modules

IT R
No slot rules for I/O modules.

S
TIA-MICRO1 - System Overview
Training Document, V15.00.00 1-21
SIMATIC TIA MICRO 1

1.8.4.1. SIMATIC S7-300: Modules

D I A
I N
PS
(optional)
CPU

A
IM
I N
SM: SM: SM: SM:
(optional) DI DO DI/DO AI
SM:
AO
CP:
- Point-to-Point
FM:
- Counting

IT R - PROFIBUS
- Industrial Ethernet
- PROFINET
- Positioning
- Closed-loop
control

S
Signal Modules (SM)
• Digital input modules: 24VDC, 120/230V AC
• Digital output modules: 24VDC, Relay
• Analog input modules: Voltage, Current, Resistance, Thermocouple
• Analog output modules:

Interface Modules (IM)


Voltage, Current

D
The IM360/IM361 and IM365 make multi-tier configurations possible.I A
Dummy Modules (DM)
I N
The interface modules loop the bus from one tier to the next.

I N
The DM 370 dummy module reserves a slot for a signal module whose parameters have not yet
been assigned. A dummy module can also be used to reserve a slot for installation of an interface
module at a later date.

A

IT R
Function Modules (FM)
Counting

S •

Positioning
Closed-loop control.

Communication Processors (CP)


• Point-to-Point connections
• PROFIBUS
• Industrial Ethernet
• PROFINET.

TIA-MICRO1 - System Overview


1-22 Training Document, V15.00.00
SIMATIC TIA-MICRO1

1.8.5. SIMATIC S7-400: Modular Automation System

D I A
I N
A I N
IT R
S
Features
• The power PLC for the mid to upper performance range,
• Scaled CPU range
• Extensive range of modules



Can be expanded to over 300 modules,
Backplane bus integrated in the mounting rack
can be networked with

D I A
The Multipoint Interface (MPI),
PROFIBUS or

I N
N
Industrial Ethernet or


PROFINET

A I
Central PG/PC connection with access to all modules,

IT R
Only a few slot rules,
Multicomputing (up to four CPUs can be used in the central rack).

S
TIA-MICRO1 - System Overview
Training Document, V15.00.00 1-23
SIMATIC TIA MICRO 1

1.8.5.1. SIMATIC S7-400: Modules

D I A
I N
A I N
IT R PS CPU SM SM SM SM CP SM FM IM

S
Signal Modules (SM)

DI DO AI AO

Digital input modules: 24VDC, 120/230VAC


• Digital output modules: 24VDC, Relay
• Analog input modules: Voltage, Current, Resistance, Thermocouple
• Analog output modules: Voltage, Current.

Interface Modules (IM)

D I A
The IM460, IM461, IM463, IM467 interface modules provide the connection between various
racks:

I N
UR1 (Universal Rack) with up to 18 modules


• I N
UR2 (Universal Rack) with up to 9 modules
ER1 (Extension Rack) with up to 18 modules

A
ER2 (Extension Rack) with up to 9 modules.

IT R
Function Modules (FM)
• Counting

S •

Positioning
Closed-loop control.

Communication Processors (CP)


• Point-to-Point connections
• PROFIBUS
• Industrial Ethernet
• PROFINET.

TIA-MICRO1 - System Overview


1-24 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

Contents 2
D I A
2.
I N
Training Area Setup with S7-1200 ......................................................................... 2-2
2.1.
2.2.
I N
Configuration of the S7-1200 Training Device ...................................................................... 2-3

A
Simulator Setup..................................................................................................................... 2-4

R
2.3. Conveyor Model Setup ......................................................................................................... 2-5

IT
2.4. Training Area as Plant with Distribution Conveyor and Touchpanel .................................... 2-6

S
D I A
I N
A I N
IT R
S
TIA-MICRO1 - Training Devices
Training Document V15.00.00 2-1
SIMATIC S7-1200 Basic Course

2. Training Area Setup with S7-1200

D I A
I N
A I N
IT R
S
Components of the Training Area with S7-1200
The training area for this course contains the following components:
• SIMATIC Field PG
• Training case with S7-1200, simulator and touchpanel
• Conveyor model

D I A
I N
A I N
IT R
S
TIA-MICRO1 - Training Devices
2-2 Training Document V15.00.00
SIMATIC S7-1200 Basic Course

2.1. Configuration of the S7-1200 Training Device

PM CSM CPU 1214 AI4/AO2 DI8/DO8

D I A
I N
A I N
IT R
Modules
S The module addresses shown in the picture will be assigned in the chapter "Devices and
networks".

D I A
I N
A I N
IT R
S
TIA-MICRO1 - Training Devices
Training Document V15.00.00 2-3
SIMATIC S7-1200 Basic Course

2.2. Simulator Setup

4711

DI 0V

A
I 0.0 S_Operat.ON

I
I 0.1 S_Operat.OFF -10V +10V
(NC) Poti
I 0.2 S_Right
I 0.3 S_Left

P_Operation
DO

Q 4.1

I N D
N
I 0.7 S_Ackn. P_Fault Q 4.3

I 1.1
I 1.2
S_Fault1 P_Fault1
S_Fault2 P_Fault2

A I Q 4.6
Q 4.6
I 1.3

IT R S_Fault3 P_Fault3 Q 4.7

S
Simulator Setup:
Together with the touchpanel, the simulator is used to operate the plant. It contains the following
components:
• 14 switches, whereby the switch "S_OperationOFF" (I 0.1) is an NC contact



10 LEDs
Potentiometers for specifying or simulating analog input signals
Voltmeter for displaying the voltage set on the potentiometer
D I A
Addressing

I N
N
For the addressing shown in the picture, the relevant address settings must be made in the
device configuration.

A I
IT R
S
TIA-MICRO1 - Training Devices
2-4 Training Document V15.00.00
SIMATIC S7-1200 Basic Course

2.3. Conveyor Model Setup

"Horn"
(Q 8.7)
"B_Bay1" "B_Bay2" "B_Bay3" "B_BayLB"
(I 8.5) (I 8.6)

A
(I 8.7) (I 8.0)

"K_Left" (Q 8.6)

D I
"K_Right" (Q 8.5)

I N
A I N
IT R "S_Bay1"
(I 8.1)
"P_Bay1"
"S_Bay2"
(I 8.2)
"P_Bay2"
"S_Bay3"
(I 8.3)
"P_Bay3"
"S_BayLB"
(I 8.4)
"P_BayLB"

S
(Q 8.1) (Q 8.2) (Q 8.3) (Q 8.4)

Setup
The picture shows the sensors and actuators of the conveyor model as well as the I/O addresses
to which they are connected.

D I A
I N
A I N
IT R
S
TIA-MICRO1 - Training Devices
Training Document V15.00.00 2-5
SIMATIC S7-1200 Basic Course

2.4. Training Area as Plant with Distribution Conveyor and


Touchpanel

DI 0V
I 0.0 S_Operat.ON
I 0.1 S_Operat.OFF -10V +10V
(NC) Poti

A
I 0.2 S_Right

I
I 0.3 S_Left
DO
PN

I N D
I 0.7 S_Ackn.
P_Operation

P_Fault
Q 4.1

Q 4.3

N
I 1.1 S_Fault1 P_Fault1 Q 4.6

A I I 1.2
I 1.3
S_Fault2 P_Fault2
S_Fault3 P_Fault3
Q 4.6
Q 4.7

IT R AI / AO DI/ DO

S
Industrial
Ethernet

The Training Area as Plant with Distribution Conveyor and Touchpanel


The distribution conveyor is used to transport parts and can be operated in two different operating
modes:
• When "P_Operation" (Q4.0) is switched off...

I A
the conveyor motor can be jogged to the right and left. For now, the simulator switches are to be
used for this, later, the associated buttons on the touchpanel.

D

I N
When "P_Operation" (Q4.0) is switched on...

N
parts are transported on the conveyor model from Bay 1 or 2 until they are through the light

I
barrier. If a transport sequence takes longer than 6 seconds, the conveyor motor is automatically

A
switched off and the fault is displayed on the simulator as well as on the touchpanel. Only after
the fault is acknowledged with the simulator switch or on the touchpanel, can a new transport

IT R
sequence be started.
All parts that pass the light barrier when "P_Operation" is switched on are counted. When the
ACTUAL number of transported parts reaches the SETPOINT quantity (which can be preset on

S the touchpanel) it is indicated on the conveyor model LED of the light barrier bay. Only after the
message is acknowledged with the associated bay pushbutton, can a new transport sequence be
started.
The indicator lights at Bays 1 and 2 show continuous light when a new part can be placed on the
conveyor (conveyor motor is stopped and both proximity sensors are free); 1Hz flashing light at
the Bay at which a part is detected by the associated proximity sensor, however, only as long as
the conveyor has not yet been started (if parts are placed on the conveyor at both proximity
sensors, no indicator lights are to light up); 2Hz flashing light as long as the conveyor motor is
running.
The indicator light at the Light Barrier Bay shows 2Hz flashing light as long as the conveyor motor
is running and continuous light when the SETPOINT quantity has been reached.

TIA-MICRO1 - Training Devices


2-6 Training Document V15.00.00
SIMATIC S7-1200 Basic Course

Contents 3
3.
3.1.
3.2.
D I A
Engineering Software TIA Portal ........................................................................... 3-2
Product Lifecycle Management............................................................................................. 3-3
Digital Enterprise Suite -> Answer to Industry 4.0 ................................................................ 3-4
3.3.
3.4.
I N
TIA Portal - Central Engineering Framework ........................................................................ 3-5
Scope of the Products........................................................................................................... 3-6
3.4.1.
3.4.1.1.
3.4.2.
3.4.2.1.
N
STEP 7 Range of Products ................................................................................................... 3-7

I
STEP 7 Licensing ................................................................................................................. 3-8

A
WinCC Range of Products .................................................................................................... 3-9
WinCC Licensing ................................................................................................................ 3-10
3.4.3.
3.5.
3.5.1.

IT R
Startdrive Range of Products and Licensing ...................................................................... 3-11
Automation License Manager ............................................................................................. 3-12
Operating Systems for PC/PGs .......................................................................................... 3-13

S3.5.2.
3.5.3.
3.6.
3.6.1.
3.6.2.
3.6.3.
Virtualization (Released Software)...................................................................................... 3-14
Side-by-Side Installation ..................................................................................................... 3-15
TIA Portal: Portal View and Project View ............................................................................ 3-16
Portal View .......................................................................................................................... 3-17
Project View ........................................................................................................................ 3-18
Menu Bar and Toolbar ........................................................................................................ 3-19
3.6.4. Project Tree (First Level) .................................................................................................... 3-20
3.6.4.1. Project Tree (Second Level) ............................................................................................... 3-21

A
3.6.5. Task Cards .......................................................................................................................... 3-22

I
3.6.6. Inspector Window ............................................................................................................... 3-23
3.7. Window Arrangement ......................................................................................................... 3-24
3.7.1.
3.7.2.
3.7.3.
3.8.
D
Splitting and Arrangement of the Working Area ................................................................. 3-25

N
Keeping the Editor Window in the Foreground (when Editor Space is Split) ..................... 3-26

I
Save / Manage / Use Window Layouts ............................................................................... 3-27
Undo and Redo ................................................................................................................... 3-28
3.9.
3.9.1.
3.10.
I N
Saving a Project .................................................................................................................. 3-29
Archiving / Retrieving a Project ........................................................................................... 3-30

A
TIA Portal - Settings: User Interface Language .................................................................. 3-31
3.10.1.
3.11.
3.12.

IT R
TIA Portal - Settings: Language, Storage Location, Layout ............................................... 3-32
Libraries .............................................................................................................................. 3-33
Help ..................................................................................................................................... 3-34

S3.12.1.
3.13.
3.13.1.
3.13.2.
3.13.2.1.
Help (Information System) .................................................................................................. 3-35
Additional Information ......................................................................................................... 3-36
Keyboard Shortcuts of the TIA Portal ................................................................................. 3-37
Project Migration ................................................................................................................. 3-38
Migration of STEP7 V5.x – Projects: Supported Hardware ................................................ 3-39
3.13.3. Installation with Record Function in the Setup.................................................................... 3-40
3.13.4. Update Tool......................................................................................................................... 3-41

TIA-MICRO1 - Engineering Software


Training Document, V15.00.00 3-1
SIMATIC S7-1200 Basic Course

3. Engineering Software TIA Portal

At the end of the chapter the participant will ...

...

... I A
have an overview of the scope of the engineering framework

D
be familiar with the engineering products and their range of

...
products

I N
be familiar with the operator interface of the framework

A I
...

N
be able to upload a program existing online

IT R
S
D I A
I N
A I N
IT R
S
TIA-MICRO1 - Engineering Software
3-2 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

3.1. Product Lifecycle Management

D I A
I N
A I N
IT R
S
Product- Lifecycle
Products and processes are becoming more and more complex. Siemens offers solutions for the
Product Lifecycle Management (PLM) for all areas from concept development right up to the end
of product life and which make it possible to successfully develop products, produce them and
bring them to market.

A
Siemens’ holistic approach is to transform a traditional value-added chain into an integrated

I
product and production lifecycle - starting with the product design, through the production

D
planning, the manufacturing technology right up to production and services.
Only a fully digitalized business model can offer the strength and flexibility to accelerate

I N
processes and to optimize production processes.
This also includes a common data storage and data management system. With “Teamcenter”,

N
Siemens offers the industry-leading platform for interplay in all steps of the value-added chain –
the “data backbone”.

A I
In the holistic value-added chain, the cloud-based open IoT-ecosystem “MindSphere” can be
found.

IT R
S
TIA-MICRO1 - Engineering Software
Training Document, V15.00.00 3-3
SIMATIC S7-1200 Basic Course

3.2. Digital Enterprise Suite -> Answer to Industry 4.0

TIA Portal

D I A
I N
A I N
IT R
S
TIA Portal – your gateway to automation in the Digital Enterprise
The Totally Integrated Automation Portal (TIA Portal) provides you with unrestricted access to our
complete range of digitalized automation services, from digital planning and integrated
engineering to transparent operation.
The new version shortens your time to market, for example by means of simulation tools,

A
increases the productivity of your plant through additional diagnostics and energy management

I
functions, and offers you broader flexibility by connecting to the management level. The new

D
options benefit system integrators and machine builders as well as plant operators.
The TIA Portal is thus your perfect gateway to automation in the Digital Enterprise. As part of the

I N
Digital Enterprise Suite along with PLM and MES, it complements the comprehensive range of
offerings from Siemens for companies on their path to Industrie 4.0.

A I N
IT R
S
TIA-MICRO1 - Engineering Software
3-4 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

3.3. TIA Portal - Central Engineering Framework

The Totally Integrated Automation Portal is the Engineering Framework


that is, it forms the framework for a consistent engineering for…
• …programming automation systems

A
• …visualizing processes

Siemens Totally Integrated Automation Portal

D
Totally Integrated Automation Portal I
STEP 7
I N
A I N
Safety
WinCC Startdrive

IT R SIMATIC
Controller Safety SIMATIC HMI SINAMICS
...

S Stand-alone software packages are limited because they lack consistency and integration.
It takes a common working environment - that is, an engineering framework - to achieve full
integration and consistency of individual products.

Advantages of a Central Engineering Framework



(for example configuration, communication, diagnostics)
Automatic data and project consistency

D I A
Uniform operator control concept for all automation tasks with common services

I N
Powerful libraries covering all automation objects

The Most Important Engineering Products are:



SIMATIC STEP 7
for PLC programming
SIMATIC Safety

A I N

R
for programming fail-safe PLCs

IT
SIMATIC HMI
for configuring process visualization

S • Startdrive
for parameterizing drives

TIA-MICRO1 - Engineering Software


Training Document, V15.00.00 3-5
SIMATIC S7-1200 Basic Course

3.4. Scope of the Products

SIMATIC STEP 7 SIMATIC WinCC SINAMIC Startdrive

Configuration/Programming Machine-level operator control/monitor. Integration of


of controllers As well as process visualization drives

S7-1500

WinAC
SCADA

D I A G120
Uxxx-2 ≥V4.4

N
Professional
Professional

PC Single station

Startdrive
S7-400

S7-300

N I
Comfort

Advanced
Comfort Panels
and x77 and Mobiles
G110M

I
(without Micro Panels)
CU240M ≥V4.6
Basic
Basic

S7-1200 Basic Panels

R
Communication
A
IT
 PROFIBUS, PROFINET, AS-i, IO-Link, Network topology
Shared Functions

S  System diagnostics, Import/Export to Excel, UnDo …

TIA Portal
The Totally Integrated Automation Portal constitutes the working environment for an integrated
engineering with SIMATIC STEP 7 V15 and SIMATIC WinCC V15.
• Central engineering framework
• Automatic data and project consistency
• Uniform operator control concept for all automation tasks
• Powerful libraries covering all automation objects

D I A
I N
A I N
IT R
S
TIA-MICRO1 - Engineering Software
3-6 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

3.4.1. STEP 7 Range of Products

STEP 7 Basic for S7-1200


SIMATIC STEP 7 ● LAD, FBD, SCL

STEP 7 Professional
WinAC

S7-1500

S7-400
Professional
A
for S7-1200, S7-1500, S7-300, S7-400, WinAC
● LAD, FBD, SCL

I
● STL, GRAPH for S7-1500 / 300 / 400 / WinAC
WinCC Basic is always part of STEP 7
D
S7-300

I N
Option packages
● STEP 7 Safety

N
● PID Professional for ET200CPU, S7-300 / 400 / WinAC
Basic

I
S7-1200 ● STEP 7 Easy Motion for ET200CPU / S7-300 / 400 / WinAC

Communication

R A
 PROFIBUS, PROFINET, AS-i, IO-Link, Network topology

IT
Shared Functions
 System diagnostics, Import/Export to Excel, UnDo …

S
D I A
I N
A I N
IT R
S
TIA-MICRO1 - Engineering Software
Training Document, V15.00.00 3-7
SIMATIC S7-1200 Basic Course

3.4.1.1. STEP 7 Licensing

Engineering System (ES)

S7-1200 S7-300 / S7-400 / S7-1500 / WinAC


(LAD, FBD, SCL) (LAD, FBD, STL, SCL, S7-GRAPH, PLCSIM)

STEP 7 Basic Single license

D I A ---

STEP 7 Professional

I N
Floating license

A I N
Upgrade license + generates Combo license
→ STEP 7 V5.4 (and higher)
and

R
→ STEP7 V1x Professional
parallel installation possible

S IT
SIMATIC Startdrive No license required

To program the controllers, only one license (engineering license) is required. The program does
not require any further licenses on the CPU (runtime license).

D I A
I N
A I N
IT R
S
TIA-MICRO1 - Engineering Software
3-8 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

3.4.2. WinCC Range of Products

SIMATIC WinCC
SIMATIC WinCC
for the machine-level area
Machine-level operator control/monitoring
 Functional range like WinCC flexible 2008 SP2
and process visualization (SCADA)
SIMATIC WinCC SCADA Functionalities
 Basic functionality like WinCC V7.0 SP3,
diverse RT options

D I A SCADA

Professional
 Mid-sized projects:

IN
PC Single station
Quantity structure up to 64k power tags

Advanced
Comfort Panels

Comfort
Expanded Functionalities and x77 and Mobiles

 F(x)-Control, OPC UA Client


Server, 3rd party driver

A I N Basic
Basic Panels

R
Communication
 PROFIBUS, PROFINET, AS-i, IO-Link, Network topology

S IT
Shared Functions
 System diagnostics, Import/Export to Excel, UnDo …

D I A
I N
A I N
IT R
S
TIA-MICRO1 - Engineering Software
Training Document, V15.00.00 3-9
SIMATIC S7-1200 Basic Course

3.4.2.1. WinCC Licensing

Engineering System (ES) Runtime (RT)

WinCC Basic --- (Component of STEP7)


Floating license --- (Component of the Panels)

WinCC Comfort Floating license


Upgrade license +
generates Combo license
→ WinCC flexible 2008 Standard
and → WinCC Comfort
---

D I A
(Component of the Panels)

N
parallel installation possible

WinCC Advanced Floating license

Upgrade license

N I +
Single license

Upgrade license →

A I
generates Combo license
→ WinCC flexible 2008 Advanced
and → WinCC Advanced
parallel installation possible

IT R
WinCC Professional Floating license
Upgrade license not available, since another
license model exists for WinCC V7 (and higher)
Single license
Upgrade license not available, since another
license model exists for WinCC V7 (and higher)

S
Parallel installation WinCC V7 with WinCC
Professional currently not yet possible

D I A
I N
A I N
IT R
S
TIA-MICRO1 - Engineering Software
3-10 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

3.4.3. Startdrive Range of Products and Licensing

SINAMICS Startdrive Functions:


● Parameterize drive
Integration of drives ● Commission drive
● Test drive
G120

I A
Startdrive

CUxxx and CUxxxX-2 ≥V4.4 Supported product lines :

Communication
CU240M
G110M
G110M
CU240M ≥V4.6
≥V4.6

I N
● SINAMICS G110M
D
● SINAMICS G120-series

Shared Functions

A N
 PROFIBUS, PROFINET, AS-i, IO-Link, Network topology

I
 System diagnostics, Import/Export to Excel, UnDo …

IT R No additional license required STEP 7 Professional

S
D I A
I N
A I N
IT R
S
TIA-MICRO1 - Engineering Software
Training Document, V15.00.00 3-11
SIMATIC S7-1200 Basic Course

3.5. Automation License Manager

D I A
I N
A I N
IT R
The software for managing, controlling as well as the acquisition of new licenses.

S The Automation License Manager is part of the SIMATIC Software Installation and organizes the
licensing of the SIMATIC software.

D I A
I N
A I N
IT R
S
TIA-MICRO1 - Engineering Software
3-12 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

3.5.1. Operating Systems for PC/PGs


Engineering Software

STEP 7 V15 Basic/Professional

WinCC V15 Basic/Comfort/Advanced/Professional

Safety V15

Startdrive V15

D I A
I N
64bit
Operating System

Windows 7 SP1

A I N
Windows 8.1 Professional / Windows Server 2008 R2 SP1

IT R
up V14 SP1
Enterprise

Windows 10
Windows Server 2012 R2

S
D I A
I N
A I N
IT R
S
TIA-MICRO1 - Engineering Software
Training Document, V15.00.00 3-13
SIMATIC S7-1200 Basic Course

3.5.2. Virtualization (Released Software)

Released Virtualization Software Released TIA Portal V15 Versions

VMware Player PRO 7.0 STEP 7 Basic/Professional V15

VMware Workstation 11

A
WinCC Basic/Comfort/Advanced/Professional V15
VMware vSphere Hypervisor ESX(i) 5. 5 Update 2

Microsoft Windows Server 2012 R2 Hyper-V


I
Startdrive V15, Safety Advanced

D
VMware vSphere Hypervisor ESX(i) 5.5 Update 2

I N WinCC Runtime Advanced V15

Microsoft Windows Server 2012 R2 Hyper-V

Host Operating Systems

A I N WinCC Runtime Professional V15

Guest Operating Systems

IT R
• Windows 7 SP1 64-Bit (Prof. / Ultimate / Enterprise)
• Windows 8.1 64-Bit (Professional / Enterprise)
• Windows Server 2008 RS2 SP1
• Windows 7 SP1 64-Bit (Prof. / Ultimate / Enterprise)
• Windows 8.1 64-Bit (Professional / Enterprise)
• MS Server 2008 RS2 SP1

S
• Windows Server 2012 R2 • MS Server 2012 RS

D I A
I N
A I N
IT R
S
TIA-MICRO1 - Engineering Software
3-14 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

3.5.3. Side-by-Side Installation

TIA-Portal V15 and V14 can be


installed on one and the same
PG/PC

D A
V15 requires 64bit system

I
The Compatibility Tool
is available as an aid for checking

I N parallel installations, see:

A I N TIA Portal Information Center >


Tools & Apps > Configurators

or

IT R under the Entry ID: 64847781


in the Online Support

S
Compatibility Tool for Automation and Drives
With the help of the Compatibility Tool, you can check the compatibility of the various SIMATIC
software versions, either through the TIA Portal Information Center or on the Support pages
(https://support.industry.siemens.com) under the Entry ID: 64847781.

D I A
I N
A I N
IT R
S
TIA-MICRO1 - Engineering Software
Training Document, V15.00.00 3-15
SIMATIC S7-1200 Basic Course

3.6. TIA Portal: Portal View and Project View

Project View
• Hierarchical project structuring
• All editors, parameters and
data accessible

D I A
I N
A I N
Portal View

IT R
• Task-oriented
• Fast project entry

S
Portal View
• Task-oriented mode of working
• Fast project entry with user guidance

Project View


Hierarchical structuring of the project
The necessary editors open according to the task in hand

D I A

I N
All editors, parameters and data are found in one view

A I N
IT R
S
TIA-MICRO1 - Engineering Software
3-16 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

3.6.1. Portal View

Portals Actions of the selected portal

Hardware
and
network
configuration

Block Editor

D I A
Drive

I N New project
Selection window for
the selected action

N
Migration
parameterization

HMI
configuration

A I
R
User interface language

IT
Accessible
device

S
Layout of the Portal View:
• Portals for the different tasks
Switch to Project view

• Actions for the selected portal


• Selection window for the selected action

Portals
Access to devices, components and their connections

D I A
Actions

I N
Depending on the selected portal, actions are available here that can be executed in the selected
portal. Context-sensitive help is available in every portal.

Selection Window

A I N
The selection window is available in all portals. The content of the window adapts to your current

R
selection.

IT
S
TIA-MICRO1 - Engineering Software
Training Document, V15.00.00 3-17
SIMATIC S7-1200 Basic Course

3.6.2. Project View

Task Cards
(tools)
Menu bar and toolbar

Project
navigation Working area

D I A
N
(Project tree)

N I
Reference
projects

A I
R
Details
Inspector window
view
- Properties

IT
- Info output Group
Task bar - Diagnostics opened editors

S
(opened editors)

Project Navigation (Tree)


The Project tree contains all components and project data of an automation solution. All
components can be opened from there.

Working Area

A
The objects opened for editing are displayed in the working area. These objects include, for

I
example hardware components, blocks, PLC tag tables, screens of HMI devices etc. If several
objects are open at the same time, they are displayed in the task bar as tabs (individually or
grouped according to editors).

D
Task Cards

I N
Task Cards provide tools for configuring/programming. The content of the Task Cards depends

Inspector Window

A I N
on the object displayed in the working area.

R
Additional information on a selected object or on executed actions is displayed in the Inspector
window. The available properties of the selected objects can also be edited here (for example,

IT
properties of screens, screen objects, tags).

S
The Inspector window displays all system messages from the engineering, for example, those
resulting from generating a project. This window should always be checked for any errors and
warnings after a generation is completed.

Details View
The Details view contains a help window. In it, the elements of the configuration object selected in
the Project tree are displayed. These can be used in the active working area (by dragging them to
the working area using drag & drop).

Reference Projects
Reference projects are write-protected projects which can be used for comparison or as a
template.

TIA-MICRO1 - Engineering Software


3-18 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

3.6.3. Menu Bar and Toolbar

All commands which are required for working can be found in the menu bar.

Create/Open/Save Cut/Copy/Paste/Delete Delta Compile

D
UploadI A WINCC RT
project (element)

I N Download Simulation

A I N
IT
devices
R
Accessible CPU
RUN/STOP
Cross-
references
Split editor
space
Global Search

S
Menu Bar
The menu bar contains all commands required for your work.

Toolbar
The toolbar provides buttons for frequently required commands. That way, you can access these
commands faster.

D I A
I N
A I N
IT R
S
TIA-MICRO1 - Engineering Software
Training Document, V15.00.00 3-19
SIMATIC S7-1200 Basic Course

3.6.4. Project Tree (First Level)

Project

Devices (PLC, Panel, Drives,…)

D I A
Device groups (optional)
to improve the overall view

I N
Ungrouped
distributed I/O

A I N
R
Distributed I/O not yet assigned to a Project language and
texts

IT
controller
Online access

S SIMATI C Card Reader

The "Project tree" window provides access to all components and project data. All components
and all available objects of a project appear in the Project tree in a tree structure and can be
opened from there by double-clicking on them.
The following actions can be carried out:
− adding new components (controllers, HMI devices etc.)
− editing existing components
− querying and modifying properties of existing components
− diagnosing accessible components

D I A
I N
To improve clarity, objects (entire stations) can be grouped together.
Newly inserted distributed I/Os are stored in the folder “Ungrouped devices” and can be moved to

N
the groups which you have created yourself.

I
A link to a distributed I/O is found in the folder “Unassigned devices” until it is assigned to a
controller or master.

A
IT R
The folders “Common data”, “Documentation settings” and “Languages & resources” refer to the
project; the folders “Online access” and “Card Reader/USB memory” are project independent.

S
TIA-MICRO1 - Engineering Software
3-20 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

3.6.4.1. Project Tree (Second Level)

Project

PLC program

PLC tags

D I A
PLC data types (UDT)

N
Watch tables and

I
Force tables
Trace configurations and
trace recordings

Central modules

A I N Assigned

IT R distributed I/O

S For a better overall view, blocks can be arranged in block groups which you create yourself. This
grouping merely serves the overview of the program and has no impact on the execution of the
program. This information is not loaded into the CPU.
All central modules are stored in the folder “Local modules”.
If a device or slave was assigned to a controller or master, the device can be found in the folder
“Distributed I/O” of the relevant controller/master.

Hiding/Showing a Structure Section

D I A
N
An underlying structure is indicated by the black triangle . By clicking on the triangle, the
underlying structure level can be shown

N I → or hidden again → .

A I
IT R
S
TIA-MICRO1 - Engineering Software
Training Document, V15.00.00 3-21
SIMATIC S7-1200 Basic Course

3.6.5. Task Cards

Different Task Cards are available depending on the edited or selected object!

D I A
I N
A I N
IT R
S Which Task Cards are available depends on the products that have been installed and on the

object currently being edited or open in the working area. If all Task Cards are not visible, the
Task Card-bar can be shifted using the cursor buttons at the bottom right.
• Hardware Catalog
All the available hardware components (such as CPUs, modules etc.) can be selected in the
Hardware Catalog.
• Instructions
Instructions for programming blocks;

D I A
Code templates and function list wizard for script programming (VBS as well as C scripts with
WinCC Professional)
• Toolbox

I N
N
Configurable screen objects (graphics, display and operator control objects) in different panes

• Online Tools

A I
(basic objects, elements, controls - optional customized controls, graphics)

If there is an online connection established, diagnostics and online information can be called,

IT R
such as, the current cycle time of the CPU and the configuration of the load and work memory
of the CPU. Also the CPU can be switched to the STOP and RUN mode.
• Animations

S Templates for making screen objects dynamic in different panes (movements, display, tag link
for making dynamic)
• Layout
Tools for adapting the presentation when designing screens during configuration of HMI
devices (zoom, level assignment, grid alignment, objects outside the area)
• Tasks
Classic editor functions (such as find and replacing tags, instructions etc.)are available such
here.
• Libraries
Management of the local project library and global libraries

TIA-MICRO1 - Engineering Software


3-22 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

3.6.6. Inspector Window

Show / Hide errors, warnings or information

D I A Indicates new
entries

I N
A I N
IT R
S Additional information on a selected object or on actions to be executed is displayed in the
Inspector window. The Inspector window consists of the following tabs:
→ can be selected by clicking the tabs

This symbol in the tab indicates new entries.

A
If errors are displayed, you can jump to the error location or into the associated editor by

"Properties" Area
double-clicking on the error information.

D I
can be changed.

I N
This tab displays the properties of the object selected in the working area and editable properties

"Info" Area

I N
This is the output area of the engineering. This tab displays further information for the object

A
selected. In addition to this, messages relating to executed actions, for example, compilation and
download of blocks to the CPU are output.

IT R
"General" tab → general status output
"Cross-references" tab → display of the current locations at which the selected object is used

S
"Compile" tab → status display of compilation progress
"Syntax" tab → status display for invalid programming commands

"Diagnostics" Area
This tab displays information on system diagnostics and configured alarm events
"Device information" tab→ Information about the state of the devices
"Connection information" tab → detailed diagnostics of connections
"Alarm display" tab → Display of currently pending CPU alarms
"Monitor value" tab→ Monitoring of structures in a block

TIA-MICRO1 - Engineering Software


Training Document, V15.00.00 3-23
SIMATIC S7-1200 Basic Course

3.7. Window Arrangement

Embed
Float

Collapse
automatically
or

(left, bottom, right)


Expand
permanently
(left, bottom, right)

D I A
I N
A I N
IT R
SThe positions and characteristics of windows can be configured individually. You can hide
windows that are seldom required in order to enlarge the working area.
The current configuration of the engineering user interface is saved in the user profile of
Windows. When the project is saved, the positions and characteristics of windows are
automatically saved with it.

Window Arrangement Options


• When the window is ‘Expand permanently’
− fixed location and fixed size on user interface

D I A
I N
− position at left, bottom or right outside of the working area is possible
− always open, reduces the working area

− hidden at edge of user interface

A N
• When the window is ‘Collapse automatically’

I
− position at left, bottom or right is possible, superimposed on working area when open

IT R
− default status = window closed, and tab displayed at edge of the user interface
− mouse click on the tab opens the window
− closed automatically the next time there is a click outside the window area

S• ‘Float’ window!! Makes sense if a 2nd monitor is used!!


− can be positioned anywhere on the user interface
− permanently covers the user interface area underneath it

By clicking the functions in the window title bar you can switch between the modes
"float" and "embed" or "collapse automatically" and "expand permanently".

In addition, the windows can be expanded and collapsed via the buttons .
Hidden windows are opened by clicking on the tab and closed again by clicking outside the
window area.

TIA-MICRO1 - Engineering Software


3-24 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

3.7.1. Splitting and Arrangement of the Working Area

Split editor space


horizontally or
vertically

D I A
I N Editor space (working area)

N
float (freely position)

A I maximize (in the TIA Portal)


embed (in the TIA Portal)
maximize (entire screen)

IT R
S
The windows of the editor space (working area) can be arranged as follows:

Maximize (full size) a working area to cover the entire screen


(color depending on View online/offline)

minimized) (color depending on View online/offline)

Float or release a window from the working area

D A
Maximize a working area in the TIA Portal (Project tree, Task Card and Inspector window are

I
(color depending on View online/offline)

I N
N
Embed a window in the working area once again

I
(color depending on View online/offline)

A
Split the editor space (working area) horizontally into two windows

R
S IT
Split the editor space (working area) vertically into two windows

TIA-MICRO1 - Engineering Software


Training Document, V15.00.00 3-25
SIMATIC S7-1200 Basic Course

3.7.2. Keeping the Editor Window in the Foreground (when Editor Space is Split)

D I A
Editor window
fixed

I N
A I N Editor window for

IT R the next editor to


be opened

S If you work with a split editor space (working area), one of the two working areas can be fixed
(attached) by clicking on the “paper-clip” (paper-clip is vertical) so that when you open a further
editor, this first one always remains fixed in the foreground and the newly opened one always
becomes the second visible editor.

D I A
I N
A I N
IT R
S
TIA-MICRO1 - Engineering Software
3-26 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

3.7.3. Save / Manage / Use Window Layouts

D I A Save
current setting

Manage window
layouts
I N Restore

A I
Selection of saved
window layouts N last settings

IT R
S The different window arrangements of the user interface can be saved and then restored.

D I A
I N
A I N
IT R
S
TIA-MICRO1 - Engineering Software
Training Document, V15.00.00 3-27
SIMATIC S7-1200 Basic Course

3.8. Undo and Redo

Action, up to which
all actions are
undone

D I A
I N
A I N
IT R
Undo last action

S
Undo Concept of the TIA Portal
The drop-down menu shows the user in which editor the "Undo" function is executed. Closed
editors are then automatically opened. Because all actions are only undone up to the selected
action, the consistency of the project is ensured.

D I A
I N
A I N
IT R
S
TIA-MICRO1 - Engineering Software
3-28 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

3.9. Saving a Project

The entire project is


always saved!

D I A
I N
A I N
R
Including incomplete or
incorrect objects

Save
S IT
Regardless of the object that is open in the working area, it is always the entire project in the
current state that is saved when the Save icon is pressed, even if some objects of the project are
still incomplete or faulty [incorrect] (for example, syntax faulty blocks or symbols which have not
yet been assigned an absolute operand in the global symbol list).

discarded.

D I A
If the project is closed without saving, all changes made or objects created during the session are

I N
A I N
IT R
S
TIA-MICRO1 - Engineering Software
Training Document, V15.00.00 3-29
SIMATIC S7-1200 Basic Course

3.9.1. Archiving / Retrieving a Project

D I A
I N Create a compressed archive file
or Save as…?

A I N
R
No archiving of Search index
and HMI Compile Result?

S
Archiving
IT
The current state of the project can be archived at any time.
When you archive projects, you can choose the following:
• TIA Portal project archive

A
The project is minimized (all files are reduced to their essential components) and then stored
compressed in a project archive (file with the ending zap15).

I
If this item is not selected, the project is saved under the given name and path as an
independent project. (Save as… without closing current project)

D
• Discard restorable data

I N
Search index and the HMI Compile Result are not archived.
• Add date and time to the file name

Note

A I N
The current date and time is added to the selected archive name.

Retrieving R
The most recently saved version of the project is archived. If the last changes to the project are
also to be included in the archive, the project must be saved before archiving.

IT
S Only project archives (file with the ending zap15) can be retrieved, that is, unzipped.

TIA-MICRO1 - Engineering Software


3-30 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

3.10. TIA Portal - Settings: User Interface Language

D I A
Portal view

I N
Project view

A I N
IT R Mnemonics: - German → E / A
- International → I / Q

S
Available User Interface Languages
The user interface language of the TIA Portal can be changed during running operation. The
following languages are available:
− German
− English
− French
− Spanish
− Italian

D I A
− Russian
− Korean

I N
N
− Japanese
− Chinese (simplified)

A I
IT R
S
TIA-MICRO1 - Engineering Software
Training Document, V15.00.00 3-31
SIMATIC S7-1200 Basic Course

3.10.1. TIA Portal - Settings: Language, Storage Location, Layout

D I A
I N
A I N
IT R
S
Language
The user interface language of the TIA Portal can be changed at any time without needing to
restart. The TIA Portal always starts in the language that was last selected.

Storage Settings
Storage location for projects:

I
Storage location of newly created projects and their project libraries
Storage location for libraries:
Storage location for global libraries

D A
Layout

I N
N
If the layout is reset, the original window layout arrangement of the TIA Portal is restored.

A I
IT R
S
TIA-MICRO1 - Engineering Software
3-32 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

3.11. Libraries

Local library
Part of the TIA Portal project Own global library
create, open, save and close
In project

D I A
Global library
(libraries)

I N
N
Stored outside of the TIA

I
Portal project

R A No restriction on contents
• Blocks (FCs, FBs, DBs...)

IT
• Pictures (screens), graphics
• Devices

S
Project Library
• Tags ...

Each project has its own library. Here, objects can be stored that are to be reused within the
project. This project library is always opened, saved, and closed together with the current project.

Global Libraries

be used and reused in different projects.

D I A
Global libraries are stored independently of the projects and are used to store objects that are to

The area of the global libraries also contains libraries supplied with the TIA Portal that, for
example, contain ready-made functions and function blocks.

Library Objects

I N
tables, screens, graphics, faceplates….

Uses of Global Libraries

A N
A library is a collection of any project objects, such as, blocks, devices, PLC data types, watch

I
IT R
Library objects can either be used as a master copy or as an instance.
• Objects from the Master copies folder are copied to the project when used.
If subsequent changes are made to this master copy, these changes are not made to the

S copies in the project.


• Objects from the Types folder are copied to the Types folder of the project library when they
are used and an instance (location of use) is created in the project.
These objects are then stored in the local project library. The object itself is not used in the
project, rather only a reference to it.

You will find more information about libraries in the section Programming Guideline Libraries:
“TIA Portal Information Center” > Documentation > Manuals > Control Technology
or in the Online Support under the Entry ID: 90885040

TIA-MICRO1 - Engineering Software


Training Document, V15.00.00 3-33
SIMATIC S7-1200 Basic Course

3.12. Help

Path in the Content

D I A
I N
F1

A I N
IT R F1

SWide-ranging help functions are available for solving your tasks; these describe basic concepts,
actions and functions.
• Tooltip for information on the user interface elements, for example, instructions, input boxes,
buttons and symbols
Some tooltips provide cascades with more precise information.

Operating instructions:
I A
Step-by-step approach for implementing a task

D
N
Example: Practice-oriented application example with solution of an

Factual information:

N I
automation task

Background information about the functions of the TIA

Reference:

A I Portal

Detailed reference information about instructions and

IT R objects
These are activated by clicking (Information system is opened)

S
• Help on the current context
For example, on menu commands by pressing the <F1> key.
• In the input boxes (for example, in the Properties in the Inspector window), the roll-out
provides information about the permitted value ranges and data types for the input.

TIA-MICRO1 - Engineering Software


3-34 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

3.12.1. Help (Information System)

Search Navigation Content

Advanced search Create Favorites


(Boolean, Phrase, Fuzzy …)

Devices filter

D I A
Open the position in the table of
contents

I N Several tabs

A I N
IT R Direct link to the Start page for the
TIA Portal Information Center

S
Contents of the Help Functions
• Search area
In the Search area, you can perform a full-text search across all help topics.
• Navigation area
In the Navigation area, you find the (table of) Content and the Favorites.
• Contents area

I A
The help pages are displayed in the Content area. You can open several tabs in order to
simultaneously display different help pages.

D
I N
You can show and hide the individual areas using the arrows on the window splitters. In that way,
you can close the Search area as well as the Navigation area in order to enlarge the Contents
area.

A I N
IT R
S
TIA-MICRO1 - Engineering Software
Training Document, V15.00.00 3-35
SIMATIC S7-1200 Basic Course

3.13. Additional Information

D I A
I N
A I N
IT R
S
D I A
I N
A I N
IT R
S
TIA-MICRO1 - Engineering Software
3-36 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

3.13.1. Keyboard Shortcuts of the TIA Portal

A
Can be sorted according to

I
(Keyboard) Shortcut, Action or Editor

I N D
A I N
IT R
S The keyboard shortcuts can be displayed through the menu item Options > Settings. The view
can be sorted according to (Keyboard) Shortcut, Action and Editor.

D I A
I N
A I N
IT R
S
TIA-MICRO1 - Engineering Software
Training Document, V15.00.00 3-37
SIMATIC S7-1200 Basic Course

3.13.2. Project Migration

≥ V5.4 V13 SP1

Migrate project

S7-300 S7-400 Upgrade

D I A
S7-300 S7-400
Migrate
hardware

S7-1500

S7-300 S7-400

N
S7-1500

Migrate project
I
≥ 2008 SP3
≥ V7.0 SP3

A I N Upgrade
If req. change
device type

IT R “TIA Portal Information Center > Migration” or

S
Migration Guide (Customer Support Entry ID: 109478811)

What does Migration Actually Mean?


• Switch or change of a system / a technology
• "Step-by-step" modernization of the installed basis and adaptation to modern technology…

Why Migration? – Motivation for Migration




Investment protection
Switch to the latest engineering

D I A
N
• Basis for future retrofits/renovations


Products with higher performance
Innovative products

N I

A I
Long-term availability of products
Reduced product time-to-market

IT R
Lower operating costs

S
TIA-MICRO1 - Engineering Software
3-38 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

3.13.2.1. Migration of STEP7 V5.x – Projects: Supported Hardware

Effective date 1.10.2007


S7-300/ET200CPU S7-400 WinAC → Availability of Hardware

D I A
Basic Panels

I N
A I
Mobile Panels
x77er Panels NPanel PC,
Standard PC SCADA System

R Single Station … based on WinCC flexible RT … based on WinCC V7 Runtime

IT
Possible check before migration with the help of the tool: “READINESS CHECK”
(TIA Portal Information Center > Tools & Apps > Planning and Configuration

S or Entry ID: 60162195 in the Online Support)

The hardware configuration for supported hardware can also be migrated. Otherwise, only the
software can be migrated and must be adjusted to the supported hardware.
To if a speciic hardware item is supported by TIA Portal, use the “READINESS CHECK” tool
which is available for download on the Support Pages (https://support.industry.siemens.com)
under the Entry ID: 60162195 or via the “TIA Portal Information Center”.

D I A
I N
A I N
IT R
S
TIA-MICRO1 - Engineering Software
Training Document, V15.00.00 3-39
SIMATIC S7-1200 Basic Course

3.13.3. Installation with Record Function in the Setup

Initial installation with Record function (config file)

STEP7 V15
WinCC V15
> setup.exe /record

D I A Install.rec

N
Startdrive V15

I
Further installation → Command lines installation (Silent installation)

N
A I
> setup.exe /qb {parameter}

IT R
STEP7 V15
WinCC V15
With progress bar

> setup.exe /qn {parameter}

S Startdrive V15 Without progress bar

With the command “setup.exe /record”, an installation file is created during installation. With the
help of this file, exactly the same installation can be carried out on other computers. For this, the
installation file must be saved on the computer on which the installation is to be carried out and
the installation must be started with the command setup.exe /qb {parameter} or
setup.exe /qn {parameter}. {parameter} corresponds exactly to the path in which the installation

A
file was saved. The installation is executed without further settings having to be made.

D I
I N
A I N
IT R
S
TIA-MICRO1 - Engineering Software
3-40 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

3.13.4. Update Tool

D I A
I N
A I N
IT R Server of the available Updates
and Support Packages

S
Update Tool
You can search for updates in the dialog “Installed software”.
• Start via: Portal view: Start > Installed software > Check for updates
Project view: Help > Installed software > Check for updates
• Checks and informs about possible updates of installed software
• Download of updates
• Pause / Continue downloads

D I A
Options:
• Installation of Updates

I N

A I
Location for Download Files
Server used to check for updates.
N
You can choose either the TIA Automation Software Update Server or a user-defined server on

IT R
which the updates are provided by an Administrator.
Check for updates daily

S
TIA-MICRO1 - Engineering Software
Training Document, V15.00.00 3-41
SIMATIC S7-1200 Basic Course

Contents 4
4. Devices & Networks: Online Functions and Hardware Configuration .............. 4-2
4.1. Online Tools, Configuring and Parameterizing the Hardware .............................................. 4-3
4.2. Online Connection via Industrial Ethernet: IP Address and Subnet Mask ........................... 4-4
4.2.1.
4.3.
4.4. A
Online Connection: Assigning an IP Address for the PG ..................................................... 4-5

I
Default for Online Access and Visible Interfaces .................................................................. 4-6

D
Online Access: Accessible Devices ...................................................................................... 4-7

N
4.4.1. Accessible Devices: Online & Diagnostics, Task Card: Online Tools .................................. 4-8
4.4.2.
4.4.3.

I
Accessible Devices: Online & Diagnostics: Diagnostics Buffer ............................................ 4-9
Accessible Devices: Online & Diagnostics: IP Address, Name, Time, FW Update,

N
Memory Card ...................................................................................................................... 4-10
4.6.
4.6.1.

A I
SIMATIC S7-1200/1500: Memory Concept for CPU Memory Reset .................................. 4-11
SIMATIC S7-1200/1500: Memory Concept for CPU Reset to Factory Settings ................. 4-12

R
4.7. Card Reader / USB Memory Device ................................................................................... 4-13

IT
4.8. Uploading a Hardware Station into the Project (1) (Hardware with Parameterization and
Software) ............................................................................................................................. 4-14

S
4.8.1. Uploading a Hardware Station into the Project (2) (Hardware with Parameterization and
Software) ............................................................................................................................. 4-15
4.9. Working Areas of the Hardware and Network Editor .......................................................... 4-16
4.9.1. Hardware and Network Editor: Device View ....................................................................... 4-17
4.9.2. Setpoint and Actual Configuration ...................................................................................... 4-18
4.9.3. Hardware Catalog ............................................................................................................... 4-19
4.9.4. Selecting the Controller and the Modules ........................................................................... 4-20
4.9.5. Setpoint Configuration: Creating a Hardware Station (Controller)...................................... 4-21
4.9.5.1. Inserting / Deleting a Module .............................................................................................. 4-22
4.9.5.2.
4.9.6.
4.9.7.
4.9.7.1.
4.9.7.2. I A
Changing a Device / Module ............................................................................................... 4-23
CPU Signal Board ............................................................................................................... 4-24
CPU Properties: Ethernet Address ..................................................................................... 4-25

D
CPU Properties: Maximum Cycle Time .............................................................................. 4-26
CPU Properties: System and Clock Memory ...................................................................... 4-27
4.9.7.3.
4.9.8.

I N
CPU Properties: Password Protection ................................................................................ 4-28
Compiling the Hardware / Software and Downloading it into the CPU ............................... 4-30

N
4.10. Task Description: Creating a Project with an S7-1500 Station ........................................... 4-31
4.10.1.
4.10.2.
4.10.3.
I
Exercise 1: Setting the IP Address of the PG ..................................................................... 4-32
Exercise 2: Read out the Firmware version and reset the CPU to Factory Settings .......... 4-33

A
Exercise 3: Deleting Old Projects ....................................................................................... 4-34

R
4.10.4. Exercise 4: Creating a New Project .................................................................................... 4-35
4.10.5. Exercise 5: Creating a S7-1200 - Station ........................................................................... 4-36

IT
4.10.6. Exercise 6: Configuring the CPU Signal Board .................................................................. 4-37
4.10.7. Exercise 7: Configuring the S7-1200 Station ...................................................................... 4-38

S4.10.8.
4.10.9.
4.10.10.
4.10.11.
4.10.12.
4.10.13.
Exercise 8: CPU Properties: Assigning the IP Address ...................................................... 4-39
Exercise 9: CPU Porperties: Adresses of the integrated Inputs / Outputs ......................... 4-40
Exercise 10: CPU Properties: Parameterizing the Clock Memory Byte ............................. 4-41
Exercise 11: Analog I/O module: I/O adresses ................................................................... 4-42
Exercise 12: DI/DQ module: I/O addresses ........................................................................ 4-43
Exercise 13: : Compiling the Device Configuration and Downloading it into the CPU ....... 4-44
4.10.14. Exercise 14: Setting the Time ............................................................................................. 4-47
4.11. Additional Information ......................................................................................................... 4-48
4.11.1. Area for Modules Not Plugged In ........................................................................................ 4-49
4.11.2. Swapping a Slot / Inserting a Module between Two Modules ............................................ 4-50
4.11.3. Copying Modules from a Reference Project ....................................................................... 4-51
4.11.4. Unspecified CPU ................................................................................................................. 4-52
4.11.5. ‘View’ Settings of the Task Cards ....................................................................................... 4-53

TIA-MICRO1 - Devices & Networks


Training Document, V15.00.00 4-1
SIMATIC S7-1200 Basic Course

4. Devices & Networks:


Online Functions and Hardware Configuration

At the end of the chapter the participant will ...

...

D I A
be able to establish an online connection between PG and
CPU via Industrial Ethernet

I N
be able to use online functions to start and stop the CPU and
to reset it to factory settings

A I
...

...
N
be able to create and parameterize a new station

be able to create and parameterize a setpoint (offline)


configuration

IT R ... be familiar with addressing the input and output modules of an


S7-1200 and be able to do it

S
D I A
I N
A I N
IT R
S
TIA-MICRO1 - Devices & Networks
4-2 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

4.1. Online Tools, Configuring and Parameterizing the Hardware

online → Status,
Diagnostics
offline → Configuration,
Parameterization

D I A
I N
A I N
IT R
S
Online Tools
An online connection to the CPU permits diagnostics and status information for all modules to be
accessed.
With CPUs that can be accessed online, the "Online tools" task card and additional status
information (cycle time statistics and memory load) can be called.

Configuring and Parameterizing the Hardware

D I A
Almost all devices or components of an automation solution such as PLCs or touchpanels can be
assigned parameters. The parameter assignment of the devices and network settings required for

I N
commissioning is handled using the Hardware and Network Editor.
With this, for example, all components of an Ethernet network are assigned IP addresses via

N
which they communicate during later operation.

I
But even inside the automation device, address areas of the I/O modules must be specified and

A
the cycle monitoring time of the CPU must be set, for example.

IT R
S
TIA-MICRO1 - Devices & Networks
Training Document, V15.00.00 4-3
SIMATIC S7-1200 Basic Course

4.2. Online Connection via Industrial Ethernet:


IP Address and Subnet Mask

D I A
I N
MAC Address:
Subnet Mask:

A I
08-00-06-01-74-10
255.255.255.0 N MAC Address:
Subnet Mask:
08-00-06-01-74-20
255.255.255.0

IT R
IP Address: 192.168.111.10 IP Address: 192.168.111.12

S
Subnet Device Subnet Device

Internet Protocol
Internet Protocol (IP) is the basis for all TCP/IP networks. It creates the so-called datagrams (data
packets specially tailored to the Internet protocol) and handles their transport within the local
subnet or their "routing" (forwarding) to other subnets.

IP Addresses

D I A
IP addresses are not assigned to a specific computer, but rather to the network interfaces of the
computer. A computer with several network connections (for example routers) must therefore be

I N
assigned an IP address for each connection.
IP addresses consist of 4 bytes. With the dot notation, each byte of the IP address is expressed

N
by a decimal number between 0 and 255. The four decimal numbers are separated by dots
(see picture).

MAC Address

A I
IT R
Every Ethernet interface is assigned a fixed address by the manufacturer that is unique
worldwide. This address is referred to as the hardware or MAC address (Media Access Control).
It is stored on the network card and uniquely identifies the Ethernet interface in a local network.

S
Cooperation among the manufacturers ensures that the address is unique worldwide.

Subnet Mask
The subnet mask specifies which IP addresses in the local network can be accessed. It separates
the IP address into the network and device part.
Only IP addresses whose network part is the same can be accessed.
e.g.: Subnet mask = 255.255.255.0 and IP address = 192.168.111.10
accessible IP addresses: 192.168.111.1 to 192.168.111.254

TIA-MICRO1 - Devices & Networks


4-4 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

4.2.1. Online Connection: Assigning an IP Address for the PG

D I A
→ 192.168.111.50

I N
A I N
IT R
S
IP Address of the Programming Device
The setting of the PG’s IP address can be made as shown in the picture.
If an online connection is to be established between the programming device and the CPU, both
devices must be assigned the same subnet mask and IP addresses which are located in the
same subnet.

D I A
I N
A I N
IT R
S
TIA-MICRO1 - Devices & Networks
Training Document, V15.00.00 4-5
SIMATIC S7-1200 Basic Course

4.3. Default for Online Access and Visible Interfaces

D I A
I N
A I N
IT R
S
In the Settings, you can have a default setting for the connection path for online access(es).
In the Online access folder, all possible interfaces of the PG/PC are displayed. Because not all of
these are required or can be used, interfaces can be hidden for better clarity.

D I A
I N
A I N
IT R
S
TIA-MICRO1 - Devices & Networks
4-6 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

4.4. Online Access: Accessible Devices

D I A 2

I N 3

A I N
1. Online access or
Accessible devices
(Project or Portal view)
1

IT R 2. Select interface for the


search

3. Update accessible devices

S
or Start search

Accessible Devices in the Portal View


This function provides the option of fast access (for example for service purposes) even when
there is no offline project data for the target systems on the PG.
All accessible, programmable modules (CPUs, FMs CPs, HMI devices) are listed in the Portal
view, even if they are located in other subnets.

Access Online Functions → Button

D I A
Whenever there is an attempt to access a module online with the "Show" button which is located

be assigned to the PG.

I N
in a different subnet from the PG, a dialog opens asking whether an additional IP address should

Following confirmation, an additional IP address is assigned to the PG that is located in the same

A I N
subnet as the address of the CPU. After that, all online functions can be used.

IT R
S
TIA-MICRO1 - Devices & Networks
Training Document, V15.00.00 4-7
SIMATIC S7-1200 Basic Course

4.4.1. Accessible Devices: Online & Diagnostics, Task Card: Online Tools

D I A
I N
A I N
IT R
S
CPU Operator Panel: Mode Selector Switch
The operating mode of the CPU can be changed.
• RUN → STOP:
If there is a change from RUN to STOP, the CPU terminates the running user program.

Cycle Time:
STOP → RUN:

D I A
If there is a change from STOP to RUN, the CPU performs a restart.

I N
"Shortest", "Current" and "Longest" are the cycle times since the last CPU restart

With a Memory Reset (MRES), a CPU reset is carried out:

N
− All user data (even the retentive) is deleted (delete work memory)

I
(process images, memory bits, timers, counters, all program/data blocks)

A
− Retained are: IP addresses, the retentive part of the diagnostics buffer, operating hours
counter, time-of-day

IT R
S
TIA-MICRO1 - Devices & Networks
4-8 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

4.4.2. Accessible Devices: Online & Diagnostics: Diagnostics Buffer

D I A
I N Details for the entry line

A I N selected above

IT R
S
Online Access to the CPU
If the PG and the target system (for example CPU) are located in the same subnet, various
Online & diagnostics functions are available in the "Accessible devices" function.
• in the working area of the TIA Portal
• in the "Online tools" task card (see next page)

Diagnostics Buffer

D I A
The diagnostics buffer is a buffered memory area on the CPU organized as a circular buffer.

I N
It contains all diagnostics events (error alarms, diagnostics interrupts, start-up information etc.)
of the CPU in the order in which they occurred. The highest entry is the last event to occur.
All events can be displayed on the programming device in plain language and in the order in
which they occurred.

I N
All events can be displayed on the programming device in plain language and in the

A
order in which they occurred. In addition, some of the diagnostics buffer is not buffered
with PowerOFF (only a part is retentive).


IT R
Number of entries, 1000 to 3200
Of that, retentive 250 to 500

S
Details on Event
Some additional information is also provided for the selected event in the "Details on event" box:
• Event name and number
• Additional information depending on the event, such as, the address of the instruction that
caused the event etc.

TIA-MICRO1 - Devices & Networks


Training Document, V15.00.00 4-9
SIMATIC S7-1200 Basic Course

4.4.3. Accessible Devices: Online & Diagnostics:


IP Address, Name, Time, FW Update, Memory Card

D I A
I N
A I N
IT R
S • Set Time (of Day)
Each S7 CPU has a real-time clock that can be set here.
• Assign IP Address
As long as no IP address has been specified already by a hardware configuration that was
downloaded earlier, this can be assigned or modified here (this function is also available

• Reset to Factory Settings

D I
when the PG/PC and the CPU are not assigned to the same subnet).

A
Unlike the "memory reset", all the memory areas of the CPU (work, load and retentive

N
memory, diagnostics buffer and time) are deleted. Optionally (see dialog in the picture), the

I
IP address can also be deleted so that the CPU then only has a MAC address (Media Access
Control).
• Format Memory Card

I N
The CPU memory card can also be deleted in the CPU via this online function. After that, the
CPU only has its IP address. All other data (including the device configuration) is deleted.

A
The card cannot be deleted in the card reader via the Project tree. Device configuration and

IT R
blocks have a gray background, that is, are write-protected (only status information or open
with a double-click).
Assign Name

S •
In PROFINET, each device must be assigned a unique device name that is stored retentively
on the device. The device name identifies a distributed I/O module (PROFINET IO) and
allows module replacement without a PG/PC.
Firmware Update
Here, the firmware version of the device and the modules can be updated. Under
"Diagnostics -> General", the current firmware version is displayed.
Caution: If the CPU and Display have to be updated, first the Display and then
the CPU.

TIA-MICRO1 - Devices & Networks


4-10 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

4.6. SIMATIC S7-1200/1500: Memory Concept for CPU Memory Reset

With Memory Reset...


1 internal memory areas
Time-of-day Operating IP addresses
(system memory, entire data hours counter
and code working memory)
are deleted

A
internal Flash Diagnostics
2 the user program and the
hardware configuration as well
as active Force jobs are
Load memory
Force jobs
buffer

D I
N
copied from the load memory

I
RAM
2

Force
jobs
A2I N
System memory
1

R
internal Flash
Code working memory

IT
Data working memory
inserted Flash Card Retentive memory

S
Load memory

CPU Memory Reset


• What to do:
− STEP7 online function → MRES in "CPU operator panel" of "Test" and "Online tools" Task
Cards

A
− Display (only S7-1500) → Main menu "Settings", submenu "Memory reset"


− CPU mode selector switch (with inserted memory card)
Impact

D I
− An existing online connection between PG/PC and the CPU is disconnected.

I N
− The entire RAM work memory is deleted, including all user data (process images, bit
memories, counters, timers, all program/data blocks, even the retentive ones)

N
− Retained are: IP addresses, diagnostic buffer, operating hours counter, CPU time-of-day.

A I
− After that, the CPU copies all data relevant for execution into the RAM work memory from
the memory card. (Data relevant for execution: device configuration, program blocks, data
blocks, current Force jobs).

IT R
S
TIA-MICRO1 - Devices & Networks
Training Document, V15.00.00 4-11
SIMATIC S7-1200 Basic Course

4.6.1. SIMATIC S7-1200/1500: Memory Concept for CPU Reset to Factory Settings

With Reset to factory ?


settings... Time-of-day Operating IP addresses
01.01.2012 hours counter
1 internal memory areas (incl.
time-of-day, diagnostics buffer,
Diagnostic

A
operating hours counter) and internal Flash

I
module parameters are deleted buffer
Load memory

2
IP addresses query in STEP7

the user program, the


hardware configuration and
active Force jobs are copied
from the external load memory
Force jobs

I N RAM
D
(SMC)

Force
jobs

A
2 I N
System memory
1
internal Flash

R
Code working memory

IT
Data working memory
inserted Flash Card Retentive memory

S
Load memory

CPU Reset to Factory Settings


• What to do:
− STEP7 online function → MRES in "CPU operator panel" of "Test" and "Online tools" Task
Cards
− Display (only S7-1500) → Main menu "Settings", submenu "Memory reset"→ Factory


Defaults
− Mode selector switch (only without memory card)
Impact

D I A
I N
− An existing online connection between PG/PC and the CPU is disconnected.
− The entire RAM work memory is deleted, including all user data (process images, bit
memories, counters, timers, all program/data blocks, even the retentive ones, diagnostic

I N
buffer), IP addresses are deleted if this is selected in STEP7.
− All IP addresses are retained if this was specified in STEP7.

A
IT R
If a memory card is inserted (or is already inserted), the CPU copies all data relevant for
execution into the internal RAM work memory from the memory card. (Data relevant for
execution: device configuration incl. IP address, program blocks, data blocks, current Force jobs).

S
TIA-MICRO1 - Devices & Networks
4-12 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

4.7. Card Reader / USB Memory Device

S7-1200/1500

S7-300/400

D I A
I N
A I N • Removable media:

IT R
• Internal/external prommer:
Memory Card
SMC
external hard drive
USB memory device
• Reader_X (user-defined memory):

S
Micro Memory Card
Folder on hard drive

Card Reader / USB Memory


In the Card Reader/USB memory folder, you can access an SMC inserted in the SD Reader, the
internal/external prommer, removable (media) devices or user-defined folders.

Card Type of the SIMATIC Card for S7-1200/1500:

I A
The SIMATIC Memory Card is used as a Program card or a Transfer card or for Firmware
Updates. Before the relevant data is stored on the SMC, the card type must be selected as
shown in the picture.

D
N
• SIMATIC Memory Card as Program Card:

I
The card contains all configuration and parameterization data for the station as well as the
entire user program with documentation. During operation, the card must remain inserted in
the CPU because it is used as a replacement for the internal CPU load memory which


remains unused.

I N
SIMATIC Memory Card as Transfer Card (only for S7-1200):

A
The card contains the same data as a Program card but it doesn’t have to remain inserted

R
during operation. After inserting the card and subsequent Power ON, all data is copied into
the internal load memory of the CPU. Then the card has to be removed and a restart has to

IT
take place.

S
S7-300/400:
• SIMATIC Memory Card to Update Firmware:
The SIMATIC Memory Card contains the files required for a firmware update. After execution,
the SIMATIC Memory Card must be removed.

An S7-300 or S7-400 CPU does not have an SMC as load memory but a Memory Card or Micro
Memory Card. You can only access these cards with the help of an internal or external prommer.
Note: A SIMATIC Field PG has an internal prommer.

TIA-MICRO1 - Devices & Networks


Training Document, V15.00.00 4-13
SIMATIC S7-1200 Basic Course

4.8. Uploading a Hardware Station into the Project (1)


(Hardware with Parameterization and Software)

D I A
I N
A I N
IT R Select device

S Unlike the option “Upload actual configuration without parameterization”, an already existing
configuration of an S7 station can be read out using the function “Upload device as new station”.
This is then necessary when the appropriate offline station doesn’t exist on the PG. After reading

A
out the S7 station, the hardware as well as the program can be adjusted or modified, saved and
downloaded into the CPU.

Requirement:

D I
I
The station already has a configuration.

N
A I N
IT R
S
TIA-MICRO1 - Devices & Networks
4-14 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

4.8.1. Uploading a Hardware Station into the Project (2)


(Hardware with Parameterization and Software)

D I A
I N
A I N
IT R
S After the device is uploaded, the entire station (central and distributed hardware with
parameterization, the entire program with comments and symbols) is available to the user offline
for further processing.

D I A
I N
A I N
IT R
S
TIA-MICRO1 - Devices & Networks
Training Document, V15.00.00 4-15
SIMATIC S7-1200 Basic Course

4.9. Working Areas of the Hardware and Network Editor

D I A
Connection configuration

I N
A I N
IT R Device configuration
and
module parameter
assignment

S
Components of the Hardware and Network Editor
Topology configuration

The Hardware and Network editor consists of a Device, Network and Topology view.

Device View
The Device view is used for configuring and parameterizing devices and modules.


Hardware configuration
Device and module parameter assignment

D I A
Network View

I N
The Network view is used for configuring, parameterizing and networking devices.


Configure and parameterize devices

A I
Connection configuration
N
R
Topology View

IT
The Topology view is used for displaying, configuring and determining the physical structure of
networks.

S •


Configure the port assignment and the relationship between devices
Online-Offline comparison as well as synchronization of the port assignment and relationships
Topology makes it possible to exchange devices without a node initialization

TIA-MICRO1 - Devices & Networks


4-16 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

4.9.1. Hardware and Network Editor: Device View

horizontal and vertical split


Device selection

Graphic area

D I A
I N Tabular area

A I N
IT R Module parameter assignment
→ Properties in the Inspector window

S
Components of the "Hardware and Network Editor"
"Device view" section in the working area
This editor consists of 2 areas, a tabular (left/top) and a graphic (right/bottom). The splitting left-
right or top-bottom can be changed as required.
− Graphic area = module configuration


− Tabular area = Address parameterization of configured modules
"Properties" tab in the Inspector window

D I A
This tab is used to assign parameters to the module selected in the working area. Here, all
the properties or parameters of the selected module are displayed and can be modified. In the

I N
left-hand part of the Properties tab there is a navigation section in which the parameters are
arranged in groups.
• "Hardware Catalog" Task Card

Project Tree → "Local Modules"

A I N
Module catalog for the configuration (module grouping) in the working area

IT R
In the Project tree, the modules along with their parameter assignments (for example, addresses)
are stored under the relevant device in the "Local modules" folder.

S
TIA-MICRO1 - Devices & Networks
Training Document, V15.00.00 4-17
SIMATIC S7-1200 Basic Course

4.9.2. Setpoint and Actual Configuration

Configuration Assignment of racks and modules of the central and


distributed I/O.

Parameter Assignment

D I A
Specifying the behavior of parameter-assignable modules,
for example, startup behavior, retentive areas, etc.

I N
Setpoint Configuration

A I N
Planned hardware configuration and parameter assignment.

IT R
Actual Configuration
Actual configuration and parameter assignment of an

S
existing hardware.

Setpoint (Offline) and Actual Configuration


When you configure a system, a setpoint (offline) configuration is created. It contains a hardware
station with the planned modules and the associated parameters. The PLC system is assembled
according to the setpoint (offline) configuration. During commissioning, the setpoint (offline)
configuration is downloaded to the CPU.

D I A
I N
A I N
IT R
S
TIA-MICRO1 - Devices & Networks
4-18 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

4.9.3. Hardware Catalog

If several versions of modules


Search function Create /
exist, the version currently being
Select
used must be selected before
HW Profile
inserting.
Filter function

D I A
I N
A I N
IT R
Information

S
(selected
module)

The Hardware catalog contains all devices and hardware components in a tree structure.
From the catalog, selected devices or modules can be dragged to the graphic working area of the
"Hardware and Network" editor.

Search Function

module description texts.

Filter Function

D A
This allows a convenient search for specific hardware components. The search also includes the

I
I N
enabled: Only modules that match the current context are displayed.

disabled: All existing objects of the catalog are displayed

A I
Contents of the Hardware Catalog for Enabled Filter
N
Network view → only objects that can be networked

IT R
Device view → all modules or, for enabled filter, only the modules that belong to the current
device in the working area

S
Profile

Information
It is possible to create and to use your own profiles. This expands the filter possibilities.

The "Information" pane shows detailed information about the object selected in the catalog.
• Name
• Order number (Article no.)
• Version number

TIA-MICRO1 - Devices & Networks


Training Document, V15.00.00 4-19
SIMATIC S7-1200 Basic Course

4.9.4. Selecting the Controller and the Modules

Manual: “SIMATIC S7-1500 / ET 200MP Software: “TIA Selection Tool” (online or offline)
Automation system In a nutshell”

D I A
I N
A I N
IT R
S
TIA Portal Information Center > Tools & Apps >
Entry ID: 109481357
Configurators

SIMATIC S7-1500 provides you with a wide range of CPUs that can be integrated. You can
expand each CPU with I/O modules, communication modules and technology modules. If, for
example, the memory and performance of a CPU 1511-1 PN are sufficient for you, then you
expand it with communication modules for PROFINET and PROFIBUS. For technology functions,
technology CPUs and technology modules are available in addition to the Compact CPUs.

D I A
To select the correct controller there is the manual “SIMATIC S7-1500 / ET 200MP Automation
system in a nutshell” which contains further useful guidelines. It can be found under the Entry
ID: 109481357.

I N
There is also the software TIA Selection Tool which provides an opportunity for selecting,

N
configuring and ordering the devices for Totally Integrated Automation. After configuring the

I
hardware in the TIA Selection Tool, you are given a list with all hardware components which are

A
required (modules, plugs, cables, profile rails etc.).
In addition, the order via the Industry Mall can be started directly from the TIA Selection Tool.

IT R
S •

TIA-MICRO1 - Devices & Networks


4-20 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

4.9.5. Setpoint Configuration: Creating a Hardware Station (Controller)

Project view

D I A
I N
Portal view

A I N
IT R
S
Add New Device
It is possible to create a new device in the project using the Hardware and Network editor with the
help of the “Hardware catalog” task card or through the Project tree “Add new device”.
When a new device is created, a suitable rack is also created automatically. The selected device
is inserted into the first permitted slot in the rack.

I A
Regardless of the method selected, the added device is visible in the Device view and in the
Network view of the Hardware and Network editor.

D
I N
A I N
IT R
S
TIA-MICRO1 - Devices & Networks
Training Document, V15.00.00 4-21
SIMATIC S7-1200 Basic Course

4.9.5.1. Inserting / Deleting a Module

Inserting from the


Hardware catalog

possible
slots
Deleting in the Device view
deletes individual modules

D I A
N
1xR

N I
A I
Deleting in the Network

IT R view deletes entire station

S
Inserting a Module
Modules can be inserted using drag & drop or by means of a double-click.

Selecting a Version
When selecting a module, you must pay attention to the correct version. If the module is selected

task card “Hardware catalog > Information”.

Deleting a Module

D A
(highlighted) in the task card “Hardware catalog > Catalog”, the version can be selected in the

I
available again.

I N
Deleted hardware components are removed from the system and assigned addresses are made

A I N
IT R
S
TIA-MICRO1 - Devices & Networks
4-22 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

4.9.5.2. Changing a Device / Module

D I A
I N
1xR

A I N
IT R
S
Changing a Module
When a module is changed (replaced), all the parameters of the old module are adopted on the
new module. A module exchange can, for example, then be necessary when the CPU version in
the offline project is to be adapted to the CPU version (online) following a firmware update.
Hardware components can only be exchanged if the components are compatible.

I A
It is also possible to change a device by dragging the new module from the Hardware catalog
onto the old module using drag & drop.

D
I N
A I N
IT R
S
TIA-MICRO1 - Devices & Networks
Training Document, V15.00.00 4-23
SIMATIC S7-1200 Basic Course

4.9.6. CPU Signal Board

D I A
I N
A I N
IT R
S
CPU Signal Boards
Signal boards allow you to increase the number of CPU-specific inputs and outputs. You will find
signal boards in the Hardware catalog along with all the other hardware components. Signal
boards are not inserted into the rack like other modules. Instead, they are inserted directly into a
CPU-specific slot. Each CPU can only accept one signal board.

D I A
I N
A I N
IT R
S
TIA-MICRO1 - Devices & Networks
4-24 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

4.9.7. CPU Properties: Ethernet Address

Select CPU

D I A
I N
A I N
IT R
S
PROFINET Interface
Regardless of whether the editor is in the Device view or Network view, if the CPU is selected,
the settings of the CPU PROFINET interface can be made in the Inspector window in the
"Properties" tab.

A
If an online connection needs to be established between the programming device and

I
CPU, both devices must be assigned the same subnet mask and the IP addresses must
be located in the same subnet.

D
I N
A I N
IT R
S
TIA-MICRO1 - Devices & Networks
Training Document, V15.00.00 4-25
SIMATIC S7-1200 Basic Course

4.9.7.1. CPU Properties: Maximum Cycle Time

D I A
I N
A I N
IT R
S
Cycle Time
Cycle time is the time it takes for the CPU to complete one program cycle. Because parts of the
user program can also be processed conditionally and the program execution can also be
interrupted (for example, by diagnostics interrupts, time interrupts, hardware interrupts etc.), the
length of the cycle time is not the same in every cycle.

Maximum Cycle Time

I A
The operating system monitors the runtime of the program for the configured upper limit.

D
If the runtime of the program is longer than the “Maximum cycle time” set here

I N
… the operating system calls the associated time error interrupt OB.
… the operating system enters the event in the diagnostics buffer.

I N
… the operating system indicates the error on the error LED of the CPU.
Behavior when the maximum cycle time is exceeded:
• S7-1200:

A

R
The CPU remains in RUN mode even if no time error interrupt OB is programmed.

IT
S7-1500:
If no time error interrupt OB is programmed, the CPU changes to STOP mode.

S If the runtime of the S7-1200/1500 program is more than twice as long as the set maximum cycle
time (2xMaxCycleTime error), the CPU changes to STOP mode without attempting to call the
time error interrupt OB.
With the RE_TRIGR instruction, the monitoring of the cycle time can be retriggered or reset to 0.

Minimum Cycle Time


The minimum cycle time is the minimum time that should pass for the one-time execution of the
cyclic user program and the updating of the associated I/O. The start of the next CPU cycle is
delayed if this time has not yet expired.

TIA-MICRO1 - Devices & Networks


4-26 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

4.9.7.2. CPU Properties: System and Clock Memory

D I A
I N
N
PLC tags

A I
IT R
S A PLC tag is automatically created for each available system or clock memory bit.

System Memory (4 bits)


These are memory bits that provide system status information.

A
• "FirstScan" =1 in the first CPU cycle; otherwise =0,


"DiagStatusUpdate" =1, if the diagnostic status has changed,

D I
One static 1-memory bit and 0-memory bit each (“AlwaysTRUE”, “AlwaysFALSE”),

Clock Memory (8 bits)

I N
These are memory bits for which the binary value is changed periodically by the operating system

N
of the CPU with a pulse-pause ratio of 1:1. The various frequencies are shown in the picture.

I
Clock memory (bits) is used to trigger actions periodically.
For example, to make an indicator light flash

R
Attention!
A
Clock memory (bits) are not synchronized with the CPU cycle; in other words, with long

IT
cycle times, the state of the clock memory (bits) can change more than once within one
cycle.

S
TIA-MICRO1 - Devices & Networks
Training Document, V15.00.00 4-27
SIMATIC S7-1200 Basic Course

4.9.7.3. CPU Properties: Password Protection

Write protection for fail-safe functions

Write protection for fail-safe and standard S7 functions

Full protection for fail-safe and standard S7 functions

I A
Full protection for fail-safe, standard S7 functions

D
and HMI access

I N
N
HMI Standard Fail-Safe
/Fail-Safe Standard

I
read write functions
write read write

R A 1
2

IT
3
4

S
Protection Levels
With the following protection levels, the access rights (read / write) of the programming device to
the CPU are specified:
• Full access incl. fail-safe (no protection): → Default setting for F-CPU
Read and write access is always permitted.


Full access (no protection): → Default setting for non-F-CPU
Read access is always permitted, write access only to standard program.
Read access: → Write protection

D I A
Read-only access possible. No data can be changed in the CPU and no blocks or modified


specifying a password.

N
hardware configuration or parameter assignment can be downloaded to the CPU without

I
HMI access: → Write and read protection for STEP7

A I N
No write or read access is possible from the engineering. Only the CPU type and identification
data can be displayed in the Project tree under "Accessible devices". It is not possible to
display online information or blocks under "Accessible devices" without entering a password.
No access (complete protection): → General write and read protection for STEP7 and HMI.

IT R
Now, access for HMI devices without a configured password in the connection is also not
possible.

S
Access Permitted through Passwords
In the example shown, "No access (complete protection)" is selected. This means that without a
password, STEP7 and HMI devices can neither read-access nor write-access the CPU.
The above explained protection levels can, however, be lifted again with passwords:
• By specifying a password 4 an HMI device can once again read-access and write-access
the CPU. For STEP7, however, neither read-accesses nor write-accesses are possible.
• By specifying a password 3 an HMI device can once again read-access and write-access
the CPU and for STEP7, only read-accesses are permitted, not write-accesses.
• By specifying a password 2 read-accesses and write-accesses of the standard program of
the CPU are possible for both an HMI device as well as for STEP7.

TIA-MICRO1 - Devices & Networks


4-28 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

• By specifying a password 1 read-accesses and write-accesses of the CPU are possible for
both an HMI device as well as for STEP7.

Permitting Access by Means of PUT/GET Communication:

A
• So that other controllers can access the CPU by means of PUT and GET functions, this must

I
be permitted in the Settings of the CPU under Protection & Security > Connection
mechanisms.

I N D
A I N
IT R
S
D I A
I N
A I N
IT R
S
TIA-MICRO1 - Devices & Networks
Training Document, V15.00.00 4-29
SIMATIC S7-1200 Basic Course

4.9.8. Compiling the Hardware / Software and Downloading it into the CPU

Compile Download
(only changes) (only changes)

D I A
N
1xR 1xR

N I
A I Status / Error

IT R information

S
Compiling / Downloading the Hardware Configuration
The following components of a hardware station can be compiled and downloaded:
• Hardware and software (only changes)
All changes to the hardware configuration and hardware parameter assignment as well as all
changes to the user program are compiled/downloaded.


Hardware (only changes) / Hardware configuration
Only the changes are compiled/downloaded,
Hardware (rebuild all)

D I A
compiled/downloaded.

I N
The entire hardware configuration and hardware parameter assignment is

A I N
IT R
S
TIA-MICRO1 - Devices & Networks
4-30 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

4.10. Task Description: Creating a Project with an S7-1500 Station

D I A
I N
A I N
IT R
S
Task Description:
A new project with the name "My_Project" is to be created. It is to contain an S7-1200 station
whose configuration is to correspond exactly to that of your training device.
Furthermore, the modules are to be assigned parameters and the input and output addresses are
to be set so that they match those specified in the chapter "Training Devices".

D I A
I N
A I N
IT R
S
TIA-MICRO1 - Devices & Networks
Training Document, V15.00.00 4-31
SIMATIC S7-1200 Basic Course

4.10.1. Exercise 1: Setting the IP Address of the PG


PG with Windows 7

D I A
I N
A I N
IT R
Task
S You are to set the IP address of the Ethernet interface of the PG.

What to Do:

an Ethernet cable.

D A
1. Connect the Ethernet interface of the PG to the "P2" connection on the training device using

I
2. Assign the IP address 192.168.111.90 and the subnet mask 255.255.255.0 to this PG
interface. Proceed as shown in the picture.

I N
A I N
IT R
S
TIA-MICRO1 - Devices & Networks
4-32 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

4.10.2. Exercise 2: Read out the Firmware version


and reset the CPU to Factory Settings

D I A
I N
A I N
IT R
Task
S
Read out the Firmware version of the CPU and reset the CPU to factory settings and also reset
the IP address of the CPU.

What to Do:
1. Open the Online access.

D I A
3. Activate "Update acessible devices"

I N
2. Open the Interface which you are using (Intel(R) 82574L Gigat Network Connection)

N
4. In the appearing list open the CPU and activate "Online & diagnostics"

I
5. In "General" read out the Firmware version

A
6. in "Functions" perform a "Reset to factory settings" with the option "Delete IO adress"

IT R
S
TIA-MICRO1 - Devices & Networks
Training Document, V15.00.00 4-33
SIMATIC S7-1200 Basic Course

4.10.3. Exercise 3: Deleting Old Projects

1xR

D I A
I N
A I N
IT R
Task
S Delete the TIA Portal projects on the PG.

What to Do
1. Start the Windows Explorer
2. In the directory D:\Courses, delete all projects.

D I A
Note

I N
Projects that are to be deleted must to be closed!

A I N
IT R
S
TIA-MICRO1 - Devices & Networks
4-34 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

4.10.4. Exercise 4: Creating a New Project

D I A
I N
A I N
IT R
S
What to Do
Create a new project in the shown path and give it the name “My_Project”.

D I A
I N
A I N
IT R
S
TIA-MICRO1 - Devices & Networks
Training Document, V15.00.00 4-35
SIMATIC S7-1200 Basic Course

4.10.5. Exercise 5: Creating a S7-1200 - Station

D I A
I N
A I N
IT R
S
What to Do
In your offline project, you are to create a S7-1200 station matching your training device.

D I A
I N
A I N
IT R
S
TIA-MICRO1 - Devices & Networks
4-36 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

4.10.6. Exercise 6: Configuring the CPU Signal Board

D I A
I N
A I N
IT R
S
What to Do
You are to configure the CPU Signal Board as shown in the slide.

D I A
I N
A I N
IT R
S
TIA-MICRO1 - Devices & Networks
Training Document, V15.00.00 4-37
SIMATIC S7-1200 Basic Course

4.10.7. Exercise 7: Configuring the S7-1200 Station

D I A
I N
A I N
IT R
Task
S The configuration of the S7-1200 in the offline project must match exactly with the configuration of
your training device. Attention should be given in particular to the order numbers and versions of
the modules.
The current address assignment is located in the lower section of the working area in the

What to Do
changed in the table.

D A
"Devices & networks" editor in the "Device view" tab of the module. The addresses can be

I
I N
1. In the "Devices & networks" editor, select the "Device view" of the S7-1200.
2. In the Task Cards, open the "Hardware catalog".

N
3. Configure the S7-1200 station according to your training unit.

I
4. Open the lower section of the working area of the "Devices & networks" editor (see picture)

A
and, in the table, enter the I/O addresses shown in the picture.

R
5. Save your project.

IT
S
TIA-MICRO1 - Devices & Networks
4-38 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

4.10.8. Exercise 8: CPU Properties: Assigning the IP Address

D I A
I N
A I N
IT R
Task
S Configure the S7-1200 CPU's IP address and subnet mask as shown in the pictures above.

What to Do

A
1. In the "Devices & networks" editor, select the "Device view" of the S7-1200 CPU.

I
2. Select the CPU and open the "Properties" tab in the Inspector window.

D
3. There, select the "PROFINET interface [x1]" tab and then under "IP protocol" enter the IP

4. Save your project.

I N
address and subnet mask shown (see lower picture).

A I N
IT R
S
TIA-MICRO1 - Devices & Networks
Training Document, V15.00.00 4-39
SIMATIC S7-1200 Basic Course

4.10.9. Exercise 9: CPU Porperties: Adresses of the integrated Inputs / Outputs

D I A
I N
A I N
IT R
Task
S You are to parameterize the I/O addresses of the integrated Inputs and Outputs of the CPU as
shown in the picture.

What to Do
1. In the Device view, select CPU (see picture).

I A
2. In the Inspector window, in the “DI14 / DQ10” tab, you can enter the I/O address as shown in
the picture.

D
3. Save your project.

I N
A I N
IT R
S
TIA-MICRO1 - Devices & Networks
4-40 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

4.10.10. Exercise 10: CPU Properties: Parameterizing the Clock Memory Byte

D I A
I N
A I N
IT R
Task
S In the CPU Properties, you are to parameterize memory byte 10 as a clock memory byte.

What to Do

A
1. In the "Properties" tab, select the folder "System and clock memory ".

I
2. Enable the clock memory (byte) and specify address 10 for the byte address.
3. Save your project.

D
Note:

I N
I N
Only the Clock memory and not the System memory is required. For that reason,
deactivate the System memory byte.

A
IT R
S
TIA-MICRO1 - Devices & Networks
Training Document, V15.00.00 4-41
SIMATIC S7-1200 Basic Course

4.10.11. Exercise 11: Analog I/O module: I/O adresses

D I A
I N
A I N
IT R
Task
S You are to parameterize the I/O addresses of the analog I/O module as shown in the picture.

What to Do
1. In the Device view, select the analog I/O module (see picture).

shown in the picture.

D I A
2. In the Inspector window, in the “Properties > AI4/AQ2” tab, you can enter the I/O address as

3. In the assignment of the process image, set “None” because the analog value of the module
will not be used in the program ,
4. Save your project.

I N
A I N
IT R
S
TIA-MICRO1 - Devices & Networks
4-42 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

4.10.12. Exercise 12: DI/DQ module: I/O addresses

D I A
I N
A I N
IT R
Task
S You are to parameterize the I/O addresses of the DI/DQ module to which the conveyor model is
connected. The I/O addresses used in the STEP 7 program must match the addresses of the
DI/DQ module parameterized here.

What to Do
4. In the Device view, select the DI/DQ module (see picture).

D I A
6.
shown in the picture.

N
5. In the Inspector window, in the “Properties > DI8/DQ8” tab you can enter the I/O address as

I
Set the update of the Process image to "Automatic update" so that the address is

7. Save your project.

A I N
automatically updated by the system in every program cycle.

Notes:

IT R
1. The 1500 CPU offers the possibility of using up to 31 process image partitions. "PIP 1" to

S "PIP 31" process image partitions can be assigned to certain Organization Blocks. After the
OB is started, the assigned process image partition for the inputs is updated by the system.
At the end of the OB, the outputs of the assigned process image partition are written to the
I/O outputs by the system. The process image partitions are excluded from the automatic
update.
2. A process image partition can be updated in the user program with special instructions. For
this, there are the functions "UPDAT_PI" for the process image partition of inputs and
"UPDAT_PO" for the process image partition of outputs.

TIA-MICRO1 - Devices & Networks


Training Document, V15.00.00 4-43
SIMATIC S7-1200 Basic Course

4.10.13. Exercise 13: : Compiling the Device Configuration


and Downloading it into the CPU

1xR 1xR

D I A
I N
1

A I N
R
2
Status / Error

IT
information

Task
S
You are to compile the configuration and parameterization of the S7-1500 hardware station and
then download it into the CPU.
Note:

I A
As long as the CPU doesn’t have a program, the CPU does not go into RUN mode when there is
a restart! That is, if, as shown in the picture, you only download the hardware configuration into

D
the CPU in this exercise, and the CPU will not switch into the RUN mode with a subsequent
restart!

What to Do

I N
N
1. In the Project view, select your S7-1500 station.

I
2. Compile the HW-Station (right-click on the station, see picture)

A
3. After an error-free compilation, download the hardware configuration into the CPU

R
(right-click on the station, see picture)

IT
SFill in the dialog "Extended download to device" on the next page

TIA-MICRO1 - Devices & Networks


4-44 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

D I A
1

I N
A I N 3

IT R 2

S Fill in the dialog in the order which is shown in the picture above.
to 1 In "Connection to interface/subnet" select PN/IE
4

to 2: For refreshing the list "Show all compatible devices" activate "Start search"
to 3: In refreshed list "Show all compatible devices" select the S7-1200 CPU
to 4: Start the download using the "Load" botton.

D I A
N
Accept the follow dialog and activate "Load"

N I
A I
IT R
S
continue on the next page

TIA-MICRO1 - Devices & Networks


Training Document, V15.00.00 4-45
SIMATIC S7-1200 Basic Course

In the following dialog activate "Start" the CPU after the download

D I A
I N
I N
In the inspector window check if the download was succesful

A
IT R
S
D I A
I N
A I N
Note: The CPU couldn't be started because no user program has been downloaded.

IT R
S
TIA-MICRO1 - Devices & Networks
4-46 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

4.10.14. Exercise 14: Setting the Time

D I A
I N
A I N
IT R
Task
S By means of the TIA Portal, you are to set the time on the controller.

What to Do
1. Open the Online access of the S7-1200 CPU via the object “Online & diagnostics” in the
Project tree.

I A
2. Establish an online connection to the controller via the button “Go online” (The “Go online”

D
button is located in the toolbar and in the ‘Online access’ window opened in the working
area).

I N
3. In the ‘Online access’ window, switch to the menu “Functions > Set time”.
(The PG/PC time and the Module time can be seen.)

“Apply” button.

A I N
4. Adopt the PG/PC’s time by activating the item “Take from PG/PC” and confirm with the

Note:

IT R
If the item “Take from PG/PC” is deactivated, the module time can be manually changed.

S
TIA-MICRO1 - Devices & Networks
Training Document, V15.00.00 4-47
SIMATIC S7-1200 Basic Course

4.11. Additional Information

D I A
I N
A I N
IT R
S
D I A
I N
A I N
IT R
S
TIA-MICRO1 - Devices & Networks
4-48 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

4.11.1. Area for Modules Not Plugged In

Open / Close area

D I A
I N
A I N
IT R
S
Area for Modules Not Plugged In
Modules that are intended to be assigned to a device, for example as the result of a copy action,
but for which the corresponding rack does not have a free compatible slot are moved
automatically to the "area for modules not plugged in". Modules are added to the area for
modules not plugged in under the following conditions:


When a module is copied or moved within the Project tree.

compatible slot free on its rack.

D I A
When a module is dragged to a device in the Network view, even though there is no

I N
In the Device view, when a module is directly moved into the area from the rack or Hardware
catalog.

N
In the Project tree, the modules with parameterization (e.g. addresses) are stored under the

I
relevant device in the folder "Local modules".

A
The modules are ignored when downloading to the target system. There is therefore no
consistency check for modules in the "area for modules not plugged in".

IT R
S
TIA-MICRO1 - Devices & Networks
Training Document, V15.00.00 4-49
SIMATIC S7-1200 Basic Course

4.11.2. Swapping a Slot / Inserting a Module between Two Modules

D I A
I N
A I N
IT R
S
Swapping a Slot or Inserting a Module between Two Modules.
Using drag & drop, drag the modules in front of or behind the slot number until the marking
appears at the desired location, as shown in the picture. The module is placed where the marking
is and the modules behind it are moved one slot to the right.

D I A
I N
A I N
IT R
S
TIA-MICRO1 - Devices & Networks
4-50 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

4.11.3. Copying Modules from a Reference Project

D I A
I N
A I N
IT R
S Via the menu "View", the “Reference projects” view can be shown, in which projects can be
opened as write-protected. Modules can be copied into the Device view from a Reference
Project. In doing so, all parameter assignments are adopted.

D I A
I N
A I N
IT R
S
TIA-MICRO1 - Devices & Networks
Training Document, V15.00.00 4-51
SIMATIC S7-1200 Basic Course

4.11.4. Unspecified CPU

D I A
I N
A I N
IT R
S For the selection of the controller, you can also choose an “Unspecified CPU”. This is necessary
when the real CPU is not yet known but you would already like to start programming. Here, you
only need to specify the firmware of the CPU which is to be used later on. The firmware version
must be specified since some functions and instructions which are used for programming depend
on the firmware version.

I A
Then, you can write the program without having configured the actual hardware. The hardware
can later be configured from the Hardware catalog or determined online.

D
I N
A I N
IT R
S
TIA-MICRO1 - Devices & Networks
4-52 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

4.11.5. ‘View’ Settings of the Task Cards

Single pane mode Multi-pane mode

A
Change pane

I
mode

I N D
A I N
IT R
S You can choose between two pane modes:
• Single pane mode:
There is only one pane open at a time. If a different pane is selected, the previously open
pane is closed automatically.

A
• Multi-pane mode:
Several panes can be open at the same time.

Setting for the Device Configuration

D I
I N
Since there is generally more than one version of a module when configuring the devices (CPUs,
I/O modules), the required version must be selected.
Because this additional information on the modules selected in the catalog is shown in the

A I N
"Information" pane, it is recommended that the multi-pane mode is set here.

IT R
S
TIA-MICRO1 - Devices & Networks
Training Document, V15.00.00 4-53
SIMATIC S7-1200 Basic Course

Contents 5
D I A
5.
I N
PLC Tags ................................................................................................................. 5-2
5.1.
5.1.1.
5.3.
I N
What are Tags and Why do You Need them? ...................................................................... 5-3
Addresses of PLC Tags ........................................................................................................ 5-4

A
PLC Tag tables ..................................................................................................................... 5-5
5.3.1.
5.3.2.
5.3.3.

IT R
PLC Tags and PLC Constants .............................................................................................. 5-6
Finding / Replacing / Sorting PLC Tags ................................................................................ 5-8
Error Indication in the PLC Tag Table .................................................................................. 5-9

S
5.3.4. Retentiveness of PLC Tags ................................................................................................ 5-10
5.3.5. PLC Tags in the Device View ............................................................................................. 5-11
5.3.7. PLC Tags: Detail view ......................................................................................................... 5-12
5.3.8. Absolute and Symbolic Addressing .................................................................................... 5-13
5.3.9. Renaming / Rewiring Tags.................................................................................................. 5-14
5.4. Monitoring PLC Tags .......................................................................................................... 5-15
5.4.1. Modifying PLC Tags by means of the Watch Table............................................................ 5-16
5.5. Exercise 1: Copying the PLC Tag Table from the Library .................................................. 5-17
5.5.1. Exercise 2: Creating the PLC tag table "Conveyor" and "Simulator".................................. 5-18
5.5.2.
5.5.3.
5.6.
I A
Exercise 3: Monitoring the “Conveyor” PLC Tag Table ...................................................... 5-19
Exercise 4: Modifying using the Watch Table ..................................................................... 5-20

D
Additional Information ......................................................................................................... 5-21

N
5.6.1. Copy & Paste PLC Tags to Excel ....................................................................................... 5-22

I
5.6.2. Defining (Declaring) Tags while Programming ................................................................... 5-23
5.6.3. HMI Access to PLC Tags .................................................................................................... 5-24

A I N
IT R
S
TIA-MICRO1 - PLC Tags
Training Document, V15.00.00 5-1
SIMATIC S7-1200 Basic Course

5. PLC Tags

At the end of the chapter the participant will ...

...

… I A
be familiar with PLC tags and their memory areas

be able to create PLC tags and address them

D


I N
know elementary data types

be familiar with global constants and system constants

...

A I N
learn how to monitor and modify PLC tags

IT R
S
D I A
I N
A I N
IT R
S
TIA-MICRO1 - PLC Tags
5-2 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

5.1. What are Tags and Why do You Need them?

A tag...

• saves values/data and requires space on the CPU

A
• is specified by its name, memory area, address and data type

I
(dimension, possible value range, allowed instructions, )

Memory areas of PLC tags:

I N D Process images with


status of Inputs / Outputs


I
Auxiliary tags for saving values in the

A N
Process (image) tags for Inputs or Q Outputs
Memory byte area

R
Memory bits for saving
- results of logic operations

IT
- calculation results

S
The Importance of PLC Tags
Next to commands, tags (variables) are the most important elements of a programming system.
Their task is to save values in a program so that they can be further processed at a later time.

Data Types

carried out with these values.

Memory Areas of Inputs and Outputs

D I A
The data type determines which values are accepted by data and which instructions can be

I N
Within a controller, the data is stored in different memory areas. The input signals of input
modules are stored in the process image for inputs where they can be consistently read out
throughout a cycle. The control of the process happens via the process image for outputs which
is then written to the output modules.

Memory Byte Area

A I N
R
Internally, there is an additional storage area in which values can be saved. Since the clarity and
the re-usability of individual tags (variables) of the memory byte area are not fulfilled, there are

IT
still other areas which will be discussed in later chapters.

S
TIA-MICRO1 - PLC Tags
Training Document, V15.00.00 5-3
SIMATIC S7-1200 Basic Course

5.1.1. Addresses of PLC Tags

Process Image Inputs (PII) Process Image Outputs (PIQ)


%IW0 %QW0
7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 ... 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 ...

A
%IB0 %EI1 %QB0 %QB1

z.B. %I1.5

D I z.B. %Q0.2

N
Memory area

z.B. %M25.4
%MW24

N I%MD24

%MW26
z.B. %M26.4

... 7 6 5 4 3
%MB24
2 1 0 7 6 5 4 3

A
%MB25
I
2 1 0 7 6 5 4 3
%MB26
2 1 0 7 6 5 4 3 2 1 0 ...
%MB27

Bit

IT R
Byte, Word, DWORD
→ %{Area}{Byte-Adr.}.{Bit-Adr.}

→ %{Area}{Größe}{Byte-Adr.}


(z.B. %M8.4)

(z.B. %MD24)

S
LREAL (64bit)

Addressing
→ %{Area}{Adress of the start bit} (z.B. M15.0)

An address exactly defines where values are written or from where they are read.
They begin at byte address, that is, at the number “0”.
The addresses are consecutively numbered, and, within a byte, the bit address 0..7 is numbered
from right to left.

Address Style With/Without %

D I A
I N
The %-character identifies the presentation of an address. It can be left out during address entry
since it is automatically added by the engineering framework.

PLC Tags > 32 Bits:

A I N
For tags that are greater than 32 bits (e.g. LWORD), only the start bit is specified during
addressing since this can only be accessed symbolically. The required number of bytes that must

R
be reserved for these tags results from the data type of the PLC tag.

IT
S
TIA-MICRO1 - PLC Tags
5-4 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

5.3. PLC Tag tables

Creating several tag tables:


• to keep a better overview

D I A
I NDeclaration of a tag:
• define name and data type
• define memory area and address

A I N
IT R shows all tags from all tag tables

S
PLC Tag Tables
number of tags in the table

In order to achieve a good readability of the CPU program, it makes sense to structure the data
storage. For this, there are PLC tag tables for the PLC tags.

Tag Tables

I A
The default tag table (name can be changed) contains additional CPU information and thus
cannot be deleted. It can be used for any PLC tags, but for better clarity, it is recommended that
several tag tables be created.

D
Declaration and Definition of PLC Tags

I N
In the declaration of a tag in the PLC tag table, the symbolic name (for example, "M_Jog_Right"),
the data type (for example, Bool) and the absolute address (for example, M16.2) are defined.

A I N
IT R
S
TIA-MICRO1 - PLC Tags
Training Document, V15.00.00 5-5
SIMATIC S7-1200 Basic Course

5.3.1. PLC Tags and PLC Constants

D I A
I N
A I N
IT R
S
PLC Tags
The PLC tag table contains the declaration (definition) of CPU-wide valid and thus global tags
and constants. For each CPU added in the project, a PLC tag table is automatically created. A
PLC tag table contains one tab each for Tags and User constants; the Default tag table also
contains a tab for System constants. Tags are operands with changeable content used in the

A
user program.

User Constants

D I
A constant defines an unchangeable data value. During program execution, constants can be

I N
read by various program elements, but they cannot be overwritten. Changing the constant value
while the program is running is not possible.
In TIA Portal, it is possible to declare symbolic names for constants so as to make static values

N
available in the program under one name. These symbolic constants are valid throughout the

I
CPU. The declaration of the constants is made in the "User constants" tab of the PLC tag table.

A
Constants are operands with unchangeable content, and in addition, constants do not require an
absolute address.

IT R
Creating Tags and Constants with Group Function
By clicking on the "Fill" symbol in the lower right corner of the cell and then dragging it down, tags

S and constants are automatically created (comparable to Excel).


It is possible to automatically create tags and constants through the "Name" and "Address" (only
for tags) columns. The new tags and constants are created with the name of the current
tag/constant appended by a consecutive number. From a tag or constant with the name
"T_Station", new tags/constants are then created with the names "T_Station_1", "T_Station_2"
etc.

TIA-MICRO1 - PLC Tags


5-6 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

System Constants
System constants are unique throughout the CPU. Global constants which are required by the
system and are automatically created. System constants can, for example, serve the addressing
and identification of hardware objects.
Rules
System constants are automatically assigned in the Device view or Network view when
components are inserted and are entered in the Default tag table ("System constants" tab). A

I A
system constant is created for each module but also for each submodule. In that way, for
example, an integrated counter is also given a system constant. System constants consist of a
symbolic name as well as a numeric HW-ID and cannot be changed.

D
N
System Constant Names

I
The names of system constants are hierarchically structured. They consist of a maximum of four
hierarchy levels which in each case is separated by a tilde "∼". In this way, you can recognize the

N
"path" to the relevant hardware module based on the name.

A I
IT R
S
Example

D I A
PROFINET interface 1 of the local CPU.

I N
A system constant with the name "Local~PROFINET_interface_1~Port_1" denotes Port 1 of the

A I N
IT R
S
TIA-MICRO1 - PLC Tags
Training Document, V15.00.00 5-7
SIMATIC S7-1200 Basic Course

5.3.2. Finding / Replacing / Sorting PLC Tags

Click on the column name to sort

D I A
I N
A I N
IT R
S
Sorting
By clicking on one of the column names "Name", "Data type" or "Address" you can sort tags are
alphabetically or according to address (ascending or descending) depending on the column.

Finding / Replacing

also be used (? for one character, * for several characters).

Example of "Find and replace":

D A
In the PLC tag table, tags can be found and replaced via the "Tasks" Task Card. Dummies can

I
I N
Assign byte address 4. to all outputs with byte address 8.:
Find: Q 8. and Replace with: Q 4.

A I N
IT R
S
TIA-MICRO1 - PLC Tags
5-8 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

5.3.3. Error Indication in the PLC Tag Table

!!!
D I A
If the name (symbol) already exists in the table,
a "(1)" is automatically added

The absolute address is not compatible with the


data type of the tag!

I N
A I N Absolute address is used twice!

IT R !!!

S
Syntax Check
With every entry, there is a syntax check in which existing errors are displayed in RED, or for
warnings in YELLOW. A still faulty PLC tag table can be saved but as long as it is still faulty, the
program cannot be compiled and downloaded into the CPU.

D I A
I N
A I N
IT R
S
TIA-MICRO1 - PLC Tags
Training Document, V15.00.00 5-9
SIMATIC S7-1200 Basic Course

5.3.4. Retentiveness of PLC Tags

S7-1500:
 Retentiveness (retain)
can be set for memory
bytes, timers and

A
counters

Example:

D I S7-1200:
 Retentiveness (retain)
can only be set for

I N MB0 … MB16 are retentive memory bytes

A I N
IT R
S
Retentive (Retain) Memory
S7-1500 CPUs have a retentive memory for storing retentive data even if power is lost or turned
off. The size of the retentive memory is documented in the technical data of the CPU.
The utilization of the retentive memory of the configured CPU is shown offline in the Project tree
under "Program info > Resources of…" or online in the Project tree under "Online & diagnostics >
Diagnostics > Memory".

I A
When you define data as retentive, their contents are retained after a power failure, during CPU
start-up and during loading of a modified program.

D
• Memory bytes, timers, counters

I N
You can define the following data or objects as retentive:

N
• Tags of global data blocks

A I
Tags of instance data blocks of a function block
Certain tags of technology objects are always retentive, for example, adjustment values of

IT R
absolute value encoders.

Memory Bytes, Timers, Counters

S For the S7-1500, the number of retentive memory bytes, timers and counters can be defined in
the PLC tag table via the "Retain" button.
For the S7-1200, only the number of retentive memory bytes can be defined in the PLC tag table
via the "Retain" button.

TIA-MICRO1 - PLC Tags


5-10 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

5.3.5. PLC Tags in the Device View

D I A
I N
A I N
IT R
S The PLC tags of inputs and outputs can also be declared and changed in the Device view. In the
Properties, in the Inspector window you open the IO tags tab for this.
In addition, the system constants of the selected hardware are displayed in the "System
constants" tab.

D I A
I N
A I N
IT R
S
TIA-MICRO1 - PLC Tags
Training Document, V15.00.00 5-11
SIMATIC S7-1200 Basic Course

5.3.7. PLC Tags: Detail view

Select the
Tag table
Select the
Hardware module

D I A
I N
A I N
IT R
S
Detail view
The Details view shows the tags of the object selected (highlighted) in the Project tree:
For example:
• ...tags of the selected tag table
• ...channels of the selected local modules and their tags

example.

D I A
That way it is easy for the user, using drag & drop, to integrate tags in the user program, for

Using a Tag as Operand

I N
N
During programming, the name of the tag can be entered, or, it can be selected from the

I
automatic symbol selection as well as the Details view.

A
IT R
S
TIA-MICRO1 - PLC Tags
5-12 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

5.3.8. Absolute and Symbolic Addressing

D I A
I N
A I N
IT R
S
Absolute and Symbolic Addressing
All global tags (such as, inputs, outputs, bit memories) have both an absolute and a symbolic
address. You can define which is to be displayed or with which is to be programmed (see
picture).

A
When you use a symbolic address (for example, "M_Jog_RIGHT") to which an absolute address

I
has not yet been assigned, you can save the block but you cannot compile and download it into
the controller.

D
When you use an absolute address (for example, M16.2), it is automatically assigned a symbolic

Properties
I N
default address (for example, "Tag_1") which you can change.

N
If a block or the PLC tag table is open in the working area and a tag is selected (highlighted)

I
there, then all details are displayed in the "Properties" tab in the Inspector window where they can
also be edited.

A
IT R
S
TIA-MICRO1 - PLC Tags
Training Document, V15.00.00 5-13
SIMATIC S7-1200 Basic Course

5.3.9. Renaming / Rewiring Tags

1xR

D I A
I N
A I N
IT R
S
Renaming and Rewiring Tags
Tags can be renamed or rewired directly in the PLC tag table or as shown in the picture using the
Blocks Editor. The changes are immediately adopted in the PLC tag table and affect the entire
program.


Rename:

I A
Change the tag name, while the absolute address remains unchanged.
Rewire:

D
N
Change the associated absolute address, while the name remains unchanged.

I
A I N
IT R
S
TIA-MICRO1 - PLC Tags
5-14 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

5.4. Monitoring PLC Tags

Monitor all On / Off

D I A
I N
A I N
IT R
S
Monitoring PLC Tags
PLC tags can be monitored directly through the PLC tag table. In so doing, the "Monitor value"
shows the current value of the tags in the CPU.

D I A
I N
A I N
IT R
S
TIA-MICRO1 - PLC Tags
Training Document, V15.00.00 5-15
SIMATIC S7-1200 Basic Course

5.4.1. Modifying PLC Tags by means of the Watch Table

Modify values once Monitor all On / Off

D I A
I N
A I N
IT R Activate/Deactivate

S
values to be modified

Before you can modify tags (variables) you must create a watch table in the ‘Watch and force
tables’ folder.
Any tags (values) can be monitored and modified in a Watch table. To modify a tag, a modify
value is specified, the tag to be modified is activated (is automatically activated during creation)
and by means of the button “Modify all selected values once and now” the values of the activated
tag are loaded into the controller.

D I A
I N
A I N
IT R
S
TIA-MICRO1 - PLC Tags
5-16 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

5.5. Exercise 1: Copying the PLC Tag Table from the Library

D I A
I N
A I N
IT R
Task
S You are to copy the prepared PLC tag table "My_Tags" from the "PRO1_Lib" library into your own
project.

What to Do

I A
1. In the Task Card “Libraries > Global libraries”, open the library "PRO1_Lib" which is located in
the folder C:\02_Archives\TIA_Portal\TIA-PRO1 of your programming device.

D
2. Using drag & drop, copy the PLC tag table "My_Tags" from the Libraries’ folder Master
copies\Chapter 05 into your project’s folder PLC tags.
3. Save your project.

I N
A I N
IT R
S
TIA-MICRO1 - PLC Tags
Training Document, V15.00.00 5-17
SIMATIC S7-1200 Basic Course

5.5.1. Exercise 2: Creating the PLC tag table "Conveyor" and "Simulator"

D I A
I N
NEW

NEW

A I
Drag&Drop

N
IT R
Task
S You are to create the new PLC tag tables "Conveyor" for the inputs and outputs of he conveyor
model and "Simulator" for the Inüuts and outputs of the simulator.

What to Do
1. Using "Add new tag table", create the new PLC tag table "Conveyor".

I A
2. Open the PLC tag table "My_Tags", select the inputs and outputs of the conveyor and move

D
them inputs and outputs into the newly created PLC tag table "Conveyor" using drag & drop
(mouse pointer on tag icons, see picture).

I N
3. With the same work flow move the inputs and outputs of the simulator into the newly created
PLC tag table "Simulator".

Note:
3. Save your project.

A I N
As an alternative, for every tag you can define in which tag table it is to be saved. You do this in

R
the tag table "Show all tags" via the column "Tag table".

IT
S
TIA-MICRO1 - PLC Tags
5-18 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

5.5.2. Exercise 3: Monitoring the “Conveyor” PLC Tag Table

D I A
N
"K_Right" (Q 8.5) "B_Bay1""B_Bay2""B_Bay3" "B_LB"
"K_Left" (Q 8.6) (I 8.5) (I 8.6) (I 8.7) (I 8.0)

N I
A I
IT R "S_Bay1" "S_Bay2" "S_Bay3" "S_BayLB"
(I 8.1) (I 8.2) (I 8.3) (I 8.4)

S
"P_Bay1" "P_Bay2" "P_Bay3" "P_BayLB"
(Q 8.1) (Q 8.2) (Q 8.3) (Q 8.4)

Task
You are to monitor the inputs in the tag table.

What to Do
1. In order to adopt the changes and so that the CPU can switch to RUN, compile and download
the software.
2. Switch your conveyor model on.

D I A
3. Open the newly created PLC tag table "Conveyor" and activate the function "Monitoring".

I
displayed at the corresponding inputs.
N
4. On the conveyor model, press the Bay pushbuttons and check whether Status '1' or "TRUE" is

A I N
IT R
S
TIA-MICRO1 - PLC Tags
Training Document, V15.00.00 5-19
SIMATIC S7-1200 Basic Course

5.5.3. Exercise 4: Modifying using the Watch Table

Modify values once Monitor all On / Off

D I A
I N
A I N
IT R Activate/Deactivate

S
values to be modified

Task
You are to modify the outputs with the help of a watch table.

What to Do
1. In the Watch and force tables folder, add a new watch table.
2. Open the newly created watch table.
3. In the Project tree, select the PLC tag table "Conveyor".

D I A
4. From the Detail view, copy the PLC tags of the "Conveyor" PLC tag table into your watch table
using drag & drop.

I N
5. For some of the outputs, specify the Modify value TRUE, that is, 1.

N
6. Check whether the relevant tags are activated for modifying.

I
7. Activate the function "Monitor all" and modify the outputs.

A
8. Check whether the relevant outputs are activated.

IT R
9. For the outputs, specify the Modify value FALSE, that is, 0 in order to switch them off again.
10.Modify the outputs once again.

S 11.Save your project.

TIA-MICRO1 - PLC Tags


5-20 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

5.6. Additional Information

D I A
I N
A I N
IT R
S
D I A
I N
A I N
IT R
S
TIA-MICRO1 - PLC Tags
Training Document, V15.00.00 5-21
SIMATIC S7-1200 Basic Course

5.6.1. Copy & Paste PLC Tags to Excel

Import from Excel only in


"Show all tags" tag table

D I A
Export from all tag tables to

I N Excel

A I N
IT R
S
Copy & Paste from and to Excel
The Windows Copy & Paste function as well as the Import / Export function can be used to easily
copy individual or several tags from a PLC tag table or a data block to Excel to further process
it/them there and then to copy it/them back from Excel to the PLC tag table or the data block.

D I A
I N
A I N
IT R
S
TIA-MICRO1 - PLC Tags
5-22 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

5.6.2. Defining (Declaring) Tags while Programming

D I A
I N
A I N
IT R
S
Defining (Declaring) Tags while Programming
If, during programming, unknown tags are used, they can be defined later-on network-by-network.
Advantage:
In the dialog that appears, only addresses are offered that are unused up to that point. In this

word (overlapping access).

D I A
way, for example, errors are avoided such as the using of bits that belong to an already used

I N
A I N
IT R
S
TIA-MICRO1 - PLC Tags
Training Document, V15.00.00 5-23
SIMATIC S7-1200 Basic Course

5.6.3. HMI Access to PLC Tags

PLC tags

D I A
Neither visible nor accessible

HMI tags

I N
A I N
IT R
S
HMI Tag Access
Here, protective mechanisms can be declared with whose help unwanted accesses to PLC tags
from HMI devices can be prevented:

• "Visible in HMI":

I A
During HMI configuration, only PLC tags with the attribute "Visible in HMI" can be selected.
This filter function can, however, be disabled in the selection dialog shown by activating
"Show all".

D

I N
"Accessible from HMI" (only S7-1200 and S7-1500):
The HMI device can only access the PLC tags which have the attribute "Accessible from HMI"
online. This protective function integrated in the S7-1200/1500 operating system ensures that

I N
the HMI device does not overwrite certain tags. Tags which are not "Accessible from HMI" are
accordingly also not "Visible in HMI".

A
IT R
S
TIA-MICRO1 - PLC Tags
5-24 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

Contents 6
D I A
6.
I N
Program Blocks and Program Editor ................................................................... 6-2
6.1.
6.2.
I N
Plant Description: The Conveyor Model as Distribution Conveyor ....................................... 6-3

A
Types of Program Blocks ...................................................................................................... 6-4

R
6.3. Structured Programming ....................................................................................................... 6-5

IT
6.4. Process Images .................................................................................................................... 6-6
6.5. Cyclic Program Execution ..................................................................................................... 6-7

S6.6.
6.6.1.
6.6.2.
6.6.3.
6.6.4.
6.6.5.
Adding a New Block .............................................................................................................. 6-8
Block Networks ..................................................................................................................... 6-9
Block Properties: Programming Language, Time Stamps .................................................. 6-10
Block Properties: Know-how Protection .............................................................................. 6-11
Block Editor Settings ........................................................................................................... 6-12
Block Programming ............................................................................................................. 6-13
6.6.6. Programming an Instruction using "Empty Box" ................................................................. 6-14
6.6.7. Closing / Saving / Rejecting a Block ................................................................................... 6-15
6.6.8. Block Groups....................................................................................................................... 6-16
6.6.9.
6.6.10.
6.6.11.
6.6.12. I A
Block Calls .......................................................................................................................... 6-17
Compiling a Block ............................................................................................................... 6-18

D
Downloading Blocks into the CPU ...................................................................................... 6-19
Monitoring a Block .............................................................................................................. 6-20
6.6.13.
6.6.14.
6.6.14.1.
N
Deleting Blocks ................................................................................................................... 6-21

I
Uploading Blocks from the CPU into the Project ................................................................ 6-22
Blocks "Upload from Device" (Upload into Project) ............................................................ 6-23
6.6.15.
6.7.
6.7.1.
6.7.2.
N
Comparing Blocks ............................................................................................................... 6-24

I
Task Description: Jogging the Conveyor Motor .................................................................. 6-25

A
Exercise 1: Adding the "FC_Conveyor" (FC16) Block ........................................................ 6-26
Exercise 2: Programming the "FC_Conveyor" (FC16) Block ............................................. 6-27
6.7.3.
6.7.4.
6.7.5.

IT R
Exercise 3: Adjusting the OB1 Properties........................................................................... 6-28
Exercise 4: Calling "FC_Conveyor" (FC16) in OB1 ............................................................ 6-29
Exercise 5: Compiling the Program, Downloading it into the CPU and Saving it ............... 6-30

S6.7.6. Exercise 6: Monitoring "FC_Conveyor" (FC16) .................................................................. 6-31

TIA-MICRO1 - Program Blocks and Program Editor


Training Document V14.01.00 6-1
SIMATIC S7-1200 Basic Course

6. Program Blocks and Program Editor

At the end of the chapter the participant will ...

... be familiar with the different S7 block types

A
... be familiar with the principle of "structured programming"

...

...

D I
be familiar with the meaning of process images (PII, PIQ)

be able to explain the principle of cyclic program execution

...

I N
be familiar with the LAD and FBD presentation formats and be able
to select them

...

...

A I N
be able to edit, save and load a block using the editor

be able to carry out a simple program test with "Monitor block"

IT R
S
D I A
I N
A I N
IT R
S
TIA-MICRO1 - Program Blocks and Program Editor
6-2 Training Document V14.01.00
SIMATIC S7-1200 Basic Course

6.1. Plant Description: The Conveyor Model as Distribution Conveyor

4711

DI 0V
I 0.0 S_OperationON

I 0.1
I 0.2
I 0.3
S_OperationOFF
(NC)
S_Right

S_Left
-10V +10V
Poti

DO

D I A
N
P_Operation Q 4.0

N I
I
I 1.0 S_Acknowledge
"FC_Mode" (FC15): Operation ON/OFF

R A "FC_ConvMotor" (FC16): Controlling the conveyor motor


"FC_Fault" (FC17): Monitoring the transport
sequences for time

IT
P_Fault Q 5.0

"FC_Count" (FC18): Counting the transported parts

S
Conveyor Model as Distribution Conveyor
"FC_Indicate" (FC14): Controlling the indicator lights

On the conveyor, parts are transported from Bay 1 or 2 through to the light barrier, whereby the
transport sequences are monitored for time and the transported parts are counted.

Operating Modes

I A
The operation can be switched on via the switch "S_OperationON" (I 0.0) and switched off via the
switch "S_OperationOFF" (I 0.1, NC).

D
N
Operation OFF ("P_Operation", Q4.0 = 0)

I
When the operation is switched off, the conveyor can be jogged to the right via the switch
"S_Right" (I 0.2) and to the left via the switch "S_Left" (I 0.3).

N
Operation ON ("P_Operation", Q4.0 = 1)

A I
When the operation is switched on, parts are transported from Bay 1 or 2 through the light barrier.

R
For this, the part must be placed on the conveyor at Bay 1 or 2 and the relevant bay pushbutton
must be pressed. The condition is that exactly one of the two bays is occupied. The transport

IT
sequences are monitored for time. If a transport sequence takes longer than 6 seconds,
"P_Operation" (Q4.0) and with that the conveyor motor is automatically switched off. The fault is

S indicated with a 2Hz flashing light on the Simulator-LED "P_Fault" (Q5.0). "P_Operation" (Q4.0)
can only be switched back on and a new transport sequence can only then be restarted when the
fault has been acknowledged with the switch "S_Acknowledge" (I 1.0).

TIA-MICRO1 - Program Blocks and Program Editor


Training Document V14.01.00 6-3
SIMATIC S7-1200 Basic Course

6.2. Types of Program Blocks

Operating system
DB DB

Cycle

Time OB FC

D I A FB

Process
Organization
blocks

I N
Error

A I N FB FC

Legend:
OB
FB

IT R
= Organization block
= Function block
FB
The maximum nesting depth
depends on the CPU!

Blocks
S
FC
DB
= Function
= Data block
FB with
Instance DB

The automation system provides various types of blocks in which the user program and the
related data can be stored. Depending on the requirements of the process, the program can be
structured in different blocks. You can use the entire operation set in all blocks (FB, FC and OB).

Organization Blocks (OBs)

I A
Organization blocks (OBs) form the interface between the operating system and the user

D
program. The entire program can be stored in OB1 that is cyclically called by the operating

N
system (linear program) or the program can be divided and stored in several blocks (structured

I
program).

Functions (FCs)

A I N
A function (FC) contains a partial functionality of the program. It is possible to program functions
as parameter-assignable so that when the function is called it can be assigned parameters. As a
result, functions are also suited for programming frequently recurring, complex partial

IT R
functionalities such as calculations.

Function Blocks (FBs)

S Basically, function blocks offer the same possibilities as functions. In addition, function blocks
have their own memory area in the form of instance data blocks. As a result, function blocks are
suited for programming frequently recurring, complex functionalities such as closed-loop control
tasks.

TIA-MICRO1 - Program Blocks and Program Editor


6-4 Training Document V14.01.00
SIMATIC S7-1200 Basic Course

6.3. Structured Programming

Program Partitioned
Linear Program Structured Program
into Areas

OB 1 OB 1
Recipe A

Recipe B

D
OB 1 I A Pump

N
Mixer

Outlet
IN Outlet

A I
R
All instructions are found The instructions for the individual Re-usable functions are programmed
in one block (usually in functions are found in individual in individual blocks.

IT
the Organization block blocks. OB 1 calls these blocks OB 1 (or other blocks) calls these
OB 1) one after the other. blocks and passes on the

S
relevant data.

Linear Program
The entire program is found in one continuous program block. This model resembles a hard-wired
relay control that was replaced by an automation system (programmable logic controller). The
CPU processes the individual instructions one after the other.

Partitioned Program

I A
The program is divided into blocks, whereby every block only contains the program for solving a

D
partial task. Further partitioning through networks is possible within a block. You can generate

N
network templates for networks of the same type. Normally, the OB 1 organization block contains

I
instructions that call the other blocks in a defined sequence.

Structured Program

A I N
A structured program contains parameter-assignable blocks that are set up in such a way that
they can be used universally. When a parameter-assignable block is called, it is passed current
parameters (for example, the actual addresses of inputs and outputs as well as parameter

IT R
values).
Example:
− A "pump block" contains instructions for the control of a pump.

S − The program blocks, which are responsible for the control of special pumps, call the "pump
block" and provide it with information about which pump is to be controlled with which
parameters.

TIA-MICRO1 - Program Blocks and Program Editor


Training Document V14.01.00 6-5
SIMATIC S7-1200 Basic Course

6.4. Process Images

S1 K1

A
I 2.0 Q 4.3

PII

D I PIQ

Byte 0
Byte 1
Byte 2
1
User

I N
program Byte 0
Byte 1

N
0 Byte 2

I
: :
: : 1
:

R 1
A :

S IT
CPU memory area

Process Images
2

CPU memory area

For the storage of all digital input and output states, the CPU has reserved memory areas: the
process-image input table (PII) and the process-image output table (PIQ). During program
execution, the CPU accesses these memory areas exclusively. It does not access the digital input
and output modules directly.

PIQ

D I A
The Process-Image Output table (PIQ) is the memory area in which the states of all digital

N
outputs are stored. The PIQ is output to the digital output modules at the beginning of the cycle.

I
Outputs can be assigned as well as queried in the program. If an output is assigned a state in
several locations in the program, then only the state that was assigned last is transferred to the
particular output module. As a rule, these types of double assignments are programming errors.

PII

A I N
The Process-Image Input table (PII) is the memory area in which the states of all digital inputs are

R
stored. After the PIQ is output, the PII is read by the digital input modules. When an input is

IT
linked, the state of this input stored in the PII is linked. This state cannot change within a cycle
since the PII is only updated or read-in at the beginning of a cycle. This guarantees that when
there are multiple queries of the input in one cycle, the same result is always supplied.

S
TIA-MICRO1 - Program Blocks and Program Editor
6-6 Training Document V14.01.00
SIMATIC S7-1200 Basic Course

6.5. Cyclic Program Execution

Startup program: Call and execution of “Startup OB”


(once, after PowerON, for example)

Start of the cycle monitoring time

D I A
I N
Writing the process image output table
(PIQ) in the output modules

I N
Reading the input states from the input modules
CPU Cycle

A
and saving the states in the process image (PII)

IT R Call and execution of “Main OB”


(possible interruption by the call of other OBs for events,

S
such as, time-of-day interrupt, hardware interrupts, etc. )

Restart
When you switch on or switch from STOP --> RUN, the CPU carries out a complete restart
(execution of all Startup-OBs). During restart, the operating system deletes the non-retentive bit

A
memories and resets all stored hardware and diagnostic interrupts.

Cyclic Program Execution

D I
Cyclic program execution occurs in an endless loop. After the execution of a program cycle is

N
completed, the execution of the next cycle occurs automatically. In every program cycle, the CPU
carries out the following steps:

I
The CPU starts the cycle monitoring time,

N


modules,

A I
The CPU transfers the output states from the process image output table to the digital output

The CPU scans the states of the input signals and updates the process image input table,

IT R The CPU sequentially processes the instructions of the user program using the process
images, not the inputs and outputs of the digital input / output modules.

S
Cycle Time and Cycle Monitoring Time
The time that the CPU requires for the execution of the complete program cycle, is the cycle time
which is monitored for time by the CPU operating system. If the cycle time exceeds the cycle
monitoring time defined in the CPU properties, the system requests the call of the "Time error
OB". If it is loaded, it is executed. If the CPU exceeds twice the cycle monitoring time, the CPU
goes into the STOP state.

TIA-MICRO1 - Program Blocks and Program Editor


Training Document V14.01.00 6-7
SIMATIC S7-1200 Basic Course

6.6. Adding a New Block

D I A
I N
A I N
IT R
S
Inserting a Block
A new block is created as shown in the picture. When you create a block, the type of block (OB,
FB, FC or DB), the programming language, the symbolic name and number, among other things,
must be defined. The block numbers can also be assigned automatically or manually.

I A
Under "Additional information", the block can be documented in more detail, among other things,
with a Version number and an Author.

D
I N
A I N
IT R
S
TIA-MICRO1 - Program Blocks and Program Editor
6-8 Training Document V14.01.00
SIMATIC S7-1200 Basic Course

6.6.1. Block Networks

Network comments
On / Off
Open / Close
all networks
Network
Insert
Delete
Instruction comments
On / Off

D I A
I N
A I N
IT R
S
Networks
Just as the entire user program is subdivided into individual blocks, individual blocks are made up
of networks designed by the user.
Each network can be given a network label and a comment. Within the networks, the individual
instructions can be given instruction comments.

D I A
I N
A I N
IT R
S
TIA-MICRO1 - Program Blocks and Program Editor
Training Document V14.01.00 6-9
SIMATIC S7-1200 Basic Course

6.6.2. Block Properties: Programming Language, Time Stamps

Select the
programming
language

D I A
I N
A I N
R
Time stamps

IT
S
Properties
Each block has certain properties that you can display and edit. These properties are used to:
• Identify the block
• Display the memory requirements and the compilation status of the block


Display the time stamp
Display the reference information

D I A
N
• Specify the access protection

N I
Display and change the programming language

A I
IT R
S
TIA-MICRO1 - Program Blocks and Program Editor
6-10 Training Document V14.01.00
SIMATIC S7-1200 Basic Course

6.6.3. Block Properties: Know-how Protection

D I A
I N
N
1xR

A I
IT R
S
Know-how Protection
Blocks can be protected from unauthorized access with a password. With a know-how protected
block, only the following data can be read:
• Transfer parameters Input, Output, InOut, Return



Block title
Block comment
Block properties

D I A

I N
Cross references with the information which global tags are used
Just like unprotected blocks, know-how protected blocks can also be copied, called, downloaded

Note:
reading and changing.

A N
into the CPU and deleted. The code of the block, however, is protected against unauthorized

I
IT R
When downloading a know-how protected block into the CPU, the know-how protection is also
loaded in the CPU, but not the retrieval information. This results in the following consequence: if a
know-how protected block is uploaded from the CPU into an offline project, this block can no

S longer be opened offline even when the correct password is given. A block comparison between
the offline and the online version of the block is, however, still possible with the correct password.
Caution!
If you forget the password, it is no longer possible to access the block.

TIA-MICRO1 - Program Blocks and Program Editor


Training Document V14.01.00 6-11
SIMATIC S7-1200 Basic Course

6.6.4. Block Editor Settings

D I A
I N
A I N
IT R
S
Block Editor Settings
With the settings, you define how a block is to be presented when it is opened. In the editor, you
can make changes to the presentation (such as showing and hiding comments) at any time.
• Compilation

• IEC check

D I A
When "Delete actual parameters on interface update" is activated, the calls of parameterized
blocks are automatically adjusted if, within the block, parameters are deleted after the fact.

Only variables of an absolutely correct data type can be used. If an operation requires a


dimension (16 bits) is the same.
Optimized block access N
variable of the data type INT, no variable of the data type WORD can be used even if the

I
• N
Data block variables and local variables within blocks can only be addressed symbolically and

I
not absolutely. Benefit: optimum memory allocation and shorter access times
Mnemonics

A

IT R
Setting the syntax for the programming language: German (e.g. E for Eingang (Input)) or
International (e.g. I for Input)
Layout

S •
When "With absolute information" is activated the absolute addresses of global operands are
also displayed.
Operand field
Setting the maximum width and height of function block diagram and ladder diagram symbols.

TIA-MICRO1 - Program Blocks and Program Editor


6-12 Training Document V14.01.00
SIMATIC S7-1200 Basic Course

6.6.5. Block Programming

Insert network

Display Favorites
On / Off

D I A
I N
A I N
IT R Add further input

S
Block Programming
The instructions within a block can be programmed as follows:
• using drag & drop from the Favorites or the Instructions catalog to anywhere in the program
• by first selecting the location in the program and then double-clicking on the desired
instruction in the Favorites or the Instructions catalog

I A
Operands can be entered with an absolute or a symbolic address. If the tag table is highlighted

D
(not opened!) in the Project tree, tags (variables) can also be pulled from the Details view using

N
drag & drop to the appropriate location in the program.

Favorites

N I
Frequently used LAD (FBD) elements are available in the symbol bar which can be expanded

I
individually using drag & drop from the Instructions catalog.

A
IT R
S
TIA-MICRO1 - Program Blocks and Program Editor
Training Document V14.01.00 6-13
SIMATIC S7-1200 Basic Course

6.6.6. Programming an Instruction using "Empty Box"

D I A
3

I N
N
Select the Select the

I
instruction data type

R A
IT
4

S
Programming an Instruction using Empty Box
An instruction can also be programmed in the so-called "Empty box". First, the empty box is
pulled into the network from the "Instructions" task card using drag & drop and then a selection is
made on the empty box as to which instruction is to be used with which data type.

D I A
I N
A I N
IT R
S
TIA-MICRO1 - Program Blocks and Program Editor
6-14 Training Document V14.01.00
SIMATIC S7-1200 Basic Course

6.6.7. Closing / Saving / Rejecting a Block

CLOSE project and with that the block


(save or reject all changes)

SAVE project and with

D I A
that the block
(all changes !!)

I N CLOSE block
(no saving, no rejecting)

A I N
IT R
S
Closing a Block
Clicking on the symbol in the title bar, closes a block but changes are not rejected or
saved on the hard drive!

Saving a Block

I A
By using "Save project" the entire project, and with that also the block, is saved on the hard drive.
All changes made to the project are saved.

D
Rejecting a Block

I N
It is only possible to reject block changes by closing the entire project without saving. All changes

N
made in the project are rejected.

A I
IT R
S
TIA-MICRO1 - Program Blocks and Program Editor
Training Document V14.01.00 6-15
SIMATIC S7-1200 Basic Course

6.6.8. Block Groups

D I A
I N
1xR

A I N
IT R
S
Block Groups
To achieve more clarity, large programs with many blocks can be divided into different block
groups. The groupings can, for example, be related to the structure of the system to be
controlled. Even if the blocks are managed in different groups, each block must have a unique
symbolic name. Regardless of the groupings, the sum of all blocks represents the user program
of the controller.

I A
Blocks can simply be shifted between the block groups using drag & drop.

D
I N
A I N
IT R
S
TIA-MICRO1 - Program Blocks and Program Editor
6-16 Training Document V14.01.00
SIMATIC S7-1200 Basic Course

6.6.9. Block Calls

D I A
Drag & Drop

I N
A I N
IT R
S
Block Calls
If one block calls another block, the instructions of the called block are executed. Only when the
execution of the called block is completed, is the execution of the calling block taken up again
and execution continues with the instruction that follows the block call.
The block call can be programmed using drag & drop or copy & paste.

D I A
I N
A I N
IT R
S
TIA-MICRO1 - Program Blocks and Program Editor
Training Document V14.01.00 6-17
SIMATIC S7-1200 Basic Course

6.6.10. Compiling a Block

D I A
I N
A I N
IT R
S
Compiling a Block
With the Compile icon, all changes of whatever is selected (highlighted) in the Project tree are
compiled (in the example shown, all changes of the entire program are compiled). The changes
of individual blocks (select relevant block), the changes of the entire program or the changes of
the entire station with software and hardware ("Station" is selected) can be compiled.

I A
To completely compile the blocks or the station, the context menu (right click) of the folder
"Program blocks" or the station is opened and the function "Software (rebuild all blocks)" or the

D
function "Hardware (rebuild all)" is selected in the menu "Compile".

I N
In the Inspector window "Info -> Compile", the status of the compilation is displayed. If errors
occurred during compilation, you can jump directly from the error entry to the error location by
double-clicking.

A I N
IT R
S
TIA-MICRO1 - Program Blocks and Program Editor
6-18 Training Document V14.01.00
SIMATIC S7-1200 Basic Course

6.6.11. Downloading Blocks into the CPU

D I A
I N
A I N
IT R
S
Downloading into the CPU
The project data which is downloaded into the devices is divided into hardware and software
project data.
Hardware project data results from configuring the hardware, networks, and connections. The first

A
time you download the data using the icon "Download to device" the hardware project data is

I
completely loaded. In subsequent downloads, only configuration changes are downloaded.

D
In order to once more download the entire configuration, you open the context menu of the station
and select the function "Download to device > Hardware configuration".

I N
Software project data involves the blocks of the user program. The first time you download, the
software project data is completely loaded. In subsequent downloads, either by means of the icon
"Download to device" or via the context menu, only changes are downloaded.

What is to be downloaded?

A I N
R
Selection via: Context menu of device > Download to device

IT
− Hardware and
Software (only changes): Download all new and modified software project data
as well as the new and modified hardware configuration

S − Hardware configuration:
− Software (only changes):
Download the entire hardware configuration
Download all new and modified software project data

If the changes to the objects to be downloaded were not compiled before the loading,
then the compilation is automatically carried out before the download.
The download is only carried out if the compilation is error-free.

TIA-MICRO1 - Program Blocks and Program Editor


Training Document V14.01.00 6-19
SIMATIC S7-1200 Basic Course

6.6.12. Monitoring a Block

D I A Monitor Block
On / Off

I N
A I N
IT R
S
Monitoring Blocks
The test function Monitor block is used to follow the program execution within a block. The
statuses or contents of the operands used in the block at the time of program execution are
displayed on the monitor.

Monitoring

I A
Blocks can only be monitored if an online connection to the CPU exists. Furthermore, the offline

D
block must be identical to the online block. If the offline opened block does not match the block
stored online in the CPU, either the online stored block must be opened, or the offline opened

I N
block must be downloaded into the CPU before you can monitor and then you can monitor the
block.

N
In test mode, the statuses of operands and LAD / FBD elements are represented by different

Examples:

A I
colors. You can make the settings for this via Options  Settings:


IT R
Status fulfilled
Status not fulfilled


"Element is represented with a green color"
"Element is represented with a blue color"

S
TIA-MICRO1 - Program Blocks and Program Editor
6-20 Training Document V14.01.00
SIMATIC S7-1200 Basic Course

6.6.13. Deleting Blocks

D I A
N IN If you have an existing online
connection and you select a block

A I and delete it, the prompt appears


that the block will be deleted in the
project

IT R
S
Deleting Blocks
Blocks can only be deleted in the project. If you have an existing online connection and you select
a block and delete it, the dialog shown in the picture appears.

D I A
I N
A I N
IT R
S
TIA-MICRO1 - Program Blocks and Program Editor
Training Document V14.01.00 6-21
SIMATIC S7-1200 Basic Course

6.6.14. Uploading Blocks from the CPU into the Project

D I A
I N
Upload individual blocks
or the entire Blocks folder

A I N
from the CPU using
“Upload from device”

IT R
S
Uploading Blocks from the CPU into the Project

By using the button “Upload from device (Software)”, individual blocks or the entire program
folder can be uploaded into the project.

D I A
I N
A I N
IT R
S
TIA-MICRO1 - Program Blocks and Program Editor
6-22 Training Document V14.01.00
SIMATIC S7-1200 Basic Course

6.6.14.1. Blocks "Upload from Device" (Upload into Project)

D I A
I N
A I N
• Blocks that are different
online/offline are overwritten in
the project or saved under a
different name

IT R • Only blocks that exist offline


remain unaffected in the project
• Only blocks that exist online

S
are uploaded into the project

Uploading Blocks into the Project:


With "Upload from device", individual blocks or the entire CPU program including technology
objects, PLC tag tables and PLC data types can be uploaded into the project from the CPU.

If the Blocks folder or individual blocks is/are selected, then...



D I A
... blocks that only exist online in the CPU are uploaded into the offline project.
... blocks that are different online / offline are either overwritten in the offline project with the
uploaded blocks, or the uploaded blocks are additionally saved under a different name (but

I N
with the same number!) in the project. (selectable in the Upload dialog)
... blocks that only exist offline are not affected.

If the Station is selected, then...


I N
... offline all blocks, PLC data types, technology objects and symbols are deleted (!) and the

A
online blocks, PLC data types, technology objects and symbols are uploaded into the project.

IT R
S
TIA-MICRO1 - Program Blocks and Program Editor
Training Document V14.01.00 6-23
SIMATIC S7-1200 Basic Course

6.6.15. Comparing Blocks

D I A
I N
A I N
IT R
S
Comparing Blocks
Offline/offline and offline/online comparisons can be made. For this, select (highlight) the
CPU and with a right click open the context menu and there choose the function “Compare”.

D I A
I N
The following symbols are used for the result display:

Symbol Meaning

A I N
Folder contains objects whose online and offline versions differ

IT R Result of comparison unknown

Online and offline versions of the object are identical

S Online and offline versions of the object are different


Object only exists offline
Object only exists online

TIA-MICRO1 - Program Blocks and Program Editor


6-24 Training Document V14.01.00
SIMATIC S7-1200 Basic Course

6.7. Task Description: Jogging the Conveyor Motor

4711

DI 0V
I 0.0
I 0.1
I 0.2
I 0.3
S_Right
S_Left
-10V +10V
Poti
"K_Left" (Q 8.6)

D I A "K_Right" (Q 8.5)

N
DO

N I
A I
IT R
S
Task Description
Using the simulator switch "S_Right" (I 0.2), you should be able to jog the conveyor motor to the
RIGHT "K_Right" (Q 8.5). Using the simulator switch "S_Left" (I 0.3), you should be able to jog
the conveyor motor to the LEFT "K_Left" (Q8.6).

(Lock-out!).

D I A
If both switches are pressed simultaneously, the conveyor motor must not start in either direction

I N
A I N
IT R
S
TIA-MICRO1 - Program Blocks and Program Editor
Training Document V14.01.00 6-25
SIMATIC S7-1200 Basic Course

6.7.1. Exercise 1: Adding the "FC_Conveyor" (FC16) Block

D I A
2xL

I N
A I N
IT R
Task
S Create "FC_Conveyor" (FC16) as a new block in which you will then program the required jog
operation of the conveyor motor in the next exercise.

What to Do

I A
1. In the "Program blocks" container, double-click on "Add new block".

D
2. In the dialog that appears, make the entries as shown in the picture above.

I N
A I N
IT R
S
TIA-MICRO1 - Program Blocks and Program Editor
6-26 Training Document V14.01.00
SIMATIC S7-1200 Basic Course

6.7.2. Exercise 2: Programming the "FC_Conveyor" (FC16) Block

Insert network

Display Favorites
On / Off

D I A
I N
A I N
IT R
Task
S Program the jog operation of the conveyor motor as shown in the picture.

What to Do

drop.

D I A
1. Program an AND logic operation by pulling it from the Favorites into the network using drag &

2. Program an instruction by pulling it from the "Instructions" task card to the AND logic
operation using drag & drop .

I N
3. Above the instruction, enter the output "K_Right" (Q8.5) as the operand (you can enter the
symbol as well as the absolute address)

I N
4. In the Project tree, select (don’t open) the "PLC_Tags" tag table and from the "Details view"
drag the tag "S_Left" (I 0.3) as the operand to the AND logic operation. Do exactly the same
for "S_Right" (I 0.2).

A
IT R
5. Label both the block and the network.
6. Add a new network and there program a corresponding logic operation for jogging the
conveyor motor to the left.

S 7. Close the block.

TIA-MICRO1 - Program Blocks and Program Editor


Training Document V14.01.00 6-27
SIMATIC S7-1200 Basic Course

6.7.3. Exercise 3: Adjusting the OB1 Properties

D I A
1xR
I N
A I N
IT R
S
Task Description
The OB1 properties are to be adjusted as shown in the picture.
The symbolic name is to be changed and the programming language LAD is to be set. Proceed
as shown in the picture.

D I A
I N
A I N
IT R
S
TIA-MICRO1 - Program Blocks and Program Editor
6-28 Training Document V14.01.00
SIMATIC S7-1200 Basic Course

6.7.4. Exercise 4: Calling "FC_Conveyor" (FC16) in OB1

D I A
Drag & Drop
I N
A I N
IT R
Task
S So that the newly created "FC_Conveyor" (FC16) block can be executed cyclically, its call must
be programmed in OB1.

What to Do
1. Open the "OB_Cycle" (OB1) block by double-clicking on it.

D I A
2. Program the call of "FC_Conveyor" (FC16) as shown in the picture using drag & drop.
3. Edit a block title and a label for Network 1.
4. Close the block.

I N
A I N
IT R
S
TIA-MICRO1 - Program Blocks and Program Editor
Training Document V14.01.00 6-29
SIMATIC S7-1200 Basic Course

6.7.5. Exercise 5: Compiling the Program, Downloading it into the CPU and
Saving it

3. Save project

I
2. Download program

D A
1. Compile program

I N
A I N
IT R
Task
S
The newly programmed blocks are to be compiled, downloaded into the CPU and saved offline in
the project data storage.

What to Do

I A
1. To compile the entire program (OB1 and FC16) and to download it into the CPU, select the
"Program blocks" container in the Project tree.

D
I N
2. Carry out the steps shown in the picture and check the program functioning by pressing the
simulator switches "S_Right" (I 0.2) and "S_Left" (I 0.3).
3. Save your project.

A I N
IT R
S
TIA-MICRO1 - Program Blocks and Program Editor
6-30 Training Document V14.01.00
SIMATIC S7-1200 Basic Course

6.7.6. Exercise 6: Monitoring "FC_Conveyor" (FC16)

D I A Monitor Block
On / Off

I N
A I N
IT R
Task
S You are to monitor the program execution of the newly programmed "FC_Conveyor" (FC16)
block. To do so, press the "S_Right" (I 0.2) and "S_Left" (I 0.3) simulator switches and interpret
the statuses shown on the PG screen.

What to Do
1. In the Editor, open the "FC_Conveyor" (FC16) block.
2. Activate the test function "Monitor block" (see picture).

D I A
I N
3. Alternately and also simultaneously press the "S_Right" (I 0.2) and "S_Left" (I 0.3) simulator
switches and interpret the signal statuses of the operands shown.

A I N
IT R
S
TIA-MICRO1 - Program Blocks and Program Editor
Training Document V14.01.00 6-31
SIMATIC S7-1200 Basic Course

Contents 7
D I A
7.
I N
Binary Operations .................................................................................................. 7-2
7.1.
7.2.
I N
Task Description: The Conveyor Model as Distribution Conveyor ....................................... 7-3

A
Sensors and Check Symbols ................................................................................................ 7-4

R
7.3. Binary Logic Operations: AND, OR....................................................................................... 7-5
7.3.1. Binary Logic Operations: Exclusive OR (XOR)..................................................................... 7-6

IT
7.3.2. Theory Exercise 1: Sensor and Check Symbols .................................................................. 7-7

S
7.4. Assignment, Set, Reset, NOT ............................................................................................... 7-8
7.4.1. Flip Flops............................................................................................................................... 7-9
7.5. Task Description: "FC_Mode" ............................................................................................. 7-10
7.5.1. Exercise 2: Programming the "FC_Mode" and the call of this block in the "OB_Cycle"..... 7-11
7.5.2. Task Description: Parts Transportation when "P_Operation" (Q4.1) is Switched On ........ 7-12
7.5.3. Exercise 3: Expanding "FC_Conveyor" .............................................................................. 7-13
7.6. Task Description: Parts Transportation THROUGH the Light Barrier ............................... 7-14
7.6.1. Operand Edge Evaluations ................................................................................................. 7-15
7.6.2. RLO Edge Evaluation ......................................................................................................... 7-16
7.6.3.
7.7.
7.7.1.
I A
Exercise 4: Integrating an Edge Evaluation in "FC_Conveyor" .......................................... 7-17
Task Description: Controlling the Indicator Lights .............................................................. 7-18

D
Exercise 5: Commissioning "FC_Signal" (FC14) ................................................................ 7-19
7.8.
7.8.1.
7.8.2.
N
Additional Information ......................................................................................................... 7-20

I
Additional Exercise 6: Optimizing "FC_Mode" .................................................................... 7-21
Setting / Resetting Bit Fields ............................................................................................... 7-22
7.8.3.

N
Jump Instructions JMP, JMPN, RET................................................................................... 7-23

A I
IT R
S
TIA-MICRO1 - Binary Operations
Training Document V15.00.00 7-1
SIMATIC S7-1200 Basic Course

7. Binary Operations

At the end of the chapter the participant will …

...

I A
be able to explaine the difference between ‘real’ NC contacts
and NO contacts connected in the hardware, and
programmed check symbols

D
N
... be able to explain the terms Result of Logic Operation

I
(RLO) and Status (STAT)

... be able to program basic binary logic operations

A I N
be able to carry out simple troubleshooting

IT R
S
D I A
I N
A I N
IT R
S
TIA-MICRO1 - Binary Operations
7-2 Training Document V15.00.00
SIMATIC S7-1200 Basic Course

7.1. Task Description: The Conveyor Model as Distribution Conveyor

4711

DI 0V
I 0.0 S_OperationON

A
S_OperationOFF "B_Bay1" "B_Bay2" "B_LB"

I
I 0.1 (NC) -10V +10V (I 8.5) (I 8.6) (I8.0)
Poti
I 0.2 S_Right

D
I 0.3 S_Left
DO

N
P_Operation Q 4.0 "K_Left"
(A 8.6) "K_Right"

I
(A 8.5)

A I N
R
"S_Bay1" "S_Bay2"
(I 8.1) (I 8.2)

IT
"P_Bay1" "P_Bay2"
(Q 8.1) (Q 8.2)

S
The Conveyor Model as Distribution Conveyor
The distribution conveyor is used to transport parts from Bay 1 or 2 to the light barrier bay.
Operation (Simulator LED "P_Operation", Q4.1) can be switched on via the simulator switch
"S_OperationON" (I 0.0) and switched off via the simulator switch "S_OperationOFF" (I 0.1, NC).
• When "P_Operation" (Q4.1) is switched off...

jogged to the left via the simulator switch "S_Left" (I 0.3).

D I A
…the conveyor motor can be jogged to the right via the simulator switch "S_Right" (I 0.2) and

• When "P_Operation" (Q4.1.) is switched on...

I N
...parts are transported from Bay 1 or 2 through the light barrier. For this, the part must be placed

The indicator lights at Bays 1 and 2 show...

A N
on the conveyor at exactly one of the two bays and the associated bay pushbutton pressed.

I
...a continuous light when a new part can be placed on the conveyor (conveyor motor is stopped

IT R
and both proximity sensors are free)
...a 1Hz flashing light at the bay on which a part is detected by the associated proximity sensor,
however, only as long as the conveyor has not yet been started (if parts are placed on the

S conveyor at both proximity sensors, neither indicator light can light up)
...a 2Hz flashing light as long as the conveyor motor is running.
The indicator light at the light barrier bay shows a 2Hz flashing light as long as the conveyor
motor is running and continuous light when the setpoint quantity has been reached.

TIA-MICRO1 - Binary Operations


Training Document V15.00.00 7-3
SIMATIC S7-1200 Basic Course

7.2. Sensors and Check Symbols

Process Interpretation in the PLC Program

The The sensor Voltage Signal Check Check


sensor is ... present state for signal state “1” for signal state “0”
is a ... at input? at
Symbol / Result of Symbol / Result of

A
input
Instruction check Instruction check

NO
contact
activated
yes 1 “Yes”

D I “No”

IN
1 0
LAD: LAD:

not no “NO contact” “NC contact”

N
activated 0 “No” “Yes”

I
0 1

NC
contact
activated

R A
no
0
FBD:
&
“No”
0
FBD:
&
“Yes”
1

S IT
not
activated

Sensors of the Process


yes 1 “Yes”
1
“No”
0

The use of normally open or normally closed contacts for the sensors in a controlled process
depends on the safety regulations for that process. Normally closed contacts are always used for
limit switches and safety switches, so that dangerous conditions do not arise if a wire break
occurs in the sensor circuit. Normally closed contacts are also used for switching off machinery
for the same reason.

Check Symbols of the Program

D I A
N
In LAD, a symbol with the name "NO contact" is used for checking for signal state "1" and a

I
symbol with the name "NC contact" to check for signal state "0". It makes no difference whether
the process signal "1" is supplied by an activated NO contact or a non-activated NC contact.

N
The "NO contact" symbol delivers the result of check or result of logic operation (RLO) "1" when

I
the checked operand has state or status "1".

A
The "NC contact" symbol delivers the result of check or result of logic operation (RLO) "1" when
the checked operand has state or status "0".

IT R
S
TIA-MICRO1 - Binary Operations
7-4 Training Document V15.00.00
SIMATIC S7-1200 Basic Course

7.3. Binary Logic Operations: AND, OR

AND FBD

LAD

D I A
change
operation
I N change
operation

A I N FBD

IT R
S
AND and OR Logic Operations
OR LAD

With AND and OR logic operations, all binary operands can be queried, even outputs. Instead of
individual operands, the results of other logic operations can also be further logically linked. Also,
the logic operations can also be combined.

A
All inputs of the logic operations can be programmed as check for signal state or Status '0' and

I
'1', regardless of whether a hardware NO contact or NC contact is connected in the process.

AND Logic Operation

D
when all input signals have Status '1'.

I N
For an AND logic operation, the result of logic operation (RLO) = '1',

OR Logic Operation

I N
For an OR logic operation, the result of logic operation (RLO) = '1', when at least one input signal
has Status '1'.

A
IT R
S
TIA-MICRO1 - Binary Operations
Training Document V15.00.00 7-5
SIMATIC S7-1200 Basic Course

7.3.1. Binary Logic Operations: Exclusive OR (XOR)

FBD

D I A
I N
LAD

A I N
IT R
S
XOR Logic Operation
With the XOR logic operation, all binary operands can be queried, even outputs. Instead of
individual operands, the results of other logic operations can also be further logically linked. Also,
the logic operations can also be combined.

A
All inputs of the logic operations can be programmed as check for signal state or Status '0' and

I
'1', regardless of whether a hardware NO contact or NC contact is connected in the process.

D
For an XOR logic operation with 2 inputs, the result of logic operation (RLO) = '1', when one

I N
and only one of the two input signals has Status '1'.
For an XOR logic operation with more than 2 operands, the RLO ...

N
− = '1', when an uneven number of checked operands has Status '1'

A I
− = '0', when an even number of checked operands has Status '1'.

XOR in the Programming Languages FBD and LAD

IT R
In the LAD programming language, there is no explicit XOR logic operation. It must be generated
by programming the discrete instructions shown in the picture above.

S
TIA-MICRO1 - Binary Operations
7-6 Training Document V15.00.00
SIMATIC S7-1200 Basic Course

7.3.2. Theory Exercise 1: Sensor and Check Symbols

Task: In all three examples, the light should be on when S1 is activated and S2 is not activated!

Hardware

S1 S2 S1 S2 S1 S2

E 1.0
I 1.0 EI 1.1
1.1 E 1.0
I 1.0 E 1.1
I 1.1 EI 1.0
1.0 E I1.1
1.1
Automation system
Q 4.0

Light
Automation system
Q 4.0

Light

D I A
Automation system
Q 4.0

Light

Software
I 1.0 I 1.1

N
Q 4.0 I 1.0

IN
I 1.1 Q 4.0 I 1.0 I 1.1 Q 4.0

I
LAD

R &
A
IT
& &
I 1.0 I 1.0 I 1.0
FBD

S
I 1.1 Q 4.0 I 1.1 Q 4.0 I 1.1 Q 4.0

Task
Complete the programs in the picture above so that the following functionality is fulfilled: When
the switch S1 is activated and the switch S2 is not activated, the light should be on in all three
examples.

Note

I A
The terms - "NO contact" and "NC contact" - have different meanings depending on whether they
are used in the process-hardware-context or as check symbols in the software.

D
I N
A I N
IT R
S
TIA-MICRO1 - Binary Operations
Training Document V15.00.00 7-7
SIMATIC S7-1200 Basic Course

7.4. Assignment, Set, Reset, NOT

FBD LAD

NOT

D I A
N IN Change the
operation
Change the
operation

A I
IT R
S
Assignment
With an assignment, the specified operand is always assigned the current RLO as status. The
assigned RLO remains available after the assignment and can be assigned to a further operand
or it can be further logically linked.

Set

I A
If RLO = "1", the specified operand is assigned Status '1'; if RLO = "0", the status of the operand
remains unchanged.

D
Reset

I N
If RLO = "1", the specified operand is assigned Status ' 0'; if RLO = "0", the status of the operand

NOT
remains unchanged.

A I N
R
The NOT instruction inverts the result of logic operation (RLO).

IT
If, in the example shown, the RLO of the AND logic operation = '1', the NOT instruction inverts it
to RLO '0' and the Set instruction is not executed (the status of "Tag_3" (Q20.0) then remains

S
unchanged).
If the RLO of the AND logic operation = '0', the NOT instruction inverts it to RLO '1' and the Set
instruction is executed ("Tag_3" (Q20.0) is assigned Status '1').

TIA-MICRO1 - Binary Operations


7-8 Training Document V15.00.00
SIMATIC S7-1200 Basic Course

7.4.1. Flip Flops

Dominant Reset Dominant Set

D I A
KOP

I N
A I N
IT R
S
Memory Function "Flip Flop"
A flip flop has a Set input and a Reset input. The operand is set or reset, depending on which
input has an RLO = "1".

Priority (Dominancy)

I A
If there is a signal state or RLO = "1" at both inputs at the same time, the priority of the operation
decides whether the operand is set or reset. For that reason, there are different symbols for the
Dominant Set and Dominant Reset memory functions in LAD and FBD.

D
Note

I N
With a CPU restart, all outputs are reset. That is, they are overwritten with Status '0'.

A I N
IT R
S
TIA-MICRO1 - Binary Operations
Training Document V15.00.00 7-9
SIMATIC S7-1200 Basic Course

7.5. Task Description: "FC_Mode"

4711
DI 0V

A
I 0.0 S_OperationON

I
S_OperationOFF
I 0.1 (NC) -10V +10V
Poti
I 0.2 S_Right

I 0.3 S_Left

P_Operation
DO

Q 4.1

I N D
A I N
IT R
S
Task Description
A mode section for the system is to be programmed in "FC_Mode", which controls the indicator
light "P_Operation" (Q4.1). This is then to be linked in "FC_ConvMotor" as a further condition for
jogging the conveyor motor.

• Function of the mode section in "FC_Mode":

D I A
The system or "P_Operation" (Q4.1) is switched on via the simulator switch "S_OperationON"
(I 0.0) and switched off via the simulator switch "S_OperationOFF" (I 0.1, NC).

• Integrate "P_Operation" (Q4.1) in "FC_Conveyor":


I N
I
when "P_Operation" (Q4.1) is switched off.

A N
The "Jogging the conveyor motor" programmed in "FC_Conveyor" is now only to be possible

IT R
S
TIA-MICRO1 - Binary Operations
7-10 Training Document V15.00.00
SIMATIC S7-1200 Basic Course

7.5.1. Exercise 2: Programming the "FC_Mode"


and the call of this block in the "OB_Cycle"

D I A
I N
A I N
IT R
Task
S
In "FC_Mode" program a mode section for the distribution conveyor:
The operation or the indicator light "P_Operation" (Simulator LED Q4.1) is switched on via the

"S_OperationOFF" (I 0.1, NC).


Then program the CALL of the "FC_Mode" in the "OB_Cycle".

D A
simulator switch "S_OperationON" (I 0.0) and is switched off via the simulator switch

I
What to Do

I
1. Create the new block "FC_Mode" (FC15).
N
N
2. Open the "Instructions" Task Card, program the instructions shown in the picture using drag &

I
drop and use the absolute addresses shown.

A
3. Programm the CALL of the "FC_Mode" in the "OB_Cycle"..

IT R
4. In "FC_ConvMotor", link the simulator LED "P_Operation" (Q4.1) logically in such a way that
the conveyor motor can only be jogged when this is switched off.
5. Download the modified blocks into the CPU and check the program function.

S 6. Save your project.

TIA-MICRO1 - Binary Operations


Training Document V15.00.00 7-11
SIMATIC S7-1200 Basic Course

7.5.2. Task Description: Parts Transportation


when "P_Operation" (Q4.1) is Switched On

Conv. Start Transport Phase Conv. Stop

"B_Bay1"
(I 8.5)

"S_Bay1"
(I 8.1)

D I A
"B_Bay2"
(I 8.6)

I N
"S_Bay2"
(I 8.2)

A I N
IT R
"B_BayLB"
(I 8.0)

S "K_Right"
(Q8.5)

Task Description:
When "P_Operation" (Q4.1) is switched ON, parts are to be transported from Bay 1 or Bay 2 to
the light barrier "B_BayLB" (I 8.0). The precondition is that a part is only placed on the conveyor

A
at one of the two bays. If parts are placed on the conveyor at both bays, no transport sequence

I
can be started.
• The conveyor motor "K_Right" (Q8.5) is started when

D
− on Bay 1 the proximity sensor "B_Bay1" (I 8.5) is occupied AND on Bay 2 the proximity

N
sensor "B_Bay2" (I 8.6) is NOT occupied AND the pushbutton at Bay 1 "S_Bay1" (I 8.1) is
pressed
OR
I
I N
− on Bay 2 the proximity sensor "B_Bay2" (I 8.6) is occupied AND on Bay 1 the proximity
sensor "B_Bay1" (I 8.5) is NOT occupied AND the pushbutton at Bay 2 "S_Bay2" (I 8.2) is
pressed.

A

IT R
The conveyor motor "K_Right" (Q8.5) is stopped when
− the part has reached the light barrier "B_BayLB" (I 8.0)

S
OR
− "P_Operation" (Q4.1) is switched off.

TIA-MICRO1 - Binary Operations


7-12 Training Document V15.00.00
SIMATIC S7-1200 Basic Course

7.5.3. Exercise 3: Expanding "FC_Conveyor"

Network x Jog conveyor motor RIGHT when Operation OFF

"M_JogRight"
Conditions for (M16.2) Memory bit for
jogging RIGHT jogging RIGHT

A
= when "P_Operation" OFF

Network y Memory bit Conveyor motor RIGHT when Operation ON

D I
IN
Conditions for "M_AutoRight"
Memory bit Conv. motor RIGHT (M16.4)

S Memory bit for

N
Switch on
Conveyor motor RIGHT

Network z

A I
Switch off

Control conveyor motor RIGHT


R
when "P_Operation" ON

IT R "M_JogRight"
(M16.2)
>=1 "K_Right"
(Q8.5) Conveyor motor RIGHT

Task
S "M_AutoRight"
(M16.4)
=

Expand the "FC_Conveyor" block with the previously described functions.

Solution Notes

A
The conveyor motor "K_Right" (Q8.5) must now be controlled under two conditions:

I
when "P_Operation" (Q4.1) is switched off while jogging RIGHT (in the picture Network x). OR,

D
when "P_Operation" (Q4.1) is switched on, under the conditions described in the task (in the
picture Network y).

I N
If, in both Network x and y, the result of logic operation of the conditions were each assigned to
the output "K_Right" (Q 8.5), an error in the form of a double assignment would occur. Jogging
the motor RIGHT in manual mode (Network x) would no longer function, since the state assigned

N
to the output here would then be overwritten in Network y.

I
The problem can be solved by programming a memory bit for each condition or by first assigning

A
the results of the logic operations to a memory bit in both Network x and y. These are then used

What to Do

IT R
in the Network to control the conveyor motor.

S 1. Open the "FC_Conveyorr" block.


2. Program the required functions in new networks (see picture). Use the memory bits shown in
the picture and provide them with the symbols shown.
3. Modify the already existing network "Jog Right" as described in the solution notes.
4. Download the expanded block into the CPU and check the program function.
5. Save your project.

TIA-MICRO1 - Binary Operations


Training Document V15.00.00 7-13
SIMATIC S7-1200 Basic Course

7.6. Task Description:


Parts Transportation THROUGH the Light Barrier

Conv. Start Transport Phase

D I A Conv. Stop

Part within
light barrier
Start condition
for transports

I N
"B_BayLB"
(I 8.0)

A I N
IT R
"K_Right"
(Q8.5)

S
Function Up to Now in FC16
Up to now NEW

When "P_Operation" (Q4.1 = '0') is switched off, you can jog the conveyor motor "K_Right" (Q8.5)
using the simulator switches "S_Right" (I 0.2) and "S_Left" (I 0.3).

I A
When "P_Operation" (Q4.1) is switched on, the conveyor motor "K_Right" (Q 8.5) is switched on
when a part is placed on the conveyor exactly in front of one of the proximity sensors of Bay 1 or
2, and the occupied bay‘s pushbutton is pressed.

D
N
The conveyor motor "K_Right" (Q8.5) is stopped when the part has reached the light barrier or
"P_Operation" (Q4.1) is switched off.

Task Description:

N I
A I
The function of the "FC_Conveyor" to control the conveyor motor when "P_Operation" (Q4.1) is
switched on is to remain fundamentally unchanged. However, the conveyor motor is only to stop
when the part has passed through the light barrier.

IT R
S
TIA-MICRO1 - Binary Operations
7-14 Training Document V15.00.00
SIMATIC S7-1200 Basic Course

7.6.1. Operand Edge Evaluations

"Scan operand for positive "Set operand on positive "Set tag on positive
signal edge" signal edge" signal edge"

D I A
I N
N
(FB Evaluation)

"B_LB"

A I
IT R
"M_edge_LB" OB1
cycle
OB1
cycle
OB1
cycle

S
Scan Operand for Positive Signal Edge
If the state of the operand at the input to the box changes from '0' to '1' ("rising edge"), RLO '1' is
output at the output to the box for the duration of one program cycle.

Set Operand on Positive Signal Edge

I A
This has the same behavior as with "scan operand for positive signal edge" whereby, however,
the input signal (in the example "B_LB") is available at the output of the box and can be used by
other logic operations.

D
Set Tag on Positive Signal Edge

I N
This has the same behavior as with "scan operand for positive signal edge" whereby, however,

I N
the evaluation occurs via a library function block (FB1001/1002) which is passed an instance data
block, or which can also be created as a multiple instance within another FB.

A
Note:

IT R
The instructions compare the current signal state of the input "B_LB" with the signal state in the
previous cycle which is stored in an edge memory bit "M_aux_LB" or in the instance DB

S "DB_R_TRIG". When the instruction detects a change from "0" to "1", a positive signal edge
exists. Subsequently, the current signal state is stored in the edge memory bit or in the instance
DB. The status of the edge memory bit and the contents of the IDB must not be overwritten at
another location in the program.

TIA-MICRO1 - Binary Operations


Training Document V15.00.00 7-15
SIMATIC S7-1200 Basic Course

7.6.2. RLO Edge Evaluation

FBD LAD

D I A
"B_LB"

I N
N
"K_Right"

& RLO

A I
"M_Imp_pos"

"M_Imp_neg"

IT R OB1
cycle

OB1
OB1
cycle
OB1

S
RLO Edge Evaluation (P_TRIG, N_TRIG)
cycle cycle

With an RLO edge evaluation, it is possible to detect whether the status of a logic operation (in
the example an AND RLO) has changed from '0' to '1' (rising or positive edge) or from '1' to '0'
(falling or negative edge). If this is the case the instruction supplies, for the duration of one cycle,
RLO '1' as the result, which can be further logically linked or can be assigned to another operand

A
(in the example, the memory bit "M_Imp_pos" (M16.1)) as status. In the following cycle, the

I
instruction then once again supplies '0' as the result even if the AND RLO still is status '1'.

D
The instruction compares the current result or the RLO of the logic operation with its RLO in the
previous program cycle. This is stored in a so-called edge memory bit for this (in the example

I N
"M_aux"). It must be ensured that the status of this edge memory bit is not overwritten at another
location in the program. For every RLO edge evaluation, a separate edge memory bit must be
used accordingly, even then when the same operand (in the example, AND RLO) is evaluated

A I N
once again, for example, in another block!

IT R
S
TIA-MICRO1 - Binary Operations
7-16 Training Document V15.00.00
SIMATIC S7-1200 Basic Course

7.6.3. Exercise 4: Integrating an Edge Evaluation in "FC_Conveyor"

Conv. Start Transport Phase Conv. Stop

Start condition I A
Part within
light barrier

D
N
for transports

"B_BayLB"

N I
I
(I 8.0)

R
"K_Right"
A
IT
(Q8.5)
Up to now NEW

Task:
S When "P_Operation" (Q4.0 = '1') is switched on, the parts are to be transported from Bay 1 or 2
THROUGH the light barrier.

What to Do:

I A
1. Program the necessary changes in "FC_Conveyor", by now linking the result of the edge
evaluation as the reset condition for "M_AutoRight" (M16.4) instead of the light barrier signal

D
"B_BayLB" (I 8.0) itself. For the necessary edge evaluation of the light barrier signal use the

N
bit memory "M_aux16LB" (M16.0) as an edge memory bit.

3 Save your project.

N I
2. Download the modified "FC_Conveyor" block into the CPU and check the program function.

A I
IT R
S
TIA-MICRO1 - Binary Operations
Training Document V15.00.00 7-17
SIMATIC S7-1200 Basic Course

7.7. Task Description: Controlling the Indicator Lights

"B_Bay1" "B_Bay2"
(I 8.5) (I 8.6)

D I A
I N
A I N
IT R "P_Bay1"
(Q 8.1)
"P_Bay2"
(Q 8.2)
"P_BayLB"
(Q 8.4)

S
Task Description
When "P_Operation" (Q4.0) is switched on, the indicators lights are to be controlled as follows:
• The indicator lights "P_Bay1" (Q8.1) and "P_Bay2" (Q8.2) show
− a constant light when a new part can be placed on the conveyor (conveyor motor is
stopped and both proximity sensors are free)

I A
− 1Hz flashing light at the bay where the associated proximity sensor detects a part, but only

D
as long as the conveyor has not yet been started (if parts are placed on the conveyor at
both proximity sensors, neither indicator light must light up)


I N
− 2Hz flashing light as long as the conveyor motor is running
The indicator light at the light barrier bay "P_Bay_LB" (Q8.4) shows 2Hz flashing light as long
as the conveyor motor is running.

I N
The described functions are already programmed in the "FC_Indicate" (FC14) block, which is

A
stored in the "Micro1_Lib" global library. The block still contains errors and is to be commissioned

R
by you in the next exercise.

S IT

TIA-MICRO1 - Binary Operations


7-18 Training Document V15.00.00
SIMATIC S7-1200 Basic Course

7.7.1. Exercise 5: Commissioning "FC_Signal" (FC14)

D I A
I N
A I N
IT R
Task
S The "FC_Signal" block is to be copied from the "MICRO1_Lib" global library into the project and
commissioned.

What to Do

"MICRO1_Lib" global library (as shown in the picture).


2. Program the call of "FC_Signal" in "OB_Cycle"

D I A
1. Using drag & drop, copy the "FC_Signal" block into the "Program blocks" container from the

I N
3. Download all modified blocks into the CPU.
4. Test the program function and correct the block in such a way that the indicator lights are

already recognized the error!


6. Save your project.

A N
controlled as required. To do so, use the test function "Monitor block", even if you have

I
IT R
S
TIA-MICRO1 - Binary Operations
Training Document V15.00.00 7-19
SIMATIC S7-1200 Basic Course

7.8. Additional Information

D I A
I N
A I N
IT R
S
D I A
I N
A I N
IT R
S
TIA-MICRO1 - Binary Operations
7-20 Training Document V15.00.00
SIMATIC S7-1200 Basic Course

7.8.1. Additional Exercise 6: Optimizing "FC_Mode"

OLD: without edge evaluation


"S_OperationON"
(I 0.0)

"S_OperationOFF"
(I 0.1, NC)

D I A
N
"P_Operation"

I
(Q4.1)

NEW: with edge evaluation


"S_OperationON"
(I 0.0)

A I N
IT R
"S_OperationOFF"
(I 0.1, NC)

S "P_Operation"
(Q4.1)

Function Up to Now of "FC_Mode"


"P_Operation" (Q4.1) is switched on with the simulator switch "S_OperationON" (I 0.0) and
switched off with the simulator switch "S_OperationOFF" (I 0.1, NC). If you activate both switches
simultaneously, the operation remains switched off or is switched off if currently on. If, however,
both switches are activated and the OFF switch is let go while the ON switch is activated, the

Task:
upper function diagram "OLD: without edge evaluation").

D I A
operation switches back on without the ON switch having to be activated again (see picture,

I N
Expand the functionality of "FC_Mode" using edge evaluation so that the ON switch must be
activated every time the operation is switched on (see picture, lower function diagram "NEW: with
edge evaluation"). The criteria for switching on the system is no longer to be the activated ON

What to Do:

A I N
switch or its "1" signal, but the function of activating or the "positive edge" of the ON switch signal.

R
1. In the set condition for "P_Operation" (Q4.1), insert an edge evaluation of the switch
"S_OperationON" (I 0.0). For the edge evaluation, use the bit memory "M_aux15Opon"

IT
(M15.0) as edge memory bit.

S 2. Download the modified "FC_Mode" block into the CPU and check whether it fulfils the desired
functions!
3. Save your project.

TIA-MICRO1 - Binary Operations


Training Document V15.00.00 7-21
SIMATIC S7-1200 Basic Course

7.8.2. Setting / Resetting Bit Fields

7 6 54 3 21 0
MB10 0000 0000
MB11 0000 0000

D I A
I NMB10
MB11
1100 0000
0000 0111

A I
Reset several bits
starting from a N
R
specific address

S IT
Setting / Resetting a Bit Field RESET_BF
MB10
MB11
0000 0000
0000 0000

With the operation "Reset bit field" (RESET_BF), several bits starting from a specific address can
be reset. The number of bits which are to be reset can be determined via the Parameter N.
Through the operation, the bit with the lowest address in the bit field must be specified. The bits
are reset in ascending bit and byte address.

I A
The operation is only executed if an RLO ‘1’ exists at input EN. For RLO ‘0’, the operation is not
executed.

D
I N
A I N
IT R
S
TIA-MICRO1 - Binary Operations
7-22 Training Document V15.00.00
SIMATIC S7-1200 Basic Course

7.8.3. Jump Instructions JMP, JMPN, RET

Jump if RLO='1' Jump if RLO='0'

D I A
I N
A I N
IT R
S
Jump Instructions JMP and JMPN
With the jump instructions JMP and JMPN, the linear execution of the program can be interrupted
within a block and continued in another network. With the jump instruction, a Label is specified
which also identifies the target network. The specified label must be located in the same block
and be unique. Each label can be jumped to from several locations. The jump can take place in
networks with higher (forwards) or lower numbers (backwards).

• JMP:

D I A
If RLO ='1', the jump into the target network is executed; if RLO ='0', the jump is not executed


I N
and the linear program execution continues.
JMPN:

N
If RLO ='0', the jump into the target network is executed; if RLO ='1', the jump is not executed

I
and the linear program execution continues.

End Block Execution RET

A
IT R
With the instruction RET the program execution of the entire block is ended. The program
execution is continued in the calling block with the instruction that follows the call of this block.

S
TIA-MICRO1 - Binary Operations
Training Document V15.00.00 7-23
SIMATIC S7-1200 Basic Course

Contents 8
D I A
8.
I N
Digital Operations .................................................................................................. 8-2
8.1.
8.2.
I N
Acquiring, Processing and Outputting Data .......................................................................... 8-3

A
Task: Counting the Transported Parts and Monitoring the Transportation time................. 8-4

R
8.3. Overview: Data Types in STEP 7 ......................................................................................... 8-5
8.3.1. Elementary Data Types: Bit and Numeric............................................................................. 8-6

IT
8.3.2. Elementary Data Types: Date, Time and Character ............................................................. 8-7
8.3.2.1. Integer (INT, 16-Bit Integer) Data Type ................................................................................ 8-8

S8.3.2.2.
8.3.2.3.
8.4.
8.5.
8.5.1.
Double Integer (DINT, 32-Bit Integer) Data Type ................................................................. 8-9
REAL and LREAL (Floating-point Number) Data Type ...................................................... 8-10
Timer / Counter Instance Data Blocks ................................................................................ 8-11
Task Description: Counting the Transported Parts ............................................................. 8-12
Counters: CTU, CTD, CTUD............................................................................................... 8-13
8.5.2. Counter Function: Inputs..................................................................................................... 8-14
8.5.3. Counter Function: Outputs .................................................................................................. 8-15
8.5.4. Exercise 1: Counting the Transported Parts – Commissioning "FC_Count" ...................... 8-16
8.6.
8.6.1.
8.6.2.
8.6.3. I A
Task Description: Monitoring the Transportation time ....................................................... 8-17
Timer Function TON ........................................................................................................... 8-18

D
Timer Function TON (ON Delay) Pulse Diagram................................................................ 8-19
Exercise 2: Monitoring the Transportation Time Commissioning "FC_Fault" .................... 8-20
8.7.
8.7.1.
8.7.2.
I N
Additional Information ......................................................................................................... 8-21
Additional Exercise 3: Counting the Conveyor Faults - Expanding "FC_Fault" (FC17) ..... 8-22
Additional Exercise 4: Timely Lock-out of the Conveyor Motor Jogging ............................ 8-23
8.7.3.
8.7.4.
8.7.5.
8.7.6. I N
Move Operations: MOVE .................................................................................................... 8-24
Move Operations: MOVE_BLK ........................................................................................... 8-25

A
Comparator Operations: IN_RANGE, OUT_RANGE ......................................................... 8-26
Date and Time-of-day: RD_SYS_T .................................................................................... 8-27

IT R
S
TIA-MICRO1 - Digital Operations
Training Document V15.00.00 8-1
SIMATIC S7-1200 Basic Course

8. Digital Operations

At the end of the chapter the participant will…

...


I A
be familiar with the application purpose of data blocks

D
be familiar with the S7-1200 data types

N
… be familiar with the different counter and timer functions

and

I
be able to use and program counter and timer functions
be able to select a suitable data type

N
A I
IT R
S
D I A
I N
A I N
IT R
S
TIA-MICRO1 - Digital Operations
8-2 Training Document V15.00.00
SIMATIC S7-1200 Basic Course

8.1. Acquiring, Processing and Outputting Data

Operator Panel: Simulator:


Operating Pushbuttons
+ monitoring / Switches,
processes LEDs,

A
Voltmeter,

I
Potentiometer

Control unit:
(e.g. S7-1200)

I N
AI/AO DI/DO

D
N
Processing
the values

A I
IT R e.g. PROFIBUS

S Field devices

Binary/Digital Processing
True logic control systems are recognizable in the fact that they exclusively process binary data.
The performance of today‘s control computer, as well as tasks in the areas of data processing,
quality control, among others, has increased the importance of digital data processing using
PLCs. Digital process variables can be found in all areas of open-loop control - such as in

I A
connected devices for process operating and monitoring or in the control of field devices.

Operating and Monitoring

D
N
The goal of process monitoring is too quickly, clearly and concisely provide the operator with up-

I
to-the-minute information about the working machine or system and to allow the operator to
control the process. While in the past mostly simple, that is, "dumb" input and output devices,
such as 7-segment displays and thumbwheel buttons were used to display and enter digital

I N
values, today "intelligent" operating and monitoring devices are frequently connected to a PLC.
Depending on the type of device connected, different number formats for the coding of data are

A
used to transmit data between device and PLC, as well as for storing and processing data in the
PLC.

Field Devices

IT R
Today field devices that acquire process data or that control the process are supplied directly with

S digital variables through field bus systems. The connection of field devices, such as drives or
weighing systems, using analog input and output modules is becoming more and more a thing of
the past.

TIA-MICRO1 - Digital Operations


Training Document V15.00.00 8-3
SIMATIC S7-1200 Basic Course

8.2. Task: Counting the Transported Parts


and Monitoring the Transportation time

4711 2Hz flashing light


DI if conveyor fault
I 0.0
I 0.1
I 0.2
I 0.3
S_ON
S_OFF (NC)
S_Right
S_Left
0V

-10V +10V
Poti
max. 6s

"B_Bay1""B_Bay2"
(I 8.5) (I 8.6)

D I A
"B_BayLB"
(I8.0)

N
DO

P_Operation Q 4.1

N I "K_Right"
(Q 8.5)

I
I 0.7 S_Ackn. P_Fault Q 4.3

R A
IT
"S_Bay1" "S_Bay2" "S_BayLB"
(I 8.1) (I 8.2) (I 8.4)

S
"P_Bay1" "P_Bay2" "P_BayLB"
(Q 8.1) (Q 8.2) (Q 8.4)
1Hz flashing light
if Act.no. = Setp.no. = 3

Tasks

Counting the transported part

A
The number of transported parts (actual quantity) is to be recorded with a counter and stored in

I
the variable "MW_Act" (MW20) If the ACTUAL quantity has reached the SETPOINT quantity of 3,
the indicator light "P_BayLB" (Q8.4) shows a continuous light and the indicator lights at Bay 1 and
2 are dark.

D
I N
The counter is reset to ‘0’ when "P_Operation" (Q4.1) is switched on or when
ACTUAL = SETPOINT = 3 is acknowledged via the pushbutton "S_BayLB".

Monitoring the transportation time

I N
The automatic transport sequences are to be monitored for time.

A
If a transport sequence takes longer than the 6 second monitoring time, there is a fault and the

R
conveyor motor is automatically switched off. A fault is displayed with a 2Hz flashing light on the
simulator LED "P_Fault" (Q 4.3).and can be acknowledged via the simulator switch

IT
"S_Acknowledge" (I 0.7).

S As long as there is an unacknowledged fault, no new transport sequence can be started.

TIA-MICRO1 - Digital Operations


8-4 Training Document V15.00.00
SIMATIC S7-1200 Basic Course

8.3. Overview: Data Types in STEP 7

Type Data types


Elementary Binary number BOOL
Data types Bit sequences BYTE; WORD; DWORD; LWORD
Integers SINT; USINT; INT; UNIT; DINT; UDINT; LINT ULINT
Floating-point
numbers
Timers
REAL; LREAL

S5TIME; TIME; LTIME

D I A
Date, Time-of-day

Characters N
DATE; TIME_OF_DAY; LTIME_OF_DAY;

I
LDT(DATE_AND_LTIME);
CHAR; WCHAR

Complex
Data types

A I
Date, Time-of-day
Character string
N
DT(DATE_AND_TIME); DTL;
STRING; WSTRING

IT R Array
Anonymous
ARRAY […] of <Datatype>
STRUCT

S
Structure
User-defined PLC-data type (User Defined Data Type)

Elementary Data Types


Elementary data types are predefined in accordance with IEC 61131-3. They always have a
length less than or equal to 64 bits.

Complex Data Types

I A
Complex data types contain data structures that can be made up of elementary and/or complex
data types. Complex data types can be used for the declaration of variables only in global data

D
blocks and within blocks for the declaration of local variables (TEMP, STAT) as well as
parameters (IN, OUT and INOUT).

I N
A I N
IT R
S
TIA-MICRO1 - Digital Operations
Training Document V15.00.00 8-5
SIMATIC S7-1200 Basic Course

8.3.1. Elementary Data Types: Bit and Numeric

Description Size (Bit) S7- S7- Example


1200 1500
Bit Data BOOL 1 TRUE
Types BYTE 8 B#16#F5
WORD 16 W#16#F0F0

Numeric
DWORD

LWORD

SINT
32

64
I
DW#16#F0F0FF0F

LW#16#5F52DE8B

50

D A
IN
8
Data Types USINT 20
INT -23
16

N
UINT 64530

DINT
UDINT
REAL

A I 32
DINT# -2133548520
UDINT#435676
1.0

IT R LREAL

LINT
64 LREAL#-1.0e-5

LINT#1543258759

S
BOOL, BYTE, WORD
ULINT
64
ULINT#154316159

Variables of the data type BOOL consist of one bit. Variables of the data types BYTE and WORD
are bit sequences of 8 or 16 bits. The individual bits are not evaluated in these data types.
Special forms of these data types are the BCD numbers and the count value as it is used in
conjunction with the count function.

INT, REAL

I A
Variables of these data types represent numbers with which relevant arithmetical calculation

D
operations can be carried out. (INT –> integer, REAL -> floating point number)

Extensions of INT, REAL and WORD

I N
N
U - Unsigned

A I
Variables with the extension “U” represent a variable without sign of the relevant data type. Data
types: USINT, UINT, ULINT, UDINT

S - Short

IT R
Variables with the extension “S” represent a variable with a length of 8 bits of the relevant data
type. Data types: SINT, USINT

S
D - Double

L- Long
Variables with the extension “D” represent a variable with a length of 32 bits of the relevant data
type. Data types: DWORD, DINT, UDINT

Variables with the extension “L” represent a variable with a length of 64 bits of the relevant data
type. Data types: LWORD, LINT, ULINT, LREAL

TIA-MICRO1 - Digital Operations


8-6 Training Document V15.00.00
SIMATIC S7-1200 Basic Course

8.3.2. Elementary Data Types: Date, Time and Character

S7- S7-
Description Size (Bit) Example
1200 1500
Time Types TIME

DATE
TIME_OF_DAY
32
16
32
D#1994-01-21

D A
T#2h46m30s630ms

I
TOD#18:15:18:999

IN
S5TIME 16 S5T#1h24m10s

LTime LT#11350d20h25m14s830ms652µs315ns
LTIME_OF_DAY

A I
LDT (DATE_AND_LTIME)
N 64 LTOD#10:20:30.400_365_215
LDT#2008-10-25-08:12:34.567

R
Character CHAR 8 ‘R’
Type

IT
WCHAR 16
WCHAR#'w'

S
TIME, LTIME
A variable of the data type TIME (duration in [ms]) occupies a double-word. This variable is used,
for example, for specifying time values in IEC timer functions. The contents of the variable are
interpreted as a DINT number in milliseconds and can be either positive or negative (for example:
T#1s=L#1000, T#24d20h31m23s647ms = L#2147486470).

A
Just like TIME, LTIME represents a duration whereby the duration is saved with nanosecond

I
resolution in 64 bits. That means, compared with the data type TIME, longer durations with
greater resolution can be saved in variables of the data type LTIME.

D
DATE

I N
A variable of the data type DATE is stored in a word in the form of an unsigned integer. The
contents of the variable represent the number of days since 01.01.1990.

TIME_OF_DAY, LTIME_OF_DAY

A I N
The data type TOD (TIME_OF_DAY) occupies a double-word and stores the number of

R
milliseconds since the beginning of the day (0:00 o‘clock) as an unsigned integer. Variables of the
data type LTOD occupy two double-words and state the number of nanoseconds since the

IT
beginning of the day.

S5TIME
S
LDT (Date_AND_LTIME)
The data type LDT (DATE_AND_LTIME) occupies 8 bytes and stores information on date and
time in nanoseconds since 01.01.1970 0:00.

Variables of the data type S5TIME are required for specifying time values in timer functions (S5-
timing elements). You specify the time in hours, minutes, seconds or milliseconds. You can enter
the timer values with an underline (1h_4m) or without an underline (1h4m).

CHAR, WCHAR
The data type CHAR (8 bits) represents a character in ASCII representation and WCHAR (16
bits) a character in Unicode format.
TIA-MICRO1 - Digital Operations
Training Document V15.00.00 8-7
SIMATIC S7-1200 Basic Course

8.3.2.1. Integer (INT, 16-Bit Integer) Data Type

Value range -32768 ... +32767 arithmetic


(without sign: 0 ... 65535) Operations z.B. + I, * I, <I, ==I

Display Formats:

A
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

DEC: + 662 BIN.: 2# 0 0 0 0 0 0 1 0 1 0 0 1 0 1 1 0 HEX: 16# 0 2 9 6 Octal: 8# 1 2 2 6

Sign
positive
+2
9

2
7

+2
4

+2 1
2

D I
6 x 16 = 6
0

9 x 16 = 144
1
6x8 =6
1
0

2 x 8 = 16
2 x 8 = 128
2

N
numbers
+2 2 x 16 = 512
2
1x8 =
3
512

N I + 662

without
662

without
662

I
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
sign sign
DEC: - 662 BIN.: 2# 1 1 1 1 1 1 0 1 0 1 1 0 1 0 1 0 HEX: 16# F D 6 A Octal: 8# 1 7 6 5 5 2

R Sign
negative
-2 14
15

+2 13

A
+2 12 10 x 16 =10
0
2x8 =2
0

5 x2 8 = 40
1

5 x 8 = 320

IT
numbers +2 11 6 x 16 = 96
1
6x8 =
3
3072
+2 10 8 28672
13 x 16 = 3328
2
7x8 =
4

+2 +2 +2 5
6

S
+2 +2 +2
3 1
15 x 16 =
3
61440 1x8 =
5
32768
Representation as
twos complement - 662 64874 64874

Integer (16-Bit) Data Type


An Integer data type value is a whole number value, that is, a value without a decimal point.
SIMATIC S7 stores Integer data type values with sign in 16 bit code. This results in a value range
from -32768 to +32767. As well, SIMATIC S7 provides arithmetic operations for processing
Integer values.

Decimal

D I A
STEP7 uses the Decimal display format, that is, with sign and without explicit format description,
to specify the constants of the Integer data type. The use of constant Integer values in the Binary,

are more or less not suitable.

I N
Hexadecimal, Octal display formats is possible in principle, but because of the poor legibility, they

Binary

I N
In a digital computer system, all values are stored in a binary form. Only the digits 0 and 1 are

A
available in the binary number system. Base 2 of this number system results from the number of

R
available digits. Accordingly, the value of every bit of a binary number results from a power of
Base 2. This is also expressed in the format specification 2#.... .

S IT
Negative values are represented as binary numbers in twos complement. In this representation,
15
the most significant bit (bit no. 15 for the Integer data type) has the value -2 . Since this value is
greater than the sum of all residual values, this bit also has the sign information. That is, if this bit
= 0, then the value is positive; if the bit is = 1, then the value is negative. The conversion of a
binary number into a decimal number is made by adding the values of the bits that have a 1 (see
picture).

TIA-MICRO1 - Digital Operations


8-8 Training Document V15.00.00
SIMATIC S7-1200 Basic Course

8.3.2.2. Double Integer (DINT, 32-Bit Integer) Data Type

Value range: L# -2147483648 ... L#+2147483647 arithmetic


(without sign: 0 ... 4294967295) Operations z.B. + D, * D, <D, ==D

Display Formats:
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

DEC: +540809

Sign
positive
numbers

D A
BIN.: 2# 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 1 0 0 1

I
HEX:

I N
(without sign)
16# 0 0 0 8 4 0 8 9

DEC: -540809

A I N
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

BIN.: 2# 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 0 1 1 1 1 1 1 0 1 1 1 0 1 1 1

IT R Sign
negative
numbers

S Representation as
twos complement

Double Integer (32-Bit Integer)


Octal:
(without sign)
8# 3 7 7 7 5 7 3 7 5 6 7

SIMATIC S7 stores Double Integer data type values with sign as 32 bit code. This results in the
value range from -2147483648 to +2147483647.

Hexadecimal

Base 16 of this numbers system. Accordingly, the value of every bit of a hexadecimal number

D I
The hexadecimal number system provides 16 different digits (0 to 9 and A to F). This results in

results from a power of Base 16. Hexadecimal numbers are specified with 16# for identifying the A
basic numbering system. The number of specifiable bits is variable from 1 to 16. The digits A to F

I N
correspond to the decimal values 10 to 15. The value 15 is the last value that can be binary-
coded - without sign - with 4 bits. Out of this correlation, the simple conversion of a binary number
into a hexadecimal number and vice versa can be obtained. In this way, four binary bits each can

Octal Number
easily make up one digit of a hexadecimal number.

A I N
R
The octal number system provides 8 different digits (0 to 7). This results in Base 8 of this
numbers system. Accordingly, the value of every bit of an octal number results from a power of

IT
Base 8. Octal numbers are specified with 8# for identifying the basic numbering system. The
value 7 is the value that can be binary-coded - without sign - with 3 bits. In this way, three binary

S bits each can make up one digit of an octal number.

TIA-MICRO1 - Digital Operations


Training Document V15.00.00 8-9
SIMATIC S7-1200 Basic Course

8.3.2.3. REAL and LREAL (Floating-point Number) Data Type

General format of a Real number (32 Bit) = (Sign) • (1.f) • (2e-127) arithmetic
Operations z.B. + R, *R, <R, = = R
Example: 0.75 sin, ln, exp, …..

Sign e = Exponent (8 Bit) f = Mantissa (23 Bit)

31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16

0 0 1 1 1 1 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
27 26 25 24 23 22 21 20 2-1 2-2 2-3 2-4 .....
15 14 13 12 11 10 9 8 7 6

D I A5 4 3 2 1 0

2-23

Real no. = +1.5 * 2 126-127 = 0.75

I N
Sign e = Exponent (11 Bit)

A I N
General format of an LReal number (64 Bit) = (Sign) • (1.f) • (2e-1023)

f = Mantissa (52 Bit)

63

IT R
62 ……………………………….. 52 51…………………………………………………………………………………………………………..…………….…0

S
Real/LReal
210………………....20 2-1………………………………………………………………..…2-52

The previously described INT and DINT data types are used to store whole number values with
sign. Accordingly, only operations that supply a whole number value as the result can be
performed with these values. In cases where analog process variables such as voltage, current,
and temperature etc., have to be processed, it becomes necessary to use Real values (real

Format
numbers, "decimal numbers"). In order to be able to represent such values, binary digits have to
be defined whose value is less than 1 (power of base 2 with negative exponent).

D I A
I N
In order the greatest possible value range within a defined memory capacity, you must be able to
select the decimal point position as required. Early on, IEEE defined a format for floating-point
numbers. This format was laid down in IEC 61131 and was included in STEP 7. This format

N
makes it easy to process a variable decimal point position. . In the binary code of a 32 Bit floating-

I
point number, a portion of the binary digits contain the mantissa (23 Bit) and the rest contain the

A
exponent (8 Bit) and the sign bit of the floating-point number. A 64 Bit floating-point number also
has the sign bit; however, the exponent is 11 Bit and the mantissa 52 Bit.

IT R
After you enter a constant real value (for example: 0.75), the Editor automatically makes a
conversion to scientific notation (for example: 7.5000e-001).

S
Application
Floating-point numbers are used for "analog value processing", among other things. A great
advantage of floating-point numbers is in the number of operations possible with such numbers.
These include, in addition to the standard operations such as: +, -, *, / also instructions such as
sin, cos, exp, ln, etc, that are used mainly in closed-loop control algorithms.

TIA-MICRO1 - Digital Operations


8-10 Training Document V15.00.00
SIMATIC S7-1200 Basic Course

8.4. Timer / Counter Instance Data Blocks

Data block for Global data

Function
OB1

A
FCx

Function

D I DBy

I N
FCy

A I N
Function block
Instance DB for FBx
or Counter / Timer function

IT R FBx or
Counter / Timer
function
DBx

S
Data Blocks
Data blocks are used for storing user data. They occupy memory space in the user memory of
the CPU. Data blocks contain variable data (such as numeric values) with which the user
program works. The user program can access the data in a data block. Access can be made
symbolically or absolutely.

Area of Application
Data blocks are used with two different purposes:

D I A
N
• Global data blocks: These contain information that all the logic blocks in the user program can

I
access.
• Instance data blocks: These are always assigned to a particular FB or functions such as

Creation of DBs N
counters and timers. The data of these instance DBs should only be processed by the

I
associated FB or counter / timer function.

A
IT R
Global DBs are created either with the Program Editor or according to a previously created "user-
defined data type". Instance data blocks are generated when a function block or a counter / timer
function is called.

S
TIA-MICRO1 - Digital Operations
Training Document V15.00.00 8-11
SIMATIC S7-1200 Basic Course

8.5. Task Description: Counting the Transported Parts

4711

DI 0V
I 0.0 S_OperationON "B_Bay1""B_Bay2" "B_BayLB"

A
S_OperationOFF (I 8.5) (I 8.6) (I8.0)

I
I 0.1 (NC) -10V +10V
Poti
I 0.2 S_Right

D
I 0.3 S_Left "K_Right"
DO (Q 8.5)

P_Operation Q 4.1

I N
A I N "S_Bay1"
(I 8.1)
"S_Bay2"
(I 8.2)
"S_BayLB"
(I 8.4)

R
"P_Bay1" "P_Bay2" "P_BayLB"
(Q 8.1) (Q 8.2) (Q 8.4)

IT
1Hz flashing light
if Act.no. = Setp.no. = 3

S
Function Up Till Now
When "P_Operation" (Q4.1) is switched on, parts are transported from Bay 1 or Bay 2 through the
light barrier. The transport sequence starts as soon as a part is placed on Bay 1 or Bay 2 and the
associated bay’s pushbutton is pressed and it ends as soon as the part has passed the light

A
barrier.

Task

D I
When "P_Operation" (Q4.1) is switched on, the transported parts are to be counted as soon


N
as they have passed through the "B_BayLB" (I 8.0) light barrier ("B_BayLB" 0  1).

I
The number of transported parts (ACTUAL quantity) is to be recorded with a counter and
stored in the variable "MW_ACT" (MW20).

I N
If the ACTUAL quantity has reached the SETPOINT quantity of 3, the indicator light
"P_BayLB" (Q8.4) shows a continuous light and the indicator lights at Bay 1 and 2 are dark

A
(= a new part must not be placed on the conveyor -> lock-out in "FC_Signal") and no further

R
transport sequence can be started (-> lock-out in "FC_Conveyor).

IT
• The counter is reset to ‘0’ when "P_Operation" (Q4.1) is switched on or when
ACTUAL=SETPOINT is acknowledged via the pushbutton "S_BayLB".

S The described functions are already programmed in the block "FC_Count" which is stored in the
"MICRO1_Lib" global library. The block still contains errors and is to be commissioned by you in
the next exercise.

TIA-MICRO1 - Digital Operations


8-12 Training Document V15.00.00
SIMATIC S7-1200 Basic Course

8.5.1. Counters: CTU, CTD, CTUD

D I A
I N
A I N
IT R
S
Counters
Counters are used to count events, record quantities, etc. There are up counters and down
counters as well as counters that can count in both directions.

Value Range of a Counter

I A
The count or value range of a counter depends on its data type (see picture) which is always an
integer. The various selectable Integer data types merely differentiate themselves in their value
range and thus determine the count range of the counter.

D
Instance Data Block

I N
N
In addition to internally required variables, the counter also stores its current counter value in a

I
so-called instance data block which must be specified when programming a counter. The
specified instance data block is automatically generated by the Editor with exactly the internal

A
structure that the counter requires. The user has no further programming effort with this data

R
block other than having to download it into the CPU.

IT
S
TIA-MICRO1 - Digital Operations
Training Document V15.00.00 8-13
SIMATIC S7-1200 Basic Course

8.5.2. Counter Function: Inputs

D I A
IN
Parameter Declaration Data type Memory area Description

CU Input BOOL I, Q, M, D, L or constant Count up input

CD

R
Input

Input
BOOL

A
BOOL
I N I, Q, M, D, L or constant

I, Q, M, D, L, P or constant
Count down input

Reset input

LD

PV

IT R Input

Input
BOOL

Integers
I, Q, M, D, L, P or constant

I, Q, M, D, L, P or constant
Load input

Value at which the QU output

S
Input CU and CD
is set. / Value to which the CV
output is set with LD = 1.

With a positive edge at input CU, the current count is increased by one; with a positive edge at
input CD, the current count is decreased by 1. If a positive edge is detected at both inputs
simultaneously or in the same cycle, the current count remains unchanged. If the upper or lower
limit of the specified data type is reached, the count is no longer increased or decreased for a

Input R
positive edge at CU or CD.

D I A
The input R acts statically, that is, as long as RLO '1' is at input R, the count is set to 0 and rising

I N
edges or RLO '1' at the inputs CU, CD and LD have no effect on the current count.

Input LD (Load, Only for Down Counters)

I N
The input LD acts statically, that is, as long as RLO '1' is at input LD, the current count is set to
the value that is passed to the input PV, and positive edges at the inputs CU and CD have no
effect on the count.

A
Input PV

IT R
The value to which the count is to be set must be passed to the input PV as long as RLO '1' is at

S
input LD. The variable or constant passed to the input must be compatible with the data type of
the counter.

TIA-MICRO1 - Digital Operations


8-14 Training Document V15.00.00
SIMATIC S7-1200 Basic Course

8.5.3. Counter Function: Outputs

D I A
Parameter Declaration Data type
I N
Memory area Description
QU

QD
Output

Output
BOOL

A
BOOL
I N
I, Q, M, D, L

I, Q, M, D, L
Status of the up counter

Status of the down counter

CV

IT R Output Integers,
CHAR,
WCHAR,
I, Q, M, D, L, P Current counter value

S
Output QD (Only for Down Counters)
DATE
(INT)

The current status of the down counter can be checked at the output QD. As long as the current
count is less than or equal to zero, the output QD has Status "1", otherwise, Status '0'.

Output CV

Output QU
with the data type of the counter.

D I A
The current count is output at output CV. The variable passed to the output must be compatible

I N
The current status of the up counter can be checked at the output QU. As long as the current
count is greater than or equal to the value of the parameter PV, the output QU has Status '1',

N
otherwise, Status '0'.

A I
IT R
S
TIA-MICRO1 - Digital Operations
Training Document V15.00.00 8-15
SIMATIC S7-1200 Basic Course

8.5.4. Exercise 1: Counting the Transported Parts – Commissioning "FC_Count"

D I A
I N
A I N
IT R
Task
S When "P_Operation" (Q4.1) is switched on, the transported parts are to be counted and the
ACTUAL quantity is to be stored in the variable "MW_ACT" (MW20). If the ACTUAL quantity has
reached the SETPOINT quantity of 3, the indicator light "P_BayLB" (Q8.4) shows a continuous
light. As long as this is not acknowledged via "S_BayLB" (I 8.4), the indicator lights "P_Bay1"

I A
(Q8.1) and "P_Bay2" (Q8.2) are dark and no new part transportation can be started.

What to Do

D
N
1. From the "MICRO1_Lib" global library, copy the "FC_Count" function into the "Program

I
blocks" container using drag & drop as shown in the picture.
2. In "FC_Count", pass the "iDB_CTUParts" data block as a single instance DB to the count

picture)

A N
function (is automatically created in the System blocks -> Program resources container, see

I
3. Program the call of "FC_Count" in "OB_Cycle" (OB1). Download all blocks into the CPU and
check the program function.

IT R
4. Correct the "FC_Count" function in such a way that the parts are counted correctly (the
"iDB_CTUParts" data block is error-free!)

S 5. In the blocks "FC_Signal" and "FC_Conveyor" program the required lock-outs.


6. Download all modified blocks into the CPU and check the program function.
7. Save your project.

TIA-MICRO1 - Digital Operations


8-16 Training Document V15.00.00
SIMATIC S7-1200 Basic Course

8.6. Task Description:


Monitoring the Transportation time

4711
DI

A
I 0.0 S_ON 0V

I 0.1
I 0.2
I 0.3
S_OFF (NC)
S_Right
S_Left
-10V +10V
Poti
DO
2Hz flashing light
if conveyor fault

D I
P_Operation Q 4.1

I N "B_Bay1""B_Bay2"
(I 8.5) (I 8.6)
"B_BayLB"
(I8.0)
I 0.7 S_Ackn. P_Fault Q 4.3

A I N "K_Right"
(Q 8.5)

IT R
S
Function Up Until Now
"P_Bay1"
(Q 8 1)
"S_Bay1"
(I 8.1)

"P_Bay2"
(Q 8 2)
"S_Bay2"
(I 8.2)

"P_BayLB"
(Q 8 4)
"S_BayLB"
(I 8.4)

When "P_Operation" (Q4.1) is switched on, parts are transported from Bay 1 or 2 until they are
through the light barrier. A transport sequence starts as soon as a part is placed on the conveyor
at Bay 1 or 2 and the associated bay pushbutton is pressed. The transport sequence ends as

Task Description
soon as the part has passed the light barrier.

D I A
The automatic transport sequences are to be monitored for time. The monitoring is to function as
follows:

I N
If a transport sequence takes longer than the 6 second monitoring time, there is a fault and

N
the conveyor motor is automatically switched off.

A I
A fault is displayed with a 2Hz flashing light on the simulator LED "P_Fault" (Q 4.3).
A fault can be acknowledged via the simulator switch "S_Acknowledge" (I 0.7).

IT R
As long as there is an unacknowledged fault, no new transport sequence can be started.

S
TIA-MICRO1 - Digital Operations
Training Document V15.00.00 8-17
SIMATIC S7-1200 Basic Course

8.6.1. Timer Function TON

D I A
I N
A I N
IT R
S
Data Type TIME
The contents of a variable or constant of the data type TIME is interpreted as an integer number
in milliseconds and stored in the memory as a 32-bit integer with sign. The representation
contains information for days (d), hours (h), minutes (m), seconds (s) and milliseconds (ms).
Examples:
Length (bits) Format Value range
T#-24d20h31m23s648ms
to
D I A
Examples of value input

T#10d20h30m20s630ms,

N
32 Signed duration TIME#10d20h30m20s630ms

I
T#+24d20h31m23s647ms

Data Block

I N
In addition to internally required variables, the timer function also stores the current already
expired time in a data block which must be specified when programming the timer function. The

A
specified data block is automatically generated by the Editor with exactly the internal structure

R
that the timer function requires. The user has no further programming effort with this data block
other than having to download it into the CPU.

IT
S
TIA-MICRO1 - Digital Operations
8-18 Training Document V15.00.00
SIMATIC S7-1200 Basic Course

8.6.2. Timer Function TON (ON Delay) Pulse Diagram

D I A
I N
A I N
IT R
TON
S The timer function "ON Delay" is started with a rising edge at input IN. So that the time expires,
RLO must continue to be '1'. The timer function supplies a '1' signal at output Q, as soon as the
specified time (variable or constant of data type TIME) at input PT has expired and as long as the
start signal at input IN still exists. The already expired time can be queried at output ET by
passing a variable of data type TIME.

Parameter Data type Memory area

D I A Description

IN
IN BOOL I, Q, M, D, L, P Start input

Duration of the on delay.


PT TIME I, Q, M, D, L, P

N
The value of the PT parameter must be

I
positive.

A
Operand that is set when the timer PT
Q BOOL I, Q, M, D, L, P
expires

IT
ET

R TIME I, Q, M, D, L, P Current time value

S
TIA-MICRO1 - Digital Operations
Training Document V15.00.00 8-19
SIMATIC S7-1200 Basic Course

8.6.3. Exercise 2: Monitoring the Transportation Time


Commissioning "FC_Fault"

D I A
I N
A I N Drag&Drop

IT R
Task
S
The transport sequences are to be monitored for time as previously described. If a transport
sequence takes longer than 6 seconds, the conveyor motor is automatically switched off and the
fault is displayed with a 2Hz flashing light on the simulator. As long as a fault is not
acknowledged, no new transport sequence can be started.

What to Do

D I A
N
1. From the "MICRO1_Lib" global library, copy the "FC_Fault" function into the "Program blocks"

I
container using drag & drop as shown in the picture.
2. In the PLC tag table "Conveyor" create the user constant "maxTime" of the data type Time

N
with the value T#6s as shown in the picture.

I
3. In "FC_Fault" pass the "iDB_TONConFault" data block as a single instance DB to the timer

A
function and as the time period the user constant "maxTime".

IT R
4. Program the call of "FC_Fault" in "OB_Cycle" (OB1).
5. In the "FC_Conveyor" block program the required switching off of the conveyor motor when
there is a conveyor fault.

S 6. In "FC_Signal" program the relevant lock-outs so that the indicator lights "P_Bay1" (Q8.1) and
"P_Bay2" (Q8.2) show the required behavior.
7. Download all modified blocks into the CPU and check the program function.
8. Correct "FC_Fault" in such a way that the monitoring function is fulfilled as required.
9. Save your project.

TIA-MICRO1 - Digital Operations


8-20 Training Document V15.00.00
SIMATIC S7-1200 Basic Course

8.7. Additional Information

D I A
I N
A I N
IT R
S
D I A
I N
A I N
IT R
S
TIA-MICRO1 - Digital Operations
Training Document V15.00.00 8-21
SIMATIC S7-1200 Basic Course

8.7.1. Additional Exercise 3: Counting the Conveyor Faults -


Expanding "FC_Fault" (FC17)

"M_ConvFault"
(M 17.0)

D I A
Conv. Fault
Counter
2
1

I N
0

A I N
IT R
"P_Operation"
(Q 4.1)

S
Function Up Until Now
When "P_Operation" (Q4.1) is switched on, the transport sequences are monitored for time. If a
transport sequence takes longer than the monitoring time of 6 seconds, there is a conveyor fault

A
and the conveyor motor is automatically switched off (logically linked in "FC_Conveyor".

Task:

D I
When "P_Operation" (Q4.1) is switched on, the conveyor faults are to be counted. After 3

N
conveyor faults have occurred, "P_Operation" (Q4.1) is to be switched off for safety reasons. To

I
start a new transport sequence, the fault (as already programmed) must be acknowledged and
"P_Operation" (Q4.1) must be switched on once again.

N
I
What to Do:

A
1. In "FC_Fault", in a new network, program the counting of the conveyor faults. The counter
counts up 1 every time a conveyor fault occurs ("M_ConFault" (M17.0) = "1").

IT R
2. In "FC_Fault", pass any bit memory you like to the counter output Q.
3. In "FC_Mode", program the switching off (reset) of "P_Operation" (Q4.1) after three conveyor

S
faults. For this, use the bit memory which you passed to the counter output Q in "FC_Fault".
4. Save your project.

TIA-MICRO1 - Digital Operations


8-22 Training Document V15.00.00
SIMATIC S7-1200 Basic Course

8.7.2. Additional Exercise 4: Timely Lock-out of the Conveyor Motor Jogging

Lock-out
time LEFT

"S_Right"
(I 0.2)

"K_Right"
(Q8.5)

D I A
N
Lock-out

I
TOF Right

N
"S_Left"

I
(I 0.3) lock-out
time RIGHT

"K_Left"

R
(Q8.6)

A
S IT
Lock-out
TOF Left

Function Up Until Now


When "P_Operation" (Q4.1) is switched off, the conveyor motor can be jogged to the RIGHT and
LEFT using the simulator switches "S_Right" (I 0.2) and "S_Left" (I 0.3).

Task:

A
In order to avoid too great a load change, it should only be possible to jog the conveyor motor in

I
the opposite direction after it has been jogged to the RIGHT or to the LEFT after a lock-out time
of 2 seconds (see picture). If, for example, the motor has been jogged to the RIGHT, then it can

D
only be jogged back to the LEFT after the lock-out time of 2 seconds has expired.

What to Do:

I N
1. In "FC_Conveyor", program two TOF timers (Off Delay) as the lock-out timers RIGHT and

N
LEFT and assign one bit memory each to the Timer result Q.

I
2. Gate these bit memories to the jog conditions.

A
3. Download the modified "FC_Conveyor" into the CPU and check the program function.

R
4. Save your project.

IT
S
TIA-MICRO1 - Digital Operations
Training Document V15.00.00 8-23
SIMATIC S7-1200 Basic Course

8.7.3. Move Operations: MOVE

Parameter Data type Memory Description


area
EN

ENO

IN
BOOL

BOOL

All
I, Q, M, D, L

I, Q, M, D, L

I, Q, M, D, L
Enable input

Enable
Output

Source

D I A
elementary
data types,
DTL,
STRUCT,
or constant value

I N
N
ARRAY
OUT1 All
elementary
data types,
DTL,
I, Q, M, D, L

I
Destination
address

A
R
STRUCT,
ARRAY

MOVE
S IT
You use the "MOVE - Move value" instruction to transfer the content of the operand at the IN
input to the operand at the OUT1 output. The transfer is always made in the direction of
ascending address.

ENO output also has signal state "1".

D I A
The operation is only executed if the signal state is "1" at the enable input EN. In this case, the

I N
A I N
IT R
S
TIA-MICRO1 - Digital Operations
8-24 Training Document V15.00.00
SIMATIC S7-1200 Basic Course

8.7.4. Move Operations: MOVE_BLK

Copies the contents


of the source area to
the destination area

D I A
N
Source area Destination area

N I
A I
IT R
S
MOVE_BLK
You can use the "Move block" instruction to move (copy) the content of a memory area (source
area) to another memory area (destination area). The number of elements to be moved (copied)
to the destination area is specified at input COUNT. The width of the elements to be moved
(copied) is defined by the width of the element at input. The copy operation is always made in the
direction of ascending address.

D I A
I N
A I N
IT R
S
TIA-MICRO1 - Digital Operations
Training Document V15.00.00 8-25
SIMATIC S7-1200 Basic Course

8.7.5. Comparator Operations: IN_RANGE, OUT_RANGE

D I A
I N
A I N
IT
IN_RANGE
R 100 500

S
OUT_RANGE

IN_RANGE
You can use the "Value within range" instruction to determine if the value at the VAL input is
within a specific value range. You specify the limits of the value range with the MIN and MAX
inputs. When the query is processed, the "Value within range" instruction compares the value at
the VAL input with the values of the MIN and MAX inputs and sends the result to the box output.

A
If the value at the VAL input fulfills the comparison MIN <= VAL or VAL <= MAX, the box output

I
has the signal state "1". If the comparison is not fulfilled, the box output has the signal state "0".

D
The comparison function can only be executed if the values to be compared are of the same data
type and the box output is interconnected.

OUT_RANGE

I N
N
You can use the "Value outside range" instruction to determine if the value at the VAL input is

I
outside of a specific value range. You specify the limits of the value range with the MIN and MAX
inputs. When the query is processed, the "Value outside range" instruction compares the value at

A
the VAL input to the values of the MIN and MAX inputs and sends the result to the box output. If

R
the value at the VAL input fulfills the comparison MIN > VAL or VAL > MAX, the box output has
signal state "1". The box output returns the signal state "0", if the value at input VAL does not

IT
satisfy the MIN > VAL or VAL > MAX condition.

S
The comparison function can only be executed if the values to be compared are of the same data
type and the box output is interconnected.

TIA-MICRO1 - Digital Operations


8-26 Training Document V15.00.00
SIMATIC S7-1200 Basic Course

8.7.6. Date and Time-of-day: RD_SYS_T

D I A
I N
A I N
IT R
S
RD_SYS_T
You use the RD_SYS_T instruction to read the current date and current time-of-day of the CPU
clock. The read dates are output in DTL format at the OUT output parameter of the instruction.
The provided value does not include information about the local time zone or daylight saving time.
You can query whether errors have occurred during execution of the instruction in the RET_VAL
output.

Byte Component Data type

D I A
Value range

N
0-1 Year UINT 1970 to 2554
2
3
Month
Day
USINT

N
USINT
I 1 to 12
1 to 31

5
Weekday

Hour

A I USINT

USINT
1 (Sunday) to 7 (Saturday)
The weekday is not considered in the value entry.
0 to 23

IT R6
7
Minute
Second
USINT
USINT
0 to 59
0 to 59

S 8 -11 Nanosecond UDINT 0 to 999 999 999

TIA-MICRO1 - Digital Operations


Training Document V15.00.00 8-27
SIMATIC S7-1200 Basic Course

Contents 9
9.
9.1.
9.2.
D I A
Functions and Function Blocks ............................................................................... 2
Objectives ................................................................................................................................. 2
Task Description: Evaluating Fault Messages with Re-usable Logic (Code) Blocks ............... 3
9.3.
9.4.
I N
Operand Overview for S7-1200 ................................................................................................ 4
Example of a Fault Display ....................................................................................................... 5
9.5.
9.6.
I N
Solution with Parameter-assignable Block ............................................................................... 6

A
Declaration of Formal Parameters ............................................................................................ 7
9.7.
9.8.
9.9.

IT R
Editing a Parameter-assignable Block ...................................................................................... 8
Calling a Parameter-assignable Block ...................................................................................... 9
Task Description: Fault Evaluation by means of a Function (FC) ......................................... 10

S9.9.1.
9.9.2.
9.10.
9.10.1.
9.10.2.
Exercise 1: Programming the "FC_FaultEvaluation" .............................................................. 11
Exercise 2: Calling and Assigning the "FC_FaultEvaluation" ................................................. 12
Task Description: Fault Evaluation by means of a Function Block (FB) ................................ 13
Instantiating Function Blocks .................................................................................................. 14
Generating Instance Data Blocks ........................................................................................... 15
9.10.3. Block Interface for the FB ....................................................................................................... 16
9.11. Changing the Block Call.......................................................................................................... 17
9.11.1. Exercise 3: Programming "FB_FaultEvaluation" .................................................................... 18
9.11.2.
9.12.
9.13.
A
Exercise 4: Calling the Function Block "FB_FaultEvaluation" (FB20) .................................... 19

I
Inserting Block Parameters Later On ...................................................................................... 20

D
Removing Block Parameters Later On ................................................................................... 21
9.14.
9.15.

I N
Manually Updating a Block Call .............................................................................................. 22
Temporary Variables ............................................................................................................... 23
9.16.

N
Total Usage of the Local Data Stack ...................................................................................... 24

A I
IT R
S
TIA-MICRO1 - Functions and Function Blocks 1
Training Document V15.00.00
SIMATIC S7-1200 Basic Course

9. Functions and Function Blocks


9.1. Objectives

A
At the end of the chapter the participant will...

D I
be familiar with the purpose of temporary variables
...
...
...
N
be familiar with the purpose of parameter-assignable blocks

I
be able to program parameter-assignable functions and their calls
know the difference between Functions (FCs) and Function blocks (FBs)
...
...
... N
be familiar with the purpose of static variables

I
be able to declare static variables and apply them in the program

A
be able to program parameter-assignable blocks and call them

IT R
S
Objectives
In this chapter, the logic (code) blocks "Function" and "Function Block", as well as their features
are presented.

D I A
I N
A I N
IT R
S
TIA-MICRO1 - Functions and Function Blocks
2 Training Document V15.00.00
SIMATIC S7-1200 Basic Course

9.2. Task Description: Evaluating Fault Messages with Re-usable


Logic (Code) Blocks

DI

"FC_Fault“

DO
Network x

D
"FC_FaultEvaluation"
I A
N
 "P_Fault1"

N I Network y

"FB_FaultEvaluation“

I
I 0.7 S_Acknowledge P_Fault Q 4.3
 "P_Fault2"

A
"iDB_FB_Fault2Eval"
I 1.1 S_Fault1 P_Fault1 Q 4.5

R
Network z
I 1.2 S_Fault2 P_Fault2 Q 4.6

IT
I 1.3 S_Fault3 P_Fault3 Q4.7 "FB_FaultEvaluation“
 "P_Fault3"

S
Task Description
"iDB_FB_Fault3Eval"

Program a re-usable function or function block for fault evaluation:


If a fault is triggered at one of the inputs I 1.1 to I 1.3, the associated LED Q4.5 to Q4.7

A
begins to flash. A group acknowledgement of all fault messages can be triggered via the input

I
I 1.0 ("S_Acknowledge"). If, in the meantime, one of the messages is still pending, the LED
switches to continuous light, otherwise it goes out.

D
I N
A I N
IT R
S
TIA-MICRO1 - Functions and Function Blocks 3
Training Document V15.00.00
SIMATIC S7-1200 Basic Course

9.3. Operand Overview for S7-1200

Global Operands Local Operands


(valid in the entire program) (only valid in one block)
Formal Parameters
• interface for data exchange between calling and called block

• PII / PIQ
• can be used in FCs / FBs

Temporary Variables

D A
• temporary storage in the L-stack for FCs or storage in the IDB for FBs

I
• I / O peripherals
• Bit memories

I N
• are overwritten after the block is executed
• temporary storage in the L-stack
• can be used in OBs / FCs / FBs
• Variables in DBs
• Constants

A I
Static Variables

N
• retain their value after the block is executed
• permanent storage in IDBs

IT R • can only be declared in FBs


Constants

S
• read-only and symbolic access
• no memory usage
• can be used in OBs / FCs / FBs

General
In the program up until now, the inputs and outputs were addressed with their actual operands.
The blocks were not parameter-assignable.
This approach would be used, for example, for the creation of a program that would be used once
for a special machine.

I A
For frequently re-occurring functions in larger systems, universally usable, parameter-assignable

D
blocks (FC, FB) are created. These have formal input and output parameters (formal parameters)
which are assigned actual parameters when the block is called.

I N
The adaptation of the block functionality to the hardware occurs through the assignment
(parameterization) during the block call; the "inner life" of the block remains unchanged.

Local Operands

A I N
Up until now you used global operands (bit memories and data blocks) to save production data,
for example. Instead of global operands, data can be stored in local operands which can be


R
divided into four different categories:

IT
Formal parameters:
Formal parameters form the interface between calling and called block.

S •


Temporary Variables:
Temporary variables are variables that are stored only while the block is being executed.
They can be declared in all blocks (OB, FC, FB).
Static Variables:
If the data is to be retained even after the block is executed, the data must be stored in static
variables.
Static variables can only be declared in function blocks.
• Constants
Constants are fixed values which have a read-only access and which do not take up any
memory space.
TIA-MICRO1 - Functions and Function Blocks
4 Training Document V15.00.00
SIMATIC S7-1200 Basic Course

9.4. Example of a Fault Display

Task

FaultSignal

Acknowledge

StoredFault

D I A
Display

I N
N
Solution Suggestion

FaultSignal
P_TRIG

A I StoredFault

S
SR
Q
FlashFreq Display

IT R
StoredFault
EdgeMemory

FaultSignal
Acknowledge R

S
Description
Faults that occur are to be displayed by an indicator light on the operator console. When there is
a signal change from 0  1 at "Fault_Input" the "Display" shows a 2Hz flashing light.
When the fault is confirmed via "Acknowledge" and "Fault_Input" still exists, the "Display"

Program

D A
switches to a continuous light. When "Fault_Input" no longer exists, the display (light) does dark.

I
An edge evaluation of "Fault_Input" is carried out because the "Stored_Fault" would otherwise

the "Display" flash once again.

I N
immediately be set again after an acknowledgement and a still existing "Fault_Input" thus making

When "Acknowledge" has not yet occurred ("Stored_Fault" is still set), the upper path (AND logic

A I N
operation) with the "Flash_Freq" causes the "Display" to flash.
When "Acknowledge" has already occurred ("Stored_Fault" is no longer set), but "Fault_Input"
still exists, the lower path (AND logic operation) causes the "Display" to have a continuous light.

IT R
S
TIA-MICRO1 - Functions and Function Blocks 5
Training Document V15.00.00
SIMATIC S7-1200 Basic Course

9.5. Solution with Parameter-assignable Block

Solution with Solution with parameter-assignable block


non-parameter-assignable
block Program in the Function Call of Function (e. g. OB_Cycle)

"FC_FaultEvaluation"
I 1.1

D
I 0.7
I A FaultSignal

Acknowledge Display Q 4.5

IN
M 10.2 FlashFreq

M 17.1 StoredFault

A I N M 17.2 EdgeMemory

IT R Formal parameters

S
Application
Actual parameters

You can program parameter-assignable blocks for frequently recurring program functions. This
has the following advantages:
• The program only has to be created once, which significantly reduces programming effort.


memory used.

D I A
The block is only stored in the user memory once, which significantly reduces the amount of

The block or the functionality implemented with the block can be called as often as you like,

I N
each time with different operands. For this, the formal parameters (input, output, or in/out
parameters) are supplied with different actual parameters every time they are called.

N
Program Execution

passed during the call.

A I
When the block is executed, the parameter #FaultSignal is replaced with the actual parameter

R
If, during the call of the block, the input "S_Fault1" was passed as the actual parameter for the
parameter #FaultSignal, the statement "A #FaultSignal" becomes the statement "A "S_Fault1""

IT
during runtime.

S
Parameter-assignability

Our Example
You can program FC or FB blocks as parameter-assignable. You cannot program organization
blocks as parameter-assignable because they are called directly by the operating system. As no
block call takes place in the user program, it is not possible to pass actual operands to an OB.

Even if the fault evaluation or fault display is required repeatedly in the system, you only have to
program "FC_FaultEvaluation" once as parameter-assignable.
The "FC_FaultEvaluation" is then called twice for the two different fault evaluations and is
assigned a different actual operand each time.

TIA-MICRO1 - Functions and Function Blocks


6 Training Document V15.00.00
SIMATIC S7-1200 Basic Course

9.6. Declaration of Formal Parameters

Formal Parameters
Type of Parameter Declaration Use Graphic Display

Input parameter In Read only To the left of the block box


Output parameter Out Write only To the right of the block box
In/Out parameter InOut Read / Write

"FC_FaultEvaluation" A
To the left of the block box

D I
Inputs

I N
A I N Outputs

InOuts

IT R
S
Formal Operands
Return

Before you can create the program in the parameter-assignable block, you have to define the
formal parameters in the declaration part.

Type of Parameter

I A
In the table in the picture, you can see the three possible types of parameters and their use.
Please note that formal operands that have a reading and a writing access have to be declared
as ‘In/Out’ parameters.

D
Interface

I N
The Input, Output and InOut parameters as well as the Return parameter form the interface of a

N
block. The Return parameter is an additional Output parameter and, defined according to IEC

I
61131-3, the Return value of the function. The Return parameter only exists for FCs. If it has the

A
data type VOID, it is not used and also does not appear as a parameter when the function is
called.

IT R
The variables Temp and Constant are – even though they are listed in the declaration section of
the interface – not components of the block interface, because they do not become visible when
the block is called.

S
Example:
The picture shows the declaration section, that is, the interface of a block. Since the formal
parameters #Memory and #EdgeMemory are to be accessed both reading and writing (see next
page), they are declared as InOut parameters.

Caution!
The declared formal parameters (Input, Output, InOut and Return) of a block are its
interface to the "outside". That is, they are "visible" or relevant to other blocks that call
this block. If the interface of a block is changed by deleting or adding formal parameters
later on, then the calls of the modified block have to be updated or corrected in all calling
blocks.

TIA-MICRO1 - Functions and Function Blocks 7


Training Document V15.00.00
SIMATIC S7-1200 Basic Course

9.7. Editing a Parameter-assignable Block

D I A
I N
A I N
IT R
Notes
S It doesn‘t matter whether the names of the formal parameters are written with capital or small
letters. The "#" character in front of the name is automatically inserted by the PG. The character
is used to indicate that the parameter is a local operand that was defined in the variable (tag)
declaration table of this block.

I
depends on how you have customized the settings in the Program Editor:

D
OptionsSettingsPLC programmingLAD/FBDOperand fieldMaximum width
A
When you write a program in LAD or FBD the name is not completely displayed in one line. This

Symbols

I N
1. If you use a symbolic name when you edit a block, the Editor first of all searches through the

in the program as a local operand.

A N
interface of the block. If the symbolic name is there, the symbol with # in front of it is accepted

I
2. If a symbol cannot be found as a local operand, the Editor searches through the PLC tags for

R
the global symbol. If the symbol is found there, the symbol is placed in quotation marks and is
accepted in the program as a global operand.

S
Drag & Drop
IT
3. If you specified the same symbolic name globally (in the PLC tags) as well as locally (in the
variable (tag) declaration table) the Editor will always insert the local operand.
If, however, you want to work with the global symbol, you must select the relevant operand
when you make the entry, place the symbol name in quotation marks or change it later on.

Just as with global operands (for example, from the PLC tags) local operands can be dragged
into the program part of the Editor from the block interface using drag & drop and placed in the
desired position there.

TIA-MICRO1 - Functions and Function Blocks


8 Training Document V15.00.00
SIMATIC S7-1200 Basic Course

9.8. Calling a Parameter-assignable Block

D I A
I N
A I N
IT R
S
Block Call
The block can be called by dragging it from the "Program blocks" container & dropping (inserting)
it in the statement (code) part of the calling block.

Note

every formal parameter.


Exception:

D I A
When a parameter-assignable function (FC) is called, an actual parameter must be passed for

I N
In the graphic programming languages LAD and FBD, the assignment of the EN and ENO
parameters, which are automatically added by the Editor, is optional.

Parameter Assignment

A I N
All global and local operands whose data type corresponds to the formal parameters of the called
block can be passed as actual parameters.

IT R
The actual parameters can be passed with an absolute address or with a symbolic name - as
declared in the PLC tags or in the declaration part of the calling block.

S
Passing On of Parameters
Basically, a “passing on of parameters” is also possible. That is, formal parameters of the calling
block are passed on as actual parameters to the called block. For parameters of complex data
types this is however only possible with limitations. It is dealt with in greater detail in another more
advanced course.

TIA-MICRO1 - Functions and Function Blocks 9


Training Document V15.00.00
SIMATIC S7-1200 Basic Course

9.9. Task Description:


Fault Evaluation by means of a Function (FC)

DI

"FC_Fault“

DO
Network x

"FC_FaultEvaluation"

D I A
N
--> "P_Fault1"

N I Network y

"FC_FaultEvaluation“

I
I 0.7 S_Acknowledge P_Fault Q 4.3
-->"P_Fault2"

I 1.1
I 1.2

R
S_Fault1
S_Fault2
A
P_Fault1
P_Fault2
Q 4.5
A 4.6

IT
I 1.3 S_Fault3 P_Fault3 Q 4.7

S
Task Description
You are to program the re-usable function "FC_FaultEvaluation" to evaluate fault signals.
Fault signals:


"S_Fault1" (I 1.1)
"S_Fault2" (I 1.2).

D I A
N
Call the function twice in "FC_Fault" in order to evaluate two faults.
The faults are displayed on the LEDs
• "P_Fault1" (Q4.5)

N I
Program
• "P_Fault2" (Q4.6).

A I
IT R
An edge evaluation of #FaultSignal is carried out since the #StoredFault would otherwise
immediately be set again after an acknowledgement and a still existing #FaultSignal thus making
the #Display flash once again.

S When #Acknowledge has not yet occurred (#StoredFault is still set), the upper path (AND logic
operation) with the #FlashFreq causes the #Display to flash.
When #Acknowledge has already occurred (#StoredFault is no longer set), but #FaultSignal still
exists, the lower path (AND logic operation) causes the #Display to have a continuous light.

TIA-MICRO1 - Functions and Function Blocks


10 Training Document V15.00.00
SIMATIC S7-1200 Basic Course

9.9.1. Exercise 1: Programming the "FC_FaultEvaluation"

D I A
I N
A I N
IT R
Task
S Create the program for the fault evaluation in the parameter-assignable block "FaultEvaluation".

What to Do

2. Declare the formal parameters as shown in the picture.


3. Create the program as shown in the picture.

D A
1. Insert the "FC_FaultEvaluation" block into the "Program blocks" folder.

I
4. Save your project.

I N
A I N
IT R
S
TIA-MICRO1 - Functions and Function Blocks 11
Training Document V15.00.00
SIMATIC S7-1200 Basic Course

9.9.2. Exercise 2: Calling and Assigning the "FC_FaultEvaluation"

DI

DO

D I A
I N
N
I 0.7 S_Quitt P_Fault Q4.3

I 1.1 S_Stoer1 P_Fault1

A I Q4.5

R
I 1.2 S_Stoer2 P_Fault2 Q4.6
I 1.3 S_Stoer3 P_Fault3 Q4.7

Task
S IT
In addition to the conveyor model indicator lights, two process faults (two switches on the
simulator) are also to be evaluated or displayed by means of LED on the simulator. For this,
program two calls of the new "FC_FaultEvaluation" block and parameterize it with the actual
parameters shown in the picture.

What to Do

D I A
1. In the "FC_Fault" block, program the two calls of the new "FC_FaultEvaluation block as
shown in the picture.

I N
2. Download the modified "FC_Fault" into the CPU and test your program to see if it carries out
the described functions.

Note
3. Save your project.

A I N
R
The MB10 memory byte was already parameterized as the clock memory byte in the device
configuration.

IT
The "Clock_2Hz" (M10.3) bit memory has a flashing frequency of 2Hz and was already created

S
as a PLC tag.

TIA-MICRO1 - Functions and Function Blocks


12 Training Document V15.00.00
SIMATIC S7-1200 Basic Course

9.10. Task Description:


Fault Evaluation by means of a Function Block (FB)

DI

"FC_Fault“

DO
Network x

D
"FC_FaultEvaluation"
I A
N
"P_Fault1"

N I Network y

"FB_FaultEvaluation“

I
I 0.7 S_Acknowledge P_Fault Q 4.3
"P_Fault2"

A
"iDB_FB_Fault2Eval"
I 1.1 S_Fault1 P_Fault1 Q 4.5

R
Network z
I 1.2 S_Fault2 P_Fault2 Q 4.6

IT
I 1.3 S_Fault3 P_Fault3 Q 4.7 "FB_FaultEvaluation“
"P_Fault3"

S
Task Description
"iDB_FB_Fault3Eval"

An additional process fault (switch on the simulator) is to be evaluated. The easiest way to do this
would be to program another "FC_FaultEvaluation" call.

I A
However, in order to make use of the given advantages of an FB solution, you are to program a
parameter-assignable "FB_FaultEvaluation" for the evaluation of this process fault:

D
Static variables are to be used here to store the #EdgeMemory and the #StoredFault instead of
in/out parameters.

I N
Compared to the "FC_FaultEvaluation" function, the actual user program remains unchanged.

A I N
IT R
S
TIA-MICRO1 - Functions and Function Blocks 13
Training Document V15.00.00
SIMATIC S7-1200 Basic Course

9.10.1. Instantiating Function Blocks

DI

DO

D I A
I 0.7 S_Acknowledge P_Fault Q 4.3

I N
I 1.1
I 1.2
S_Fault1
S_Fault2

A I
P_Fault1
P_Fault2
Q 4.5
Q 4.6 N
R
I 1.3 S_Fault3 P_Fault3 Q 4.7

S
Special Features
IT
Unlike functions (FCs), function blocks (FBs) have a (recall) memory. That means that a local
data block is assigned to the function block. This data block is known as an instance data block.
When you call an FB, you must also specify the Instance-DB which is then automatically used as
an instance for this FB call.

I A
An instance DB is used to save static variables, among other things. These local variables can
only be used in the FB, in whose declaration table they were declared. When the block is exited,
they are retained.

D
FB Advantages

I N
For the FC programming, the user must search for free memory areas and maintain them.


N
The static variables of an FB, on the other hand, are maintained by the STEP 7 software.

I
The known danger of memory bit double assignments in FC programming is avoided with the

A
use of static variables.

IT R
Instead of the InOut formal parameters #StoredFault and #EdgeMemory of the
"FC_FaultEvaluation", static variables are used in the "FB_FaultEvaluation". This makes the
block call simpler since the two formal parameters are dropped.

S
TIA-MICRO1 - Functions and Function Blocks
14 Training Document V15.00.00
SIMATIC S7-1200 Basic Course

9.10.2. Generating Instance Data Blocks

Automatically generating an Manually creating an instance DB


instance DB during the FB call

D I A
I N
A I N
IT R
S
Generating
There are two ways of generating an instance data block:
• When you call an FB, you specify with which instance DB the FB is to work.
A dialog opens in which the symbolic name and, if desired, a manual number of the instance


.
DB can be preset.

I A
When you create a new DB, you select the Type "Function block XY".

D
I
assigned a different instance DB.

N
An instance DB can only be assigned to one FB. For each call, however, an FB can be

Caution!

I N
If you modify the FB (by adding additional parameters or static variables), you must then

A
also generate the instance DB again.

IT R
S
TIA-MICRO1 - Functions and Function Blocks 15
Training Document V15.00.00
SIMATIC S7-1200 Basic Course

9.10.3. Block Interface for the FB

D I A Instance_DB

Input

IN
Output
InOut

A I N Static

IT R L - Stack
Temp

S
Parameters
When the function block is called, the values of the actual parameters are stored in the instance
data block. If no actual parameters were assigned to a formal parameter in a block call, then the
last value stored in the instance DB for this parameter is used in the program execution.

the data in the data block is retained.

Static Variables

D A
You can specify different actual parameters with every FB call. When the function block is exited,

I
I N
Unlike functions, function blocks have "static variables" (Static). These variables form the memory
of the FB since they are not stored in the L-Stack but in their own memory area, the instance DB.

A I N
IT R
S
TIA-MICRO1 - Functions and Function Blocks
16 Training Document V15.00.00
SIMATIC S7-1200 Basic Course

9.11. Changing the Block Call

D I A
I N
A I N
IT R
existing actual parameters
are adopted

S In order to replace the call of a block with another block call, a selection list of all FCs and FBs
can be opened at the calling point by double-clicking on the name of the already called block.

Advantage:

I A
If both blocks have the same formal parameters, then they retain their actual parameters and all
formal parameters do not have to be supplied with new actual parameters.

D
I N
A I N
IT R
S
TIA-MICRO1 - Functions and Function Blocks 17
Training Document V15.00.00
SIMATIC S7-1200 Basic Course

9.11.1. Exercise 3: Programming "FB_FaultEvaluation"

D I A
I N
A I N
IT R
Task
S Create the new "FB_FaultEvaluation" block for the subsequent evaluation of Fault 2 and 3.

What to Do
1. Insert the new "FB_FaultEvaluation" block.

I A
2. Declare the formal parameters and the static variables of the block as shown in the picture.

D
3. Program "FB_FaultEvaluation" by copying the necessary program parts from the already
programmed "FC_FaultEvaluation".
4. Save your project.

I N
A I N
IT R
S
TIA-MICRO1 - Functions and Function Blocks
18 Training Document V15.00.00
SIMATIC S7-1200 Basic Course

9.11.2. Exercise 4: Calling the Function Block "FB_FaultEvaluation" (FB20)

DI

DO

D I A
I 0.7 S_Acknowledge P_Fault Q 4.3

I N
I 1.1
I 1.2
S_Fault1
S_Fault2

A I
P_Fault1
P_Fault2
Q 4.5
Q 4.6 N
R
I 1.3 S_Fault3 P_Fault3 Q 4.7

Task
S IT
The evaluation of the old Fault 2 (programmed up until now through the call of
"FC_FaultEvaluation") and the evaluation of the new Fault 3 is to be implemented with the newly
created "FB_FaultEvaluation".

What to Do
"FC_Fault", each time with a different instance data block.

D A
For this, the parameter-assignable block "FB_FaultEvaluation" must be called twice in

I
implemented with FB 20.

I N
1. In FC 17, delete the second call of FC 20 since the evaluation of Fault 2 is to be subsequently

2. Program both calls of FB 20 - as shown in the picture - in two new networks in FC 17. Let the
Editor generate the instance DBs 2 and 3.

I
3. Save the modified "FC_Fault".

A N
4. First, download the two newly generated instance data blocks DB 2 and DB 3 into the CPU

IT R
and then download the modified "FC_FaultEvaluation".
5. Test the function of your program.

S
TIA-MICRO1 - Functions and Function Blocks 19
Training Document V15.00.00
SIMATIC S7-1200 Basic Course

9.12. Inserting Block Parameters Later On

D I A
N IN Automatic update of the
block call during

I
compiling

R A
S
Problem
IT
If you have to adjust or supplement the interfaces or the code of individual blocks during or after
program creation, it can lead to time stamp conflicts. Time stamp conflicts can, in turn, lead to
block inconsistencies between calling and called blocks or reference blocks and thus to a great
degree of correction.

update the calls of the block in other blocks.


• Manual Update

D I A
If block parameters are added later on to a block already called in the program, you also have to

I N
In the open, calling block, the inconsistent calls of a block are highlighted in red. By right-
clicking the inconsistent call, the function "Update" can be selected in the follow-up dialog
box. A window then appears in which the old (faulty) and the new block call (in the picture


I
DB is subsequently regenerated.
Automatic Update

A N
with the additional parameter "Light_check") are displayed. With function blocks, the instance

IT R
Time stamp conflicts are also detected when the entire user program is compiled and in case
of added parameters, affected block calls are automatically updated.
With functions, the added formal parameter still has to be assigned before downloading into

S the CPU, since this is a "Must Assign".


With function blocks, the default value from the associated instance DB is used when the
formal parameter is not assigned ("Can Assign").

TIA-MICRO1 - Functions and Function Blocks


20 Training Document V15.00.00
SIMATIC S7-1200 Basic Course

9.13. Removing Block Parameters Later On

D I A
N
(Options > Settings > PLC programming >

I
General > Compilation)
Function “Delete actual parameters on interface
update” is activated?
YES

A I N NO

IT R
S
Problem
If you have to adjust or supplement the interfaces or the code of individual blocks during or after
program creation, it can lead to time stamp conflicts. Time stamp conflicts can, in turn, lead to
block inconsistencies between calling and called blocks or reference blocks and thus to a great
degree of correction.

I A
If block parameters are removed later on from a block already called in the program and the
function “Delete actual parameters on interface update” is not activated in the menu item Options

D
> Settings > PLC-programming > General > Compilation, the actual parameters of the deleted

N
formal parameters are not automatically deleted during compiling. That is, these block calls in

I
other blocks must be updated manually.

A I N
IT R
S • Manual Update
In the open, calling block, the inconsistent calls of a block are highlighted in red. By right-
clicking the inconsistent call, the function "Update" can be selected in the follow-up dialog
box. A window then appears in which the old (faulty) and the new block call (in the picture
with the additional parameter "light_check") are displayed. With function blocks, the instance
DB is subsequently regenerated.

TIA-MICRO1 - Functions and Function Blocks 21


Training Document V15.00.00
SIMATIC S7-1200 Basic Course

9.14. Manually Updating a Block Call

1xR

D I A
I N
A I N
IT R
S
Manual Update
In the open, calling block, the inconsistent calls of a block are highlighted in red. By right-
clicking the inconsistent call, the function "Update" can be selected in the follow-up dialog
box. A window then appears in which the old (faulty) and the new block call (in the picture
with the additional parameter "light_check") are displayed. With function blocks, the instance
DB is subsequently regenerated.

D I A
I N
A I N
IT R
S
TIA-MICRO1 - Functions and Function Blocks
22 Training Document V15.00.00
SIMATIC S7-1200 Basic Course

9.15. Temporary Variables

1. Declaration

D I A
N
2. Assignment

N I
A I
IT R
General
S 3. Query

Temporary variables can be used in all blocks (OB, FC, FB). They are used to temporarily store
information while the block is being executed. The data is lost when the block is exited.
The data is stored in the L stack (local data stack). It is a separate memory area in the CPU.

Declaration

D I A
Before they can be used, variables must be declared in the declaration part of the block. The
name of the variable and its data type must be specified. You cannot predefine the variable with
an initial value.

I N
After you have saved the block, the relative address of the variable in the L-stack is displayed in
the "Offset" column (only for non-optimized block access).

Access

A I N
At the beginning of a block execution, all temporary variables have an indefinite value. When

IT R
working with temporary variables, you must therefore make sure that the variable is first of all
assigned a defined value before it is queried.
In the example, the result of Add(ition) is first assigned to the temporary variable #result before it

Note
S is then queried at the following Mul(tiplication).
For "Non-optimized block access", you can also access temporary variables absolutely (e.g. L0.0
 Local data bit 0.0). You should, however, try to avoid this since the program is more difficult to
read.

Operands that begin with the # special character are local operands (parameters or local
variables) that must be declared in the declaration part of the block. Local operands are only valid
and usable in the block in which they were declared.
The Program Editor automatically inserts the # character.

TIA-MICRO1 - Functions and Function Blocks 23


Training Document V15.00.00
SIMATIC S7-1200 Basic Course

9.16. Total Usage of the Local Data Stack

Operating
system

OB 1 FC 20
2 FC 17
with temp.
variables
3

4
with temp.
variables

D I A
7
5

6
FC 30
with temp.
variables
I N
Event 1 2

A
3

I 4
N5 6 7

R
Usage of
the L stack

S
Total Usage
IT OB 1
FC17
OB 1
FC20
FC17
OB 1
FC17
OB 1
FC30
FC17
OB 1
FC17
OB 1 OB 1

For every program execution level or priority class (such as, OB 1 with all blocks that are called in
it), a separate local data stack is reserved. That is, a segment of defined size is reserved on the L
stack of the CPU (allocation or reservation of memory space).

called in or by OB 1 are stored in this local data stack.

D A
The local operands of OB 1 as well as the local, temporary variables of the blocks (FCs and FBs)

I
You can use the "Reference Data" tool to display the "Program Structure" to see to what extent
an S7 program puts a burden on the local data stack.

Note

I N
If the (CPU-specific) maximum number of local data is exceeded (overflow of the L stack) during

I N
program execution in the CPU, the CPU goes into the STOP state. "STOP caused by error when
allocating local data" is entered as the cause of error in the diagnostics buffer.

A
IT R
S
TIA-MICRO1 - Functions and Function Blocks
24 Training Document V15.00.00
SIMATIC S7-1200 Basic Course

Contents 10
D I A
I N
10. Connecting an HMI device ................................................................................... 10-2
10.1.
10.2.
10.2.1.

A I N
Task Description: Operating the ‘Plant’ via the Touchpanel ............................................... 10-3
Introduction to HMI: Data Exchange between Touchpanel and CPU................................. 10-4
Buttons and Input / Output Fields ....................................................................................... 10-5
10.2.2.
10.2.3.
10.2.4.

IT R
WinCC - Basic Configuration Interface ............................................................................... 10-6
Adding an HMI Device ........................................................................................................ 10-7
Configuring the IP Address of a Touchpanel ...................................................................... 10-8

S
10.2.5. Networking a Touchpanel ................................................................................................... 10-9
10.2.6. Configuring an HMI Connection ........................................................................................ 10-10
10.2.6.1. HMI Connection: Entering the CPU Password ................................................................. 10-11
10.2.7. Setting the IP Address on the Touchpanel ....................................................................... 10-12
10.2.8. Downloading an HMI Project into the Touchpanel............................................................ 10-13
10.3. Adjusting the S7 Program with "Rewire" ........................................................................... 10-14
10.4. Exercise 1: Copying the Touchpanel Project .................................................................... 10-15
10.5. Exercise 2: Networking the Touchpanel ........................................................................... 10-16
10.6.
10.7.
10.8. I A
Exercise 3: Configuring the HMI Connection .................................................................... 10-17
Exercise 4: Checking the HMI Tag Connections .............................................................. 10-18

D
Exercise 5: Setting the IP Address on the TP................................................................... 10-19
10.9.
10.10.
I N
Exercise 6: Downloading the HMI Project into the Touchpanel........................................ 10-20
Exercise 7: Testing the Touchpanel Buttons .................................................................... 10-21
10.11.

I N
Exercise 8: Operating the ‘Plant’ via the Touchpanel ....................................................... 10-22

A
IT R
S
TIA-MICRO1 –Connecting an HMI device
Training Document V15.00.00 10-1
SIMATIC S7-1200 Basic Course

10. Connecting an HMI device

At the end of the chapter the participant will ...

...

...
be able to set the interf ace f or the touchpanel

I A
be f amiliar with the principle of data exchange between touchpanel
and CPU using tags

D
...

I N
be able to commission a touchpanel project

be able to adjust a STEP 7 program

A I N
IT R
S
D I A
I N
A I N
IT R
S
TIA-MICRO1 –Connecting an HMI device
10-2 Training Document V15.00.00
SIMATIC S7-1200 Basic Course

10.1. Task Description: Operating the ‘Plant’ via the Touchpanel


DI
I 0.0 S_ON
4711
I 0.1 S_OFF(NC)
I 0.2 S_Right
I 0.3 S_Left

A
DO

D I P_Operation Q 4.1

IN
I 0.7 S_Ackn. P_Fault Q 4.3

I 1.1 S_FAult1. P_Fault1 Q 4.5

A I N AI / AO DI/ DO
I 1.2
I 1.3
S_FAult2. P_Fault2
S_FAult3. P_Fault3
Q 4.6
Q 4.7

IT R
S Industrial
Ethernet

Task Description
The touchpanel project is to be commissioned and the S7 program of the controller is to be

A
adjusted in such a way that…


simulator switches but via the buttons on the touchpanel.

D I
the functions "Operation ON/OFF" and "Jog Right/Left" are no longer realized via the

the acknowledgement of a conveyor fault should still be possible via the simulator switch

touchpanel.

I N
"S_Acknowledge" (I 0.7), and, in addition, also via the corresponding button on the

N
• the SETPOINT quantity is no longer constant 3, but can be specified via an input/output field
on the touchpanel.

A I
IT R
S
TIA-MICRO1 –Connecting an HMI device
Training Document V15.00.00 10-3
SIMATIC S7-1200 Basic Course

10.2. Introduction to HMI:


Data Exchange between Touchpanel and CPU

A
"S_Left"

I
(M30.3)
Status '0' / '1'

I N D
• PROFIBUS

A I
• Industrial Ethernet
N Update
e.g. every 500ms

IT R Press button "Set Bit"


Let go of button "Reset Bit"

Tags
S
Data is exchanged between SIMATIC S7 and the HMI system via tags. In the configuration of the
HMI device, the screen objects, such as buttons and input/output fields are linked to HMI tags
which in turn are connected to PLC tags of the CPU. The HMI system cyclically exchanges the

A
values between these tags. Data is transferred cyclically between SIMATIC S7 and the HMI

I
system, that is, process variables are cyclically read by the HMI device depending on the
configured update time.

D
HMI Tags

I N
HMI tags can be connected to the global PLC tags or to the following global data areas of the
CPU:


Data blocks (DB)
Bit memories (M)

A I N

IT R
Inputs (I) and outputs (Q)
Peripheral inputs and outputs
HMI systems also recognize local tags without a link to the PLC, i.e. these tags are exclusively

S processed internally and also do not reserve any communication resources whatsoever.

Communication
The operator panels can communicate with the (PLC) controller via the PROFIBUS or Industrial
Ethernet bus systems. The S7 protocol is used for this purpose. Communication is handled by the
operating systems of the S7 CPU and the HMI system. There is no user programming effort
required. An operator panel can also exchange data with several (PLC) controllers.

TIA-MICRO1 –Connecting an HMI device


10-4 Training Document V15.00.00
SIMATIC S7-1200 Basic Course

10.2.1. Buttons and Input / Output Fields

Input / Output
field

D I A
Button

I N
Event

A I N
IT R Action

S
Buttons
System functions can be initiated by the operator via buttons, such as, the selection of a screen
or the setting and resetting of a tag (shown in the picture above). The "Events" of a button are
used to specify for which event which system function is to be executed.

I/O Fields

I A
The values of tags are displayed via output fields. The values of tags can also be preset via input
fields. The mode can be set in the Properties window.

D
I N
A I N
IT R
S
TIA-MICRO1 –Connecting an HMI device
Training Document V15.00.00 10-5
SIMATIC S7-1200 Basic Course

10.2.2. WinCC - Basic Configuration Interface

Tools,
such as, Buttons,
Input / output fields
W orking area

A
HMI Device

D I
Details view
I N
A I N
IT R
Properties,
such as, of a button

S
Project Window
In the Project tree, all devices and their configuration and parameter assignments are displayed
in a tree structure. From there, the relevant editors can be opened. Furthermore, the "language
support" and the "version management" can also be found here.

Working Area

I A
This is the central configuration area in which objects of the operator panel are edited with the
started editor. Several editors can be open at the same time.

D
Properties Window

I N
The properties of selected objects (for example, of screens, screen objects, tags) can be edited in

N
the Properties window. This window is only available in those editors where object properties
have to be set.

Toolbox Window

A I
IT R
The toolbox window contains all configurable objects which can be configured in screens and
permits access to libraries.

S
TIA-MICRO1 –Connecting an HMI device
10-6 Training Document V15.00.00
SIMATIC S7-1200 Basic Course

10.2.3. Adding an HMI Device

Portal view

Project view

D I A
I N
A I N
IT R
S
Adding an HMI Device
New HMI devices can be added in both the Portal view and the Project view. More than anything
else, attention must be paid to the device data such as article (order) number and version
number.

D I A
I N
A I N
IT R
S
TIA-MICRO1 –Connecting an HMI device
Training Document V15.00.00 10-7
SIMATIC S7-1200 Basic Course

10.2.4. Configuring the IP Address of a Touchpanel

D I A
I N
A I N
IT R
Select interface
This address must also be
set manually on the TP

S
PROFINET Interface of the Touchpanel
Regardless of whether the Devices & networks editor is in the Devices view or the Network view,
the settings of the PROFINET interface (IP address and subnet mask) can be made in the
"Properties" tab in the Inspector window for a selected HMI device interface.

I A
If an online connection between the HMI device and the CPU is to be established, both devices
must be assigned the same subnet mask and IP addresses that are in the same subnet.

D
I N
A I N
IT R
S
TIA-MICRO1 –Connecting an HMI device
10-8 Training Document V15.00.00
SIMATIC S7-1200 Basic Course

10.2.5. Networking a Touchpanel

Show / Hide
IP addresses

D I A
I N
A I N
IT R
S
Networking
During networking, devices are connected to a subnet. The device interface must be compatible
with the type of network. The devices are networked with the "Devices & networks" editor in the
"Network" view by connecting the device interfaces using drag & drop.

D I A
I N
A I N
IT R
S
TIA-MICRO1 –Connecting an HMI device
Training Document V15.00.00 10-9
SIMATIC S7-1200 Basic Course

10.2.6. Configuring an HMI Connection

D I A
I N
A I N
IT R
S
Configuring HMI Connections
In configuring HMI connection(s), the communications partners are defined with which the HMI
device will later exchange data in the process control phase. The HMI device can also be
connected to or exchange data with several controllers.

I A
There can also be controllers in the same network with which the HMI device does not exchange
data. Then, the HMI device is "networked" with these controllers but it is not "connected".

D
I N
A I N
IT R
S
TIA-MICRO1 –Connecting an HMI device
10-10 Training Document V15.00.00
SIMATIC S7-1200 Basic Course

10.2.6.1. HMI Connection: Entering the CPU Password

D I A
I N
A I N Password for
HMI accesses

IT R
S
Connection:
The configured connections are visible in the Connections of the HMI device.

Password Query for HMI Accesses


In order to get access rights to a CPU that is password-protected, the HMI device must log on to

I A
the CPU with a password when Runtime is started. This password must be specified in the
Connections configuration of the HMI device (see picture bottom right).

D
I N
A I N
IT R
S
TIA-MICRO1 –Connecting an HMI device
Training Document V15.00.00 10-11
SIMATIC S7-1200 Basic Course

10.2.7. Setting the IP Address on the Touchpanel

Transfer Settings OK

Channel 1:
Ethernet

Advanced
X

X I A
Enable Channel

D
Remote Control

IN
Profinet Settings OK

IP - Address
Loader V01.00.00.01_19

Transfer

A I N
Control Panel OK

Specify an IP address

IP address 192 168 111 101

IT R Start

Control
Transfer
Subnet Mask 255 255 255 0

S
Panel

IP Address of the Touchpanel


The interface of the touchpanel must be set to the same IP address and subnet mask as it is also
configured in the offline project.

Remote Control

A
You can initiate the loading of the WinCC flexible project without having to first manually end the

I
Runtime of the HMI device. The Panel automatically ends the Runtime and switches to the
Transfer Mode.

D
I N
A I N
IT R
S
TIA-MICRO1 –Connecting an HMI device
10-12 Training Document V15.00.00
SIMATIC S7-1200 Basic Course

10.2.8. Downloading an HMI Project into the Touchpanel

D I A
I N
1xR

A I N
IT R
S
Downloading an HMI Project into the Touchpanel
When you transfer an HMI project to one or more operator panels, the part of the project that has
been changed since the last transfer is automatically compiled before downloading. This ensures
that the current project status is always transferred. It is also possible to activate the option
"Overwrite all" before loading starts.

I A
For commissioning, the project should be completely compiled using the command "Compile >
Software (rebuild all blocks)" in the context menu of the operator panel. If HMI tags that are linked

D
to PLC tags are also used in the project, all modified STEP 7 blocks should also be compiled
using the command "Compile > Software" in the context menu and then be downloaded into the
CPU.

I N
It is also advisable to execute the "Compile > Software (rebuild all blocks)" command occasionally

N
to reduce the time required for compiling delta data in current engineering sessions.

A I
IT R
S
TIA-MICRO1 –Connecting an HMI device
Training Document V15.00.00 10-13
SIMATIC S7-1200 Basic Course

10.3. Adjusting the S7 Program with "Rewire"

D I A
I N
1xR

A I N
IT R
S
Adjusting the S7 Program using "Rewire"
So that the plant can be operated via the touchpanel, PLC tags must be used in the S7 program
which can be read or overwritten by the touchpanel. That is, that the variables used up until now
in the S7 program must be replaced accordingly with tags which can be read or overwritten by the
touchpanel.

I A
Another possibility is to "rewire" the variables used up until now in the S7 program as shown in
the picture. With this so-called "rewiring" of a variable, the symbolic name of the variable is kept,

D
but it is assigned a different absolute address which is read or overwritten by the touchpanel.

I N
"Rewiring" can be carried out directly on the tag in the Block Editor (as shown in the picture). The
changes are adopted immediately in the PLC tag table and thus in all program blocks.
Rewiring can also be done directly in the PLC tag table. The changes immediately affect all
program blocks.

A I N
IT R
S
TIA-MICRO1 –Connecting an HMI device
10-14 Training Document V15.00.00
SIMATIC S7-1200 Basic Course

10.4. Exercise 1: Copying the Touchpanel Project

D I A
I N
A I N
IT R
Task
S Your project currently doesn’t contain an HMI device. Instead of a completely new configuration,
you are to copy a prepared panel project from the global library "Micro1_Lib" into your project.

What to Do

into your project (see picture).


2. Save your project.

D I A
1. Using drag & drop, copy the library element "Touchpanel" from the global library "Micro1_Lib"

I N
A I N
IT R
S
TIA-MICRO1 –Connecting an HMI device
Training Document V15.00.00 10-15
SIMATIC S7-1200 Basic Course

10.5. Exercise 2: Networking the Touchpanel

Show / Hide
IP addresses

D I A
I N
A I N
IT R This address must also be
set manually on the TP

Task
SThe added touchpanel is to be networked with the Ethernet network.

What to Do

view.

D A
1. In the Project tree, start the "Devices & networks" editor and there switch to the "Network"

I
2. Position the mouse pointer on the small green square of the HMI device and, while keeping
the left mouse button pressed down, drag a connection to the CPU. The network is created;

mask) are automatically created.

I N
the associated subnet and the parameters appropriate for the network (IP address and subnet

3. ‘Show’ the IP addresses of the CPU and the touchpanel using the button highlighted in the
picture.

A I N
IT R
S
TIA-MICRO1 –Connecting an HMI device
10-16 Training Document V15.00.00
SIMATIC S7-1200 Basic Course

10.6. Exercise 3: Configuring the HMI Connection

1. Select
Connections

D I A
I N
2. Use drag & drop
to drag a connection

A I N 3. Rename connection

IT R
Task
S Now that the TP is networked with the Ethernet network, an HMI connection between the TP and
the CPU must be created. This connection is to given the name "TP-CPU" because this name is
already used in panel project from the library.

What to Do

I A
1. In the Project tree, start the "Devices & networks" editor and there switch to the "Connections"
view and there select "HMI connection".

D
I N
2. Position the mouse pointer on the small green square of the HMI device and, while keeping
the left mouse button pressed down, drag a connection to the CPU. The network is created
and given a default name.

I N
3. Drag open the window containing the connection table (see picture) and rename the
connection "TP-CPU".

A
IT R
S
TIA-MICRO1 –Connecting an HMI device
Training Document V15.00.00 10-17
SIMATIC S7-1200 Basic Course

10.7. Exercise 4: Checking the HMI Tag Connections

D I A
I N
A I N
IT R
Task
SSeveral HMI tags are already connected to PLC tags (inputs and outputs whose addresses are
defined by the conveyor model ‘wiring’). Others still have to be connected by you.

What to Do
1. Open the "HMI tags" of the HMI device.

D I A
2. Connect the HMI tags that are not yet connected to the corresponding PLC tags.

N
3. Save your project.

N I
A I
IT R
S
TIA-MICRO1 –Connecting an HMI device
10-18 Training Document V15.00.00
SIMATIC S7-1200 Basic Course

10.8. Exercise 5: Setting the IP Address on the TP

Transfer Settings OK

Channel 1:
Ethernet X

D I A
Enable Channel

Remote Control

IN
Advanced

Profinet Settings OK

IP - Address
Loader V01.00.00.01_19

Transfer

A I N
Control Panel OK

Specify an IP address

IP address

R
192 168 111 101

IT
Start Subnet Mask 255 255 255 0
Transfer

S
Control
Panel

Task
The interface of the touchpanel is to be set as shown in the picture so that the configuration can
then be loaded into the panel.
Runtime must be exited before the interface can be assigned parameters. For this, a button for
exiting Runtime is generally provided in the Start screen. When Runtime has been exited, the

What to Do
every time power is restored.

D A
"Loader" appears through which the "Control Panel" can be activated. The Loader also appears

I
1. Exit the Runtime of the touchpanel.
2. Activate the Control Panel.
I N
N
3. Select "Transfer" by double-clicking on it.

I
4. Implement the settings shown in the picture.

A
5. Go back to the Loader by closing the windows with "OK".

IT R
6. Activate the "Transfer" button so that the touchpanel waits for a connection to be established
by the PG.

S
TIA-MICRO1 –Connecting an HMI device
Training Document V15.00.00 10-19
SIMATIC S7-1200 Basic Course

10.9. Exercise 6: Downloading the HMI Project into the Touchpanel

D I A
I N
1xR

A I N
IT R
Task
SFrom the now complete project, all S7 blocks will be downloaded once more from the
programming device into the CPU and the entire panel project will be transferred from the
programming device into the touchpanel.

What to Do

I A
1. Completely compile the entire CPU program and the entire panel project.

D
2. In the Inspector window, in the "Compile" tab, check whether the compilation was successful.

I
3. Download all S7 blocks into the CPU.
N
If need be, make the necessary corrections.

5. Save your project.

A I N
4. Download the panel project into the touchpanel.

IT R
S
TIA-MICRO1 –Connecting an HMI device
10-20 Training Document V15.00.00
SIMATIC S7-1200 Basic Course

10.10. Exercise 7: Testing the Touchpanel Buttons

D I A
I N
A I N
IT R
Task
S On the touchpanel, press the buttons, and, using the STEP 7 test function "Monitor/modify
variables", observe how the touchpanel sets and resets the corresponding tags in the S7-CPU.

What to Do

I A
1. Create a watch table with the PLC tags to which the touchpanel buttons are connected.
2. One after the other, press all buttons and, in the STEP 7 test function "Monitor/modify
variables", observe how the touchpanel influences the tags.

D
I N
A I N
IT R
S
TIA-MICRO1 –Connecting an HMI device
Training Document V15.00.00 10-21
SIMATIC S7-1200 Basic Course

10.11. Exercise 8: Operating the ‘Plant’ via the Touchpanel

DI
S_ON "S_OperationON" "S_OperationOFF
4 7 1 1 (M30.0) (M30.1)
S_OFF(NC)
S_Right
S_Left
DO

D I A
IN
P_Operation

S_Ackn. P_Fault
"S_Left" "S_Right"
S_FAult1. P_Fault1
S_FAult2. P_Fault2
S_FAult3. P_Fault3

A I N
(M30.3) (MW20)

IT R "S_AcknHMI"
(M30.7)
"MW_SETP"
(MW22)
"MW_ACT"
(MW20)

Task
S The touchpanel project is to be commissioned and the S7 program of the controller is to be
adjusted in such a way that …
• the functions "Operation ON/OFF" and "Jog Right/Left" are no longer done using the


A
simulator switches but instead are done using the touchpanel buttons.

I
acknowledgement of conveyor faults should be possible, as before, via the simulator switch

D
"S_Acknowledge" (I 0.7), and in addition via the corresponding button on the touchpanel.

I N
the SETPOINT quantity is no longer to be constant 3, but can be specified via an input/output
field on the touchpanel (the display of the ACTUAL quantity is already configured)

N
What to Do

A I
1. Establish the functions "Operation ON / OFF" and "Jog Left / Right" by rewiring the variables
"S_ON", "S_OFF (NC)", "S_Right" and "S_Left" used up until now to the absolute addresses
M30.0, M30.1, M30.2 and M30.3 shown in the picture.

IT R
2. Establish the function "Acknowledge fault" by also connecting the memory bit "M_AcknHMI"
(M30.7) shown in the picture in addition to the already connected simulator switch
"S_Acknowledge" (I 0.7).

S 3. Establish the function "Setpoint" by exchanging the constant (=3) used in the program with
the memory word "MW_SETP" (MW22).
4. Download all modified blocks into the CPU.
5. Check all required functions.
6. Save your project.

TIA-MICRO1 –Connecting an HMI device


10-22 Training Document V15.00.00
SIMATIC S7-1200 Basic Course

Contents 11

D I A
11. Solutions ............................................................................................................... 11-2
11.1.
11.2.

I N
"OB_Cycle" (OB1) ............................................................................................................... 11-2
"FC_Mode" .......................................................................................................................... 11-3
11.3.
11.4.
11.5. N
"FC_Conveyor" ................................................................................................................... 11-4

I
"FC_Fault" ........................................................................................................................... 11-5

A
"FC_FaultEvaluation" .......................................................................................................... 11-7
11.6.
11.7.

IT R"FB_FaultEvaluation" .......................................................................................................... 11-8


"FC_Signal" ......................................................................................................................... 11-9

S
11.8. "FC_Count" ....................................................................................................................... 11-10

D I A
I N
A I N
IT R
S
TIA-MICRO1 - Solutions
Training Document V15.00.00 11-1
SIMATIC S7-1200 Basic Course

11. Solutions
11.1. "OB_Cycle" (OB1)

D I A
I N
A I N
IT R
S
D I A
I N
A I N
IT R
S
TIA-MICRO1 - Solutions
11-2 Training Document V15.00.00
SIMATIC S7-1200 Basic Course

11.2. "FC_Mode"

D I A
I N
A IN
IT R
S
D I A
I N
A IN
IT R
S
TIA-MICRO1 - Solutions
Training Document V15.00.00 11-3
SIMATIC S7-1200 Basic Course

11.3. "FC_Conveyor"

D I A
I N
A I N
IT R
S
D I A
I N
A I N
IT R
S
TIA-MICRO1 - Solutions
11-4 Training Document V15.00.00
SIMATIC S7-1200 Basic Course

11.4. "FC_Fault"

>=1 --> &

D I A
I N
A I N
IT R
S
D I A
I N
A I N
IT R
S
Continuation on the next page

TIA-MICRO1 - Solutions
Training Document V15.00.00 11-5
SIMATIC S7-1200 Basic Course

Continuation "FC_Fault"

D I A
I N
A IN
IT R
S
D I A
I N
A IN
IT R
S
TIA-MICRO1 - Solutions
11-6 Training Document V15.00.00
SIMATIC S7-1200 Basic Course

11.5. "FC_FaultEvaluation"

D I A
I N
A I N
IT R
S
D I A
I N
A I N
IT R
S
TIA-MICRO1 - Solutions
Training Document V15.00.00 11-7
SIMATIC S7-1200 Basic Course

11.6. "FB_FaultEvaluation"

D I A
I N
A I N
IT R
S
D I A
I N
A I N
IT R
S
TIA-MICRO1 - Solutions
11-8 Training Document V15.00.00
SIMATIC S7-1200 Basic Course

11.7. "FC_Signal"

D I A
I N
A IN
IT R
S
D I A
I N
A IN
IT R
S "P_Bay1" (Q8.1)
-> "P_Bay_LB" (Q8.4)

TIA-MICRO1 - Solutions
Training Document V15.00.00 11-9
SIMATIC S7-1200 Basic Course

11.8. "FC_Count"

D I A
I N
A IN
Switch operands !!!

IT R
S
D I A
I N
A IN
IT R
S
TIA-MICRO1 - Solutions
11-10 Training Document V15.00.00
SIMATIC S7-1200 Basic Course

Contents 12
D I A
I N
12. Training and Support ........................................................................................... 12-2
12.1.
12.2.
I N
Any Questions on our Training Courses Offered?? ............................................................ 12-3

A
www.siemens.com/sitrain ................................................................................................... 12-4

R
12.3. Learning path: SIMATIC S7 Prgramming in the TIA Portal ................................................ 12-6

IT
12.4. Download the training documents ...................................................................................... 12-7
12.5. The Industry Online Support – the most important innovations.......................................... 12-8

S12.6.
12.7.
12.8.
12.9.
The Principle of Navigation ................................................................................................. 12-9
Complete product information ........................................................................................... 12-10
mySupport – Overview...................................................................................................... 12-11
Support Request ............................................................................................................... 12-12
12.10. Support Request ............................................................................................................... 12-13
12.11. Industry Online Support – wherever you go ..................................................................... 12-14

A
12.11.1. Scanning product/EAN code ............................................................................................. 12-15

I
12.11.2. Scan functionality .............................................................................................................. 12-16

D
12.12. Forum - the communication platform for Siemens Industry products ............................... 12-17
12.12.1. Conferences and Forum management ............................................................................. 12-17

12.13.

I N
12.12.2. Interactions in the Forum .................................................................................................. 12-19
Task and Checkpoint ........................................................................................................ 12-21

A I N
IT R
S
TIA-MICRO1 – Training and supportInhaltsverzeichnis
Training Document, V15.00.0
12-1
SIMATIC S7-1200 Basic Course

12. Training and Support

D I A
I N
A I N
IT R
S
D I A
I N
A I N
IT R
S
TIA-MICRO1 - Training and Support
12-2 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

12.1. Any Questions on our Training Courses Offered??

We’ll help you!


... on the Internet:
www.siemens.com/sitrain
or with e-mail:

D
[email protected]
I A
I N
A I N
IT R
S
General Information
We‘ll be glad to help you regarding any questions on our training courses offered.

D I A
I N
A I N
IT R
S
TIA-MICRO1 – Training and supportInhaltsverzeichnis
Training Document, V15.00.0
12-3
SIMATIC S7-1200 Basic Course

12.2. www.siemens.com/sitrain

D I A
1

I N
2

A I N
IT R
S The complete range of courses offered can be accessed via the following links:
www.siemens.de/sitrain or
www.siemens.com/sitrain

Course Search

1
I A
The course search permits the user to find the required courses by applying different search

D
filters such as keyword, target group, etc. The filters can also be combined.

Course Catalog

I N
The course catalog permits you to find the required course via learning paths or via the Siemens
Mall structure.

A I N
IT R
S
TIA-MICRO1 - Training and Support
12-4 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

Top Links
Various courses, e.g. SIMATIC S7-1500 solution line, etc., can be reached directly via the top
links.

D I A
I N
A I N
IT R
S
D I A
I N
A I N
IT R
S
TIA-MICRO1 – Training and supportInhaltsverzeichnis
Training Document, V15.00.0
12-5
SIMATIC S7-1200 Basic Course

12.3. Learning path: SIMATIC S7 Prgramming in the TIA Portal

D I A
I N
A I N
IT R
S
D I A
I N
A I N
IT R
S
TIA-MICRO1 - Training and Support
12-6 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

12.4. Download the training documents

Register with your access data

D I A
1

I N
Chose "History" after the

A I N
IT R
course.

Chose the course


Download your documents

S If you want to download the training documents, proceed as follows:


• Visit our new SITRAIN homepage at http://www.siemens.de/sitrain
• Register with your access data under the menu option MyTraining.
• Select MyLearning on the right-hand side of the submenu.

I A
Select your course and download your documents with a click on ”Download documents”.

D
N
Documents
Name

N
> SIMATIC S7 Sequence Control with …
I 18,47 MB
Size

Hint:

A I
IT R
Please note that the training documents may be used for personal purposes exclusively. You
agree that you will not copy the training documents or make them accessible to third parties and
that you will be liable for any damage resulting thereof.

S
TIA-MICRO1 – Training and supportInhaltsverzeichnis
Training Document, V15.00.0
12-7
SIMATIC S7-1200 Basic Course

12.5. The Industry Online Support – the most important innovations

1
3

D I A 4

I N
A I N
IT R
S The most important functions are always in the same place on all the pages:
The menu bar links to the main areas of the site. You can subscribe and register at any time to
1 benefit from the features the personalized mySupport option offers.

2
A
Links to our service offerings are in the center. On the start page, you will find up-to-date

I
information and links, which quickly brings you to your destination in other areas of Online
Support.

D
3 and mySupport.

I N
Links from the menu bar are repeated at the top of the page: Product Support, Services, Forum

4
N
On every page, you will find your personal mySupport cockpit. There, for example, you can see

I
when the status of your support inquiry changes.

A
IT R
S
TIA-MICRO1 - Training and Support
12-8 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

12.6. The Principle of Navigation

D I A
I N
A I N
IT R
S Here, you will find information about all the current and discontinued products, such as:
• Frequently Asked Questions (FAQ)
• Manuals and Operating Instructions
• Downloads


Product Notes (product announcements, discontinuation, etc.)
Certificates

D I A


Characteristics
Application Examples

I N
A I N
You will not only be able to access these articles though the product tree, but also through a
central filter bar. The integration of various search filters will give you access to relevant
information after only a few clicks. The product tree has been moved to an equivalent filter. This

IT R
has the effect that several filter steps can be combined clearly and comprehensibly.

Based on the preview numbers you can see the expected set of results before using a filter. This

S makes finding relevant information considerably easier and more efficient.

For example, you can customize your search by combining the product tree, a search keyword
and a document type in your search.
There will be no hidden search parameters; all the settings and results will be clearly displayed.

TIA-MICRO1 – Training and supportInhaltsverzeichnis


Training Document, V15.00.0
12-9
SIMATIC S7-1200 Basic Course

12.7. Complete product information

D I A
I N
A I N
IT R
S
A powerful function of the Industry Online Support is the direct access to complete product
information. You can use it if you are looking for a quick and easy access to all the technical
information about a Siemens Industry product. For example, for comparing products, if you are
expanding your system or replacing individual components, this is how to do it:
In the Product Support area, there is the central navigation bar.

I A
To select a product, simply select the filter “Product.” Enter an order number or a product name
here. You will be supported by a dynamic display of suitable products (list of suggestions).

D
One more click and the details of the selected product will be displayed – always up to date:

I N
Product life cycle, consisting of milestones with dates (e.g. delivery release, discontinuation of
the product, …). You will find out whether the selected product is a current product or whether
the product is already in the discontinuation phase.

I N
Successor products for discontinued products and new developments will be suggested. If
there is a successor product, you will get a direct link to the product information of this
product.

A

IT R
Technical data – clear, compact and complete. You get all the available technical data
concerning the selected product here – dimensions, operating voltage or the number of
inputs/outputs, etc.

S
TIA-MICRO1 - Training and Support
12-10 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

12.8. mySupport – Overview

D I A
I N
A I N
IT R
S
mySupport
The mySupport area will always remain your personal workplace; with this feature you can make
the best of your Industry Online Support experience.
The most important thing, if you're already working with mySupport, you can take all your
previous personal data and information you’ve filed away with you to the Industry Online Support.

I A
In this area, you can compile the information that is important for your daily work – we provide
you with the suitable tools. Create your own folder structures and file information such as

D
bookmarks. There are numerous options, whether you want to file items by project or by
products.

I N
Moreover, you can now add notes, comments and tags (keywords). The system automatically
creates a “Tag Cloud” based on your entries so you can access information quickly and easily by

N
means of your own terms. The operation is consistent throughout mySupport so that you will

A I
easily find your way around. “Drag &drop” is also possible.
As soon as you are logged on, the mySupport cockpit is always at your side. It will immediately
show you when the status of a support request changes, or when you receive new personal

IT R
messages. You also have direct access to your personal keywords in the tag cloud, to the entries
last visited, and you can see which user is online.
Here, just a few highlights:

S •


The previous MyDocumentationManager is now completely integrated into mySupport under
the name of “mySupport-Documentation.” The function category “Documentation” contains all
the functions of the MyDocumentationManager and provides a few innovations, too.
The Service & Support Newsletter has been completely revamped. An individual messaging
system will more than replace it.

TIA-MICRO1 – Training and supportInhaltsverzeichnis


Training Document, V15.00.0
12-11
SIMATIC S7-1200 Basic Course

12.9. Support Request

D I A
I N
A I N
IT R
S
Support Request
To create a Support Request, different options are available to you in Online Support:
• You will find the "Support Request" option in the menu on all Online Support pages.
• Alternatively, you can create a new request in mySupport in the "Requests" category.
• Or directly click on the following link:
http://www.siemens.com/automation/support-request
Tips for creating a request:

D I A

I N
Select your product and use case as accurately as possible; try to avoid selecting "Other". By
doing so, you ensure optimum support by our experts and appropriate suggested solutions.


I N
Did other users have a similar problem? This step already offers frequent problems and
solutions. Take a look – it will be worth your while!

A
Describe your problem with as much detail as possible. Pictures or explanatory attachments

R
allow our experts to consider your problem from all sides and develop solutions. You can
upload multiple attachments up to 10 MB per file.

S

IT
Before each sending, verify your personal contact information and the data you have entered.
The final step additionally offers the option to print the summary.
As a logged in user, you can track the status of your requests online. To do so, navigate to "My
requests" in the "Requests" category in mySupport.

TIA-MICRO1 - Training and Support


12-12 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

12.10. Support Request

D I A
I N
A I N
IT R
S
D I A
I N
A I N
IT R
S
TIA-MICRO1 – Training and supportInhaltsverzeichnis
Training Document, V15.00.0
12-13
SIMATIC S7-1200 Basic Course

12.11. Industry Online Support – wherever you go

 Mobile access to more than 300,000 entries on


all Siemens Industry products
 Reduced to the essential functions
 Application case: initial diagnosis of problem or

machine

D I A
in case of failures directly at the system or

I N
A I N
IT R
Quick and easy ccess to technical information, anytime.
Scanning function, search and Support Request – everything at your
fingertips at any time.

S
The app supports you, for example, in the following fields:
• Problem solving during the implementation of a project
• Troubleshooting of failures
• Expanding or restructuring your system

our experts:

D I A
It also provides you with access to the Technical Forum and to further entries created for you by

N
• FAQs


Application examples
Manuals

N I


Certificates

A I
Product notes and many others

IT R
The main functions at a glance:

S •


Scan your product codes / EAN codes for a direct display of all technical and graphic data
(e.g. CAx data) about your Siemens Industry product.
Send your product information or entries per e-mail in order to process the information directly
at the workstation.
Send your requests to Technical Support at your convenience. Detail information can easily
be added using the scan or photo function.
• Use the offline cache function to save your favorites to your device. In this way you can call
these entries, products and conferences even without network coverage.
• Transfer PDF documents to an external library.
• The contents and surfaces are available in six languages (German, English, French, Italian,
Spanish and Chinese) - including a temporary switching to English.
TIA-MICRO1 - Training and Support
12-14 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

12.11.1. Scanning product/EAN code

 After scanning a code, the


product view will open in most
cases.
 Specialized search options are

D I A
available for configurable
products.
 Depending on the product, the
result can also be displayed as

IN
a list of products, in which
 the user can select the

N
appropriate product.

A I
IT R
S
D I A
I N
A I N
IT R
S
TIA-MICRO1 – Training and supportInhaltsverzeichnis
Training Document, V15.00.0
12-15
SIMATIC S7-1200 Basic Course

12.11.2. Scan functionality

The scan functionality in the


Data matrix codes QR code Online Support app supports the
following types of code:
Data matrix code
QR code

on Siemens products
as per standard SN60450
e.g.: in advertisements
relating to Siemens content

D I A
EAN13 bar code
Code39 bar code
When one of these codes is

EAN13 bar code

I N
Code39 bar code
recognized, the respective
product view is called up in the
app.

A I N Exception:
The QR codes contain URLs –
these are directly called up and
displayed in the app by the

IT R
on Siemens products (very hard to recognize /
scan) on Siemens products
as per standard SN60450
integrated browser (but only, if
"siemens" is contained in the
URL).

S
D I A
I N
A I N
IT R
S
TIA-MICRO1 - Training and Support
12-16 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

12.12. Forum - the communication platform for Siemens Industry


products
12.12.1. Conferences and Forum management

1
2

D I A
I N
A I N
IT R
S 3

1 On the left side, you will find the so-called conference tree. It allows you to navigate through the

2
individual discussion areas.

I A
The conference overview is the central discussion area of the Technical Forum. This is where the

D
community meets to discuss technical questions about Siemens Industry products.

N
In forum management, you will find your personal control center for the Technical Forum. It allows
3

I
you to manage your specific profile data and filters.

A I N
IT R
S
TIA-MICRO1 – Training and supportInhaltsverzeichnis
Training Document, V15.00.0
12-17
SIMATIC S7-1200 Basic Course

D I A
I N
A I N
IT R
S
Conference filter
Add conferences to your personal filter of preferred conferences.
This allows you to enable a notification that informs you when new topics are started in these
conferences.
In Quicklinks, the Technical Forum additionally offers an overview page that contains all topics of
your preferred conferences.

Managing profile
Profile management provides interesting information and functions:

D
You get an overview of your activities in the Technical Forum. I A


I N
You can view your rank, any special permissions and your ranking progress.
You can store a signature and a personal description for your profile in the forum.

to.

A I N
You have direct access to the quick links to get an overview of all topics you have contributed

R
User filter

IT
Have you found a user in the Technical Forum who posts entries that are particularly interesting?
Then add this user to your list of "preferred users".

S This allows you to enable a notification that informs you when the user has posted a new entry.
In Quicklinks, the Technical Forum additionally offers an overview page that contains all topics of
your preferred users.

TIA-MICRO1 - Training and Support


12-18 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

12.12.2. Interactions in the Forum

Creating a new topic in a

D I A
N
conference

Status:

N I
Topic from Rating of the

I
solved conference overview topic

R A
S IT

D I A
I N
A I N
IT R
S
TIA-MICRO1 – Training and supportInhaltsverzeichnis
Training Document, V15.00.0
12-19
SIMATIC S7-1200 Basic Course

Topic from conference


overview

Creating a new entry for


the topic

D I A
I N
Reacting to an
existing entry

A I N
R
Feedback for the
individual entry

S IT
Creating a new entry
Do you want to create or format a new entry? The entry editor provides all the necessary
functions.
• You can upload and publish in the forum a file with "Add attachment".
• You would like to check before the publication how your entry will actually look? A preview is
available for this purpose.

Posting / replying to an entry

D I A
You would like to look at the topic again to which you create an entry? Please, you used the
link over the input area (right mouse button > open in a new tab or window)

I N
Do you want to participate in an existing discussion with your own entry? Click on "Reply" and
post your personal entry to support other users in answering the question.

N
• Use the "Reply" link to go to the entry editor and create a reply without quoting the entry.

A I
If you want to quote the entry, possibly only excerpts of it, use the "Quote" link. The content of
the quoted entry is then displayed accordingly in the entry editor.

IT R
Rating an entry / saying thank you
Do you find an entry particularly interesting? Use the available functions and rate the entry or say
thank you to provide personal feedback. Ratings and thank yours are the rewards our community

S members get for the support they provide. When you rate an author or entry, this will be added to
the already existing ratings. The average value of all ratings is displayed.
Aside from feedback to the author of the entry, you also draw other readers' attention to
particularly valuable entries and helpful authors.

TIA-MICRO1 - Training and Support


12-20 Training Document, V15.00.00
SIMATIC S7-1200 Basic Course

12.13. Task and Checkpoint

Task: Software compatibility

Goal
Find out which current version of virus scanners is compatible with your engineering software.
Use all information sources available:


Readme files in the installation folder
The compatibility tool of the Industry Online Support

D I A


Entries in the Product support
Entries in the Forum
I N
Checkpoint
• Create a Support Request.

A I N
IT R Let‘s think about this:

S • Name some reasons for


registration in MySupport.
• What do you think is the best way
to have always the latest version
of the required manuals for your
job with you?

D I A
I N
A I N
IT R
S
TIA-MICRO1 – Training and supportInhaltsverzeichnis
Training Document, V15.00.0
12-21

You might also like