840Dsl Toolbox Getting Started 1219 en-US

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

Preface

Fundamental safety
instructions 1

Introduction 2
SINUMERIK
Product features 3
SINUMERIK 840D sl
SINUMERIK 840D sl STEP 7
Getting Started 4
Toolbox V16
Configuring the hardware 5
Getting Started

Creating a PLC program 6


Tips for personnel changing
over from another system 7

Valid for
SINUMERIK V4.93
TIA Portal V16

12/2019
6FC5397-1GP40-0BA1
Legal information
Warning notice system
This manual contains notices you have to observe in order to ensure your personal safety, as well as to prevent
damage to property. The notices referring to your personal safety are highlighted in the manual by a safety alert
symbol, notices referring only to property damage have no safety alert symbol. These notices shown below are
graded according to the degree of danger.

DANGER
indicates that death or severe personal injury will result if proper precautions are not taken.

WARNING
indicates that death or severe personal injury may result if proper precautions are not taken.

CAUTION
indicates that minor personal injury can result if proper precautions are not taken.

NOTICE
indicates that property damage can result if proper precautions are not taken.
If more than one degree of danger is present, the warning notice representing the highest degree of danger will be
used. A notice warning of injury to persons with a safety alert symbol may also include a warning relating to property
damage.
Qualified Personnel
The product/system described in this documentation may be operated only by personnel qualified for the specific
task in accordance with the relevant documentation, in particular its warning notices and safety instructions. Qualified
personnel are those who, based on their training and experience, are capable of identifying risks and avoiding
potential hazards when working with these products/systems.
Proper use of Siemens products
Note the following:

WARNING
Siemens products may only be used for the applications described in the catalog and in the relevant technical
documentation. If products and components from other manufacturers are used, these must be recommended or
approved by Siemens. Proper transport, storage, installation, assembly, commissioning, operation and
maintenance are required to ensure that the products operate safely and without any problems. The permissible
ambient conditions must be complied with. The information in the relevant documentation must be observed.

Trademarks
All names identified by ® are registered trademarks of Siemens AG. The remaining trademarks in this publication
may be trademarks whose use by third parties for their own purposes could violate the rights of the owner.
Disclaimer of Liability
We have reviewed the contents of this publication to ensure consistency with the hardware and software described.
Since variance cannot be precluded entirely, we cannot guarantee full consistency. However, the information in this
publication is reviewed regularly and any necessary corrections are included in subsequent editions.

Siemens AG Document order number: 6FC5397-1GP40-0BA1 Copyright © Siemens AG 2013 - 2019.


Division Digital Factory Ⓟ 11/2019 Subject to change All rights reserved
Postfach 48 48
90026 NÜRNBERG
GERMANY
Preface

SINUMERIK documentation
The SINUMERIK documentation is organized in the following categories:
● General documentation
● User documentation
● Manufacturer and service documentation
This documentation belongs to the manufacturer and service documentation category.

Additional information
You can find information at www.siemens.com/motioncontrol/docu for the following topics:
● Ordering documentation / overview of documentation
● Additional links to download documents
● Using documentation online (find and search in manuals/information)
Please send any questions about the technical documentation (e.g. suggestions for
improvement, corrections) to the following address:
docu.motioncontrol@siemens.com

My Documentation Manager (MDM)


Under the following link you will find information to individually compile OEM-specific machine
documentation based on the Siemens content:
www.siemens.com/mdm

Training
You can find information about the range of training courses under the following links:
● www.siemens.com/sitrain
SITRAIN - training courses from Siemens for products, systems and solutions in automation
technology
● www.siemens.com/sinutrain
SinuTrain - training software for SINUMERIK

FAQs
You can find Frequently Asked Questions in the Service&Support pages under Product
Support. http://support.automation.siemens.com

SINUMERIK 840D sl STEP 7 Toolbox V16


Getting Started, 12/2019, 6FC5397-1GP40-0BA1 3
Preface

SINUMERIK
You can find information on SINUMERIK under the following link:
www.siemens.com/sinumerik

Technical Support
Country-specific telephone numbers for technical support are provided on the Internet at the
following address (https://support.industry.siemens.com/sc/ww/en/sc/2090) in the "Contact"
area.
If you have any technical questions, use the online form in the "Support Request" area.

Target group
This document is intended for first-time users wanting to familiarize themselves with the
product.

Benefits
Getting Started provides information to the newcomer and brings about a sense of
achievement to the first-time user in a very short time. First-time users learn the basic functions
of the product or system and how to perform the essential activities and operations themselves.

Standard scope
This documentation only describes the functionality of the standard scope. Additions or
revisions made by the machine manufacturer are documented by the machine manufacturer.
Other functions not described in this documentation might be executable in the control. This
does not, however, represent an obligation to supply such functions with a new control or when
servicing.
For the sake of simplicity, this documentation does not contain all detailed information about all
types of the product and cannot cover every conceivable case of installation, operation, or
maintenance.

Note regarding the General Data Protection Regulation


Siemens observes standard data protection principles, in particular the principle of privacy by
design. That means that
this product does not process / store any personal data, only technical functional data (e.g. time
stamps). If a user links this data with other data (e.g. a shift schedule) or stores personal data
on the same storage medium (e.g. hard drive) and thus establishes a link to a person or
persons, then the user is responsible for ensuring compliance with the relevant data protection
regulations.

SINUMERIK 840D sl STEP 7 Toolbox V16


4 Getting Started, 12/2019, 6FC5397-1GP40-0BA1
Preface

Conventions
The following terms/abbreviations are used synonymously in this document:
● "SINUMERIK 840D sl STEP 7 Toolbox <TIA Portal Version>" and "SINUMERIK Toolbox"

SINUMERIK 840D sl STEP 7 Toolbox V16


Getting Started, 12/2019, 6FC5397-1GP40-0BA1 5
Preface

SINUMERIK 840D sl STEP 7 Toolbox V16


6 Getting Started, 12/2019, 6FC5397-1GP40-0BA1
Table of contents

Preface .........................................................................................................................................................3
1 Fundamental safety instructions.................................................................................................................11
1.1 General safety instructions.....................................................................................................11
1.2 Equipment damage due to electric fields or electrostatic discharge ......................................15
1.3 Warranty and liability for application examples ......................................................................16
1.4 Industrial security ...................................................................................................................17
1.5 Residual risks of power drive systems ...................................................................................19
2 Introduction.................................................................................................................................................21
2.1 Classification in the documentation landscape ......................................................................21
2.2 Organization of the Getting Started........................................................................................22
2.3 Views in the TIA Portal...........................................................................................................24
2.4 Structure of SINUMERIK NCU...............................................................................................28
3 Product features .........................................................................................................................................31
4 Getting Started ...........................................................................................................................................33
4.1 Installing the SINUMERIK toolbox .........................................................................................33
4.2 Starting the TIA Portal............................................................................................................34
4.3 Creating a sample project ......................................................................................................35
5 Configuring the hardware ...........................................................................................................................37
5.1 Configuration example ...........................................................................................................37
5.2 Insert NCU .............................................................................................................................38
5.3 Insert NX module ...................................................................................................................40
5.4 Inserting an ADI4 module.......................................................................................................45
5.5 Inserting SINUMERIK I/O via the general station description (GSD) file ...............................48
5.5.1 Installing general station description files for SINUMERIK I/O...............................................49
5.5.2 Inserting the SINUMERIK I/O module PP72/48 .....................................................................51
5.5.3 Inserting SINUMERIK MCP/MPP...........................................................................................53
5.6 Configuring network interfaces...............................................................................................56
5.6.1 Introduction ............................................................................................................................56
5.6.2 Configuring an Ethernet Interface ..........................................................................................56
5.6.3 Configuring PROFINET..........................................................................................................57
5.6.4 Configuring PROFIBUS DP ...................................................................................................58
5.6.5 Configure Integrated PROFIBUS (DP Integrated) .................................................................59
5.7 Configuration of telegrams and I/O addresses.......................................................................61
5.8 Setting up the communication................................................................................................62

SINUMERIK 840D sl STEP 7 Toolbox V16


Getting Started, 12/2019, 6FC5397-1GP40-0BA1 7
Table of contents

5.9 Loading and closing the hardware configuration in the PLC..................................................65


6 Creating a PLC program.............................................................................................................................71
6.1 Overview ................................................................................................................................71
6.2 Adding the PLC basic program ..............................................................................................72
6.2.1 Opening the PLC basic program system library.....................................................................72
6.2.2 Using copy templates.............................................................................................................73
6.2.3 Adding the PLC basic program ..............................................................................................76
6.2.4 Create blocks from external sources......................................................................................80
6.2.5 Correcting OB1 ......................................................................................................................81
6.3 Edit blocks..............................................................................................................................83
6.4 Configuring Ethernet machine control panels in the PLC program ........................................84
6.5 Loading the PLC program to the PLC ....................................................................................87
6.6 Exporting PLC symbols for SINUMERIK Operate..................................................................89
6.6.1 Overview ................................................................................................................................89
6.6.2 Exporting PLC symbols..........................................................................................................90
6.6.3 Importing PLC symbols ..........................................................................................................93
6.7 Completing the first commissioning of the PLC .....................................................................95
7 Tips for personnel changing over from another system .............................................................................97
7.1 Overview for the migration .....................................................................................................97
7.2 Migrating projects...................................................................................................................98
7.2.1 Overview ................................................................................................................................98
7.2.2 Preparing a STEP 7 V5.x project for the migration ................................................................98
7.2.3 Migrating program blocks and symbols................................................................................100
7.2.4 Migrating software and hardware configurations .................................................................103
7.2.5 Upgrading the PLC basic program.......................................................................................104
7.2.6 More information ..................................................................................................................106
7.3 Troubleshooting ...................................................................................................................107
7.3.1 Overview ..............................................................................................................................107
7.3.2 Duplicate block addresses ...................................................................................................107
7.3.3 Automatically assigned absolute access..............................................................................108
7.3.4 Incompatible data types .......................................................................................................109
7.3.5 LAD/FDB/SCL: Data type conversion with MOVE instruction..............................................109
7.3.6 Inconsistency of the data blocks for a different runtime version ..........................................110
7.3.7 Renaming blocks..................................................................................................................110
7.3.8 Configuration and activation of the Web server ...................................................................111
7.3.9 Rewiring variables in the module .........................................................................................112
7.4 Comparison of functionality..................................................................................................114
7.4.1 Overview ..............................................................................................................................114
7.4.2 Exporting PLC symbols (PLC Symbol Generator) ...............................................................115
7.4.3 New library functions............................................................................................................116
7.4.4 Safety Integrated and Safety Integrated plus.......................................................................117
7.4.5 Working in the project view and the portal view ...................................................................118
7.4.6 Displaying program blocks in the tabular overview ..............................................................119
7.4.7 Configuring of connections...................................................................................................121
7.4.8 Handling SINUMERIK archives............................................................................................122

SINUMERIK 840D sl STEP 7 Toolbox V16


8 Getting Started, 12/2019, 6FC5397-1GP40-0BA1
Table of contents

7.4.9 Using user-defined data types (UDT)...................................................................................123


7.4.10 User-defined data types from the basic program .................................................................125
7.4.11 PLC machine data in DB20..................................................................................................127
7.4.12 Changing the operand priority (absolute/symbolic)..............................................................127
7.4.12.1 Effects of the symbolic addressing.......................................................................................127
7.4.12.2 Declaration of multi-instances ..............................................................................................128
7.4.12.3 Declaration of static local data in the block interface ...........................................................131
Index.........................................................................................................................................................133

SINUMERIK 840D sl STEP 7 Toolbox V16


Getting Started, 12/2019, 6FC5397-1GP40-0BA1 9
Table of contents

SINUMERIK 840D sl STEP 7 Toolbox V16


10 Getting Started, 12/2019, 6FC5397-1GP40-0BA1
Fundamental safety instructions 1
1.1 General safety instructions

WARNING
Electric shock and danger to life due to other energy sources
Touching live components can result in death or severe injury.
● Only work on electrical devices when you are qualified for this job.
● Always observe the country-specific safety rules.
Generally, the following six steps apply when establishing safety:
1. Prepare for disconnection. Notify all those who will be affected by the procedure.
2. Isolate the drive system from the power supply and take measures to prevent it being
switched back on again.
3. Wait until the discharge time specified on the warning labels has elapsed.
4. Check that there is no voltage between any of the power connections, and between any of
the power connections and the protective conductor connection.
5. Check whether the existing auxiliary supply circuits are de-energized.
6. Ensure that the motors cannot move.
7. Identify all other dangerous energy sources, e.g. compressed air, hydraulic systems, or
water. Switch the energy sources to a safe state.
8. Check that the correct drive system is completely locked.
After you have completed the work, restore the operational readiness in the inverse sequence.

WARNING
Electric shock due to connection to an unsuitable power supply
When equipment is connected to an unsuitable power supply, exposed components may
carry a hazardous voltage. Contact with hazardous voltage can result in severe injury or death.
● Only use power supplies that provide SELV (Safety Extra Low Voltage) or PELV-
(Protective Extra Low Voltage) output voltages for all connections and terminals of the
electronics modules.

SINUMERIK 840D sl STEP 7 Toolbox V16


Getting Started, 12/2019, 6FC5397-1GP40-0BA1 11
Fundamental safety instructions
1.1 General safety instructions

WARNING
Electric shock due to equipment damage
Improper handling may cause damage to equipment. For damaged devices, hazardous
voltages can be present at the enclosure or at exposed components; if touched, this can result
in death or severe injury.
● Ensure compliance with the limit values specified in the technical data during transport,
storage and operation.
● Do not use any damaged devices.

WARNING
Electric shock due to unconnected cable shields
Hazardous touch voltages can occur through capacitive cross-coupling due to unconnected
cable shields.
● As a minimum, connect cable shields and the cores of cables that are not used at one end
at the grounded housing potential.

WARNING
Electric shock if there is no ground connection
For missing or incorrectly implemented protective conductor connection for devices with
protection class I, high voltages can be present at open, exposed parts, which when touched,
can result in death or severe injury.
● Ground the device in compliance with the applicable regulations.

WARNING
Spread of fire from built-in devices
In the event of fire outbreak, the enclosures of built-in devices cannot prevent the escape of
fire and smoke. This can result in serious personal injury or property damage.
● Install built-in units in a suitable metal cabinet in such a way that personnel are protected
against fire and smoke, or take other appropriate measures to protect personnel.
● Ensure that smoke can only escape via controlled and monitored paths.

SINUMERIK 840D sl STEP 7 Toolbox V16


12 Getting Started, 12/2019, 6FC5397-1GP40-0BA1
Fundamental safety instructions
1.1 General safety instructions

WARNING
Unexpected movement of machines caused by radio devices or mobile phones
When radio devices or mobile phones with a transmission power > 1 W are used in the
immediate vicinity of components, they may cause the equipment to malfunction.
Malfunctions may impair the functional safety of machines and can therefore put people in
danger or lead to property damage.
● If you come closer than around 2 m to such components, switch off any radios or mobile
phones.
● Use the "SIEMENS Industry Online Support app" only on equipment that has already been
switched off.

WARNING
Fire due to inadequate ventilation clearances
Inadequate ventilation clearances can cause overheating of components with subsequent fire
and smoke. This can cause severe injury or even death. This can also result in increased
downtime and reduced service lives for devices/systems.
● Ensure compliance with the specified minimum clearance as ventilation clearance for the
respective component.

NOTICE
Overheating due to inadmissible mounting position
The device may overheat and therefore be damaged if mounted in an inadmissible position.
● Only operate the device in admissible mounting positions.

WARNING
Unexpected movement of machines caused by inactive safety functions
Inactive or non-adapted safety functions can trigger unexpected machine movements that
may result in serious injury or death.
● Observe the information in the appropriate product documentation before commissioning.
● Carry out a safety inspection for functions relevant to safety on the entire system, including
all safety-related components.
● Ensure that the safety functions used in your drives and automation tasks are adjusted and
activated through appropriate parameterizing.
● Perform a function test.
● Only put your plant into live operation once you have guaranteed that the functions relevant
to safety are running correctly.

SINUMERIK 840D sl STEP 7 Toolbox V16


Getting Started, 12/2019, 6FC5397-1GP40-0BA1 13
Fundamental safety instructions
1.1 General safety instructions

Note
Important safety notices for Safety Integrated functions
If you want to use Safety Integrated functions, you must observe the safety notices in the Safety
Integrated manuals.

WARNING
Malfunctions of the machine as a result of incorrect or changed parameter settings
As a result of incorrect or changed parameterization, machines can malfunction, which in turn
can lead to injuries or death.
● Protect the parameterization against unauthorized access.
● Handle possible malfunctions by taking suitable measures, e.g. emergency stop or
emergency off.

SINUMERIK 840D sl STEP 7 Toolbox V16


14 Getting Started, 12/2019, 6FC5397-1GP40-0BA1
Fundamental safety instructions
1.2 Equipment damage due to electric fields or electrostatic discharge

1.2 Equipment damage due to electric fields or electrostatic discharge


Electrostatic sensitive devices (ESD) are individual components, integrated circuits, modules
or devices that may be damaged by either electric fields or electrostatic discharge.

NOTICE
Equipment damage due to electric fields or electrostatic discharge
Electric fields or electrostatic discharge can cause malfunctions through damaged individual
components, integrated circuits, modules or devices.
● Only pack, store, transport and send electronic components, modules or devices in their
original packaging or in other suitable materials, e.g conductive foam rubber of aluminum
foil.
● Only touch components, modules and devices when you are grounded by one of the
following methods:
– Wearing an ESD wrist strap
– Wearing ESD shoes or ESD grounding straps in ESD areas with conductive flooring
● Only place electronic components, modules or devices on conductive surfaces (table with
ESD surface, conductive ESD foam, ESD packaging, ESD transport container).

SINUMERIK 840D sl STEP 7 Toolbox V16


Getting Started, 12/2019, 6FC5397-1GP40-0BA1 15
Fundamental safety instructions
1.3 Warranty and liability for application examples

1.3 Warranty and liability for application examples


Application examples are not binding and do not claim to be complete regarding configuration,
equipment or any eventuality which may arise. Application examples do not represent specific
customer solutions, but are only intended to provide support for typical tasks.
As the user you yourself are responsible for ensuring that the products described are operated
correctly. Application examples do not relieve you of your responsibility for safe handling when
using, installing, operating and maintaining the equipment.

SINUMERIK 840D sl STEP 7 Toolbox V16


16 Getting Started, 12/2019, 6FC5397-1GP40-0BA1
Fundamental safety instructions
1.4 Industrial security

1.4 Industrial security

Note
Industrial security
Siemens provides products and solutions with industrial security functions that support the
secure operation of plants, systems, machines and networks.
In order to protect plants, systems, machines and networks against cyber threats, it is
necessary to implement – and continuously maintain – a holistic, state-of-the-art industrial
security concept. Products and solutions from Siemens constitute one element of such a
concept.
Customers are responsible for preventing unauthorized access to their plants, systems,
machines and networks. Such systems, machines and components should only be connected
to an enterprise network or the Internet if and to the extent such a connection is necessary and
only when appropriate security measures (e.g. using firewalls and/or network segmentation)
are in place.
For additional information on industrial security measures that can be implemented, please
visit:
Industrial security (https://www.siemens.com/industrialsecurity)
Siemens’ products and solutions undergo continuous development to make them more secure.
Siemens strongly recommends that product updates are applied as soon as they become
available, and that only the latest product versions are used. Use of product versions that are
no longer supported, and failure to apply the latest updates may increase customer’s exposure
to cyber threats.
To stay informed about product updates, subscribe to the Siemens Industrial Security RSS
Feed at:
Industrial security (https://www.siemens.com/industrialsecurity)

Further information is provided on the Internet:


Industrial Security Configuration Manual (https://support.industry.siemens.com/cs/ww/en/
view/108862708)

SINUMERIK 840D sl STEP 7 Toolbox V16


Getting Started, 12/2019, 6FC5397-1GP40-0BA1 17
Fundamental safety instructions
1.4 Industrial security

WARNING
Unsafe operating states resulting from software manipulation
Software manipulations, e.g. viruses, Trojans, or worms, can cause unsafe operating states
in your system that may lead to death, serious injury, and property damage.
● Keep the software up to date.
● Incorporate the automation and drive components into a holistic, state-of-the-art industrial
security concept for the installation or machine.
● Make sure that you include all installed products into the holistic industrial security concept.
● Protect files stored on exchangeable storage media from malicious software by with
suitable protection measures, e.g. virus scanners.
● On completion of commissioning, check all security-related settings.
● Protect the drive against unauthorized changes by activating the "Know-how protection"
converter function.

SINUMERIK 840D sl STEP 7 Toolbox V16


18 Getting Started, 12/2019, 6FC5397-1GP40-0BA1
Fundamental safety instructions
1.5 Residual risks of power drive systems

1.5 Residual risks of power drive systems


When assessing the machine- or system-related risk in accordance with the respective local
regulations (e.g., EC Machinery Directive), the machine manufacturer or system installer must
take into account the following residual risks emanating from the control and drive components
of a drive system:
1. Unintentional movements of driven machine or system components during commissioning,
operation, maintenance, and repairs caused by, for example,
– Hardware and/or software errors in the sensors, control system, actuators, and cables
and connections
– Response times of the control system and of the drive
– Operation and/or environmental conditions outside the specification
– Condensation/conductive contamination
– Parameterization, programming, cabling, and installation errors
– Use of wireless devices/mobile phones in the immediate vicinity of electronic
components
– External influences/damage
– X-ray, ionizing radiation and cosmic radiation
2. Unusually high temperatures, including open flames, as well as emissions of light, noise,
particles, gases, etc., can occur inside and outside the components under fault conditions
caused by, for example:
– Component failure
– Software errors
– Operation and/or environmental conditions outside the specification
– External influences/damage
3. Hazardous shock voltages caused by, for example:
– Component failure
– Influence during electrostatic charging
– Induction of voltages in moving motors
– Operation and/or environmental conditions outside the specification
– Condensation/conductive contamination
– External influences/damage
4. Electrical, magnetic and electromagnetic fields generated in operation that can pose a risk
to people with a pacemaker, implants or metal replacement joints, etc., if they are too close
5. Release of environmental pollutants or emissions as a result of improper operation of the
system and/or failure to dispose of components safely and correctly
6. Influence of network-connected communication systems, e.g. ripple-control transmitters or
data communication via the network
For more information about the residual risks of the drive system components, see the relevant
sections in the technical user documentation.

SINUMERIK 840D sl STEP 7 Toolbox V16


Getting Started, 12/2019, 6FC5397-1GP40-0BA1 19
Fundamental safety instructions
1.5 Residual risks of power drive systems

SINUMERIK 840D sl STEP 7 Toolbox V16


20 Getting Started, 12/2019, 6FC5397-1GP40-0BA1
Introduction 2
2.1 Classification in the documentation landscape
This Getting Started publication is aimed at those who are new to the field of SINUMERIK PLC
programming and configuration, as well as those who are migrating and have previously
worked with the SINUMERIK add-on for STEP 7 V5.x.
For this purpose, the SINUMERIK-specific configuration of the PLC is performed in the TIA
Portal on the basis of a simple example. Also in this Getting Started, you will find tips for
beginners, including a comparison of functions and descriptions of project migration.
If you are new to this field of SINUMERIK NC and drive commissioning (using SINUMERIK
Operate), we recommend the following additional documentation:
● Commissioning Manual, CNC Commissioning: NC, PLC, Drive
This manual describes the basics of the complete commissioning, in other words all those
commissioning steps that you must perform with SINUMERIK Operate outside the TIA
Portal.
To extend your knowledge and for reference, you can use the following documentation:
● SINUMERIK STEP 7 Toolbox V15.1 Update 1 Configuration Manual
This manual describes all functionalities of the SINUMERIK STEP 7 Toolbox, including for
example, PROFINET IO IRT, Safety or NC variables. It does not, however, contain any
configuration example or any information on migration or changing over.
● Online help of the TIA Portal
The online help of the TIA Portal contains the documentation of all installed TIA Portal
software, including the SINUMERIK STEP 7 Toolbox.
● Function Manual, SINUMERIK 840D sl Basic Functions
This documentation contains the detailed description of the SINUMERIK PLC basic
program.

Note
SINUMERIK documentation in the SIEMENS Industry Online Support (SIOS)
Current documentation on SINUMERIK can be found in the SIOS:
SINUMERIK CNC automation system (http://support.automation.siemens.com/WW/view/en/
10805517/133300)

SINUMERIK 840D sl STEP 7 Toolbox V16


Getting Started, 12/2019, 6FC5397-1GP40-0BA1 21
Introduction
2.2 Organization of the Getting Started

2.2 Organization of the Getting Started

Structure of Getting Started


Getting Started is subdivided into the following sections:
● Getting started
● Configuring the hardware
● Creating a PLC program
● Optional: Tips for those changing over from another system and information on project
migration
A detailed list of the individual configuration steps can be found in the following table. You can
use the links to navigate directly to the required task.

Step Task Implementation


1. Installing the SINUMERIK toolbox ● Installing the SINUMERIK toolbox (Page 33)
and creating a project (Page 33)
● Starting the TIA Portal (Page 34)
● Creating a sample project (Page 35)
2 Inserting and configuring SINU‐ ● Insert NCU (Page 38)
MERIK hardware (Page 37) ● Insert NX module (Page 40)
● Inserting an ADI4 module (Page 45)
● Inserting SINUMERIK I/O via the general station
description (GSD) file (Page 48)
● Configuring network interfaces (Page 56)
● Configuration of telegrams and IO addresses
(Page 61)
● Setting up the communication (Page 62)
● Loading and closing the hardware configuration in
the PLC (Page 65)
3 Programming SINUMERIK PLC ● Overview of the PLC program (Page 71)
(Page 71) ● Adding the PLC basic program (Page 72)
● Edit blocks (Page 83)
● Configuring Ethernet machine control panels in
the PLC program (Page 84)
● Loading the PLC program to the PLC (Page 87)
● Creating PLC symbols for SINUMERIK Operate
● Completing the first commissioning of the PLC
(Page 95)

SINUMERIK 840D sl STEP 7 Toolbox V16


22 Getting Started, 12/2019, 6FC5397-1GP40-0BA1
Introduction
2.2 Organization of the Getting Started

Also in this documentation, you will find tips for those switching from SINUMERIK Toolbox for
STEP 7 V5.x, including a comparison of functions and descriptions of project migration.

Step Task Implementation


Optional Project migration (Page 97) ● Comparison of functionality
● Migrating projects
● Troubleshooting

SINUMERIK 840D sl STEP 7 Toolbox V16


Getting Started, 12/2019, 6FC5397-1GP40-0BA1 23
Introduction
2.3 Views in the TIA Portal

2.3 Views in the TIA Portal

Introduction
Two different views available for a differentiated introduction to the TIA Portal: The portal view
and the project view.
Below you will find an explanation of the portal view and project view functions.

Note
Please refer to the Online Help of the TIA Portal for further information on this topic.

The portal view


The portal view provides an overview of all configuration steps and enables a task-based start
to your automation solution.
The individual portals ("Start", "Devices & Networks", "PLC programming", "Visualization",
"Online & Diagnostics", etc.) show all required steps to solve an automation task clearly
structured. Here, you can quickly decide what you want to do and start the tool required for it.
The following figure shows the layout of the portal view:

SINUMERIK 840D sl STEP 7 Toolbox V16


24 Getting Started, 12/2019, 6FC5397-1GP40-0BA1
Introduction
2.3 Views in the TIA Portal

① Portals for the various tasks:


The portals provide the basic functions for the individual task areas. The portals that are
provided in the portal view depend on the products that have been installed.
② Actions for the selected portal:
Here, you will find the actions available to you in the portal you have selected. You can open
context-sensitive help in every portal.
③ Selection window for the selected action:
The selection window is available in all portals. The content of the window adapts to your
current selection.
④ Select user interface language.
⑤ Change to project view.

The project view


The project view is a hierarchically structured view of all components in a project. The project
view enables quick and intuitive access to all objects in the project, the relevant work areas and
editors. Using the available editors, you can create and edit all the objects required in the
project.
The various work windows show you all the corresponding data for the selected objects.
The following figure shows the layout of the project view:

SINUMERIK 840D sl STEP 7 Toolbox V16


Getting Started, 12/2019, 6FC5397-1GP40-0BA1 25
Introduction
2.3 Views in the TIA Portal

① Menu bar:
The menu bar contains all the commands that you require for your work.
② Project tree:
The project tree provides access to all components and project data.
③ Toolbar:
The toolbar provides you with buttons for commands you will use frequently. This setup gives
you faster access to these commands compared to the menus in the menu bar.
④ Work area:
The objects that you can open for editing purposes are displayed in the work area.
⑤ Task cards:
Depending on the object being edited or that has been selected, task cards are available. You
can find the task cards in a bar at the right-hand edge of the screen. You can collapse and
reopen them at any time.

SINUMERIK 840D sl STEP 7 Toolbox V16


26 Getting Started, 12/2019, 6FC5397-1GP40-0BA1
Introduction
2.3 Views in the TIA Portal

⑥ Inspector window:
The inspector window displays additional information on a selected object or on executed
actions.
⑦ Portal view:
Changing to the portal view
⑧ Detailed view:
The detailed view shows specific content of a selected object. This might include text lists or
tags.

Note
Adjusting the working area in the TIA Portal
To increase the visible surface of the work area, you can temporarily hide other areas of the TIA
Portal, e.g. the individual task cards, the project tree or the inspector window.
To do this, click "Minimize" in the title bar of the associated area or disable the appropriate
option checkbox in the "View" menu.
You can use the same commands to redisplay the minimized areas at any time.

SINUMERIK 840D sl STEP 7 Toolbox V16


Getting Started, 12/2019, 6FC5397-1GP40-0BA1 27
Introduction
2.4 Structure of SINUMERIK NCU

2.4 Structure of SINUMERIK NCU


The structure of the NCU will be explained as introduction to obtain a better understanding.

Subcomponents of the NCU


A SINUMERIK NCU comprises the following integrated subcomponents:
● PLC
● NCK
● CP
● HMI (SINUMERIK Operate)
● SINAMICS Integrated (DRIVE)
These subcomponents are always a fixed component of an NCU and can only be handled in
combination with the NCU. Subcomponents cannot be individually pasted, copied or moved in
the project or across projects (e.g. in libraries).

Note
Copying and pasting the NCU or the DP master system
You can copy and insert NCUs within a project. For this purpose, switch to the network view or
to the topology view of the project view.
The DP master system (PROFIBUS Integrated) cannot be individually copied, pasted or
deleted. It is considered as an integral part of the NCU.
If you copy an NCU, all integrated subcomponents are also copied, e.g. SINAMICS Integrated
or PROFIBUS Integrated.

SINUMERIK 840D sl STEP 7 Toolbox V16


28 Getting Started, 12/2019, 6FC5397-1GP40-0BA1
Introduction
2.4 Structure of SINUMERIK NCU

Additional connectable components


Optionally, the following components can be connected to the NCU:
● NX10.3 and NX15.3 modules
These components are not inserted automatically when inserting an NCU, but must be
integrated manually (Page 40).

SINUMERIK 840D sl STEP 7 Toolbox V16


Getting Started, 12/2019, 6FC5397-1GP40-0BA1 29
Introduction
2.4 Structure of SINUMERIK NCU

SINUMERIK 840D sl STEP 7 Toolbox V16


30 Getting Started, 12/2019, 6FC5397-1GP40-0BA1
Product features 3
SINUMERIK 840D sl STEP 7 Toolbox V16 is an option package for SIMATIC STEP 7
Professional V16 (TIA Portal) with additional setup.

Functional scope
SINUMERIK 840D sl STEP 7 Toolbox V16 contains the following tools and functions:
● Supplementation of the hardware catalog with the following modules of the SINUMERIK
840D sl (as of firmware V4.5 SP2 or higher):
– NCU 710.3
– NCU 720.3
– NCU 730.3
– NX10.3
– NX15.3
● Supplement of the hardware catalog to include the ADI4 module
● SINUMERIK PLC basic program
The SINUMERIK 840D sl STEP 7 Toolbox automatically installs the PLC basic program as
the "SINUMERIK 840D sl PLC Basic Program" system library. Matching the firmware
versions of the modules, there are different versions of the PLC basic program:
– SINUMERIK 840D sl PLC basic program V4.5.x.x
– SINUMERIK 840D sl PLC basic program V4.7.x.x
– SINUMERIK 840D sl PLC basic program V4.8.x.x
– SINUMERIK 840D sl PLC Basic Program V4.9.1.x
– SINUMERIK 840D sl PLC Basic Program V4.9.2.x
– SINUMERIK 840D sl PLC Basic Program V4.9.3.x
● Export of PLC symbols for SINUMERIK Operate
● Importing SINUMERIK user alarm texts
● Creating SINUMERIK PLC archives
● Support of PROFINET IO IRT for NCK
● Support of SINUMERIK Safety Integrated and Safety Integrated plus
● NC VAR selector (external tool)

SINUMERIK 840D sl STEP 7 Toolbox V16


Getting Started, 12/2019, 6FC5397-1GP40-0BA1 31
Product features

SINUMERIK 840D sl STEP 7 Toolbox V16


32 Getting Started, 12/2019, 6FC5397-1GP40-0BA1
Getting Started 4
4.1 Installing the SINUMERIK toolbox

Software requirements
SINUMERIK 840D sl STEP 7 Toolbox V16 is a TIA Portal options package which requires
installation of the following products:
● SIMATIC STEP 7 Professional V16

Hardware requirements and other system requirements


All of the hardware and system requirements of SIMATIC STEP 7 Professional apply.
You can find the system requirements of STEP 7 Professional in the following documentation:
● STEP 7 Professional System Manual (https://support.industry.siemens.com/cs/products?
search=STEP%207%20Professional&dtp=Manual)
● TIA Portal online help, search term "System requirements STEP 7 Professional"

Installation
Before installing, exit all of the applications (e.g. TIA Portal) and execute the "Start.exe" setup
file in the master directory of the product DVD.

Uninstallation
Via the installation wizard of the TIA Portal, you can uninstall the software, which is entered in
the Windows dialog "Uninstall or change program":
"Control Panel > Programs > Uninstall Program > Siemens Totally Integrated Automation
Portal"

Note
The NC VAR selector must be uninstalled separately.

SINUMERIK 840D sl STEP 7 Toolbox V16


Getting Started, 12/2019, 6FC5397-1GP40-0BA1 33
Getting Started
4.2 Starting the TIA Portal

4.2 Starting the TIA Portal

Procedure
1. Start the TIA Portal by double-clicking the link to the Windows desktop or from the Start
menu under "All Programs > Siemens Automation > TIA Portal V16".

Result
The TIA Portal opens. The functions of the SINUMERIK 840D sl STEP 7 are now available in
the TIA Portal.

SINUMERIK 840D sl STEP 7 Toolbox V16


34 Getting Started, 12/2019, 6FC5397-1GP40-0BA1
Getting Started
4.3 Creating a sample project

4.3 Creating a sample project

Introduction
You create a new project in the following. Within a project, all of the automation tasks required,
for example the hardware configuration and the PLC programming, are performed.

Precondition
● The TIA Portal has been started (Page 34).

Procedure
1. Click "Create new project" in the portal view.

2. Assign a project name and select the storage location of the project (path).
3. Click "Create".

Result
A new, empty project has been created.

SINUMERIK 840D sl STEP 7 Toolbox V16


Getting Started, 12/2019, 6FC5397-1GP40-0BA1 35
Getting Started
4.3 Creating a sample project

SINUMERIK 840D sl STEP 7 Toolbox V16


36 Getting Started, 12/2019, 6FC5397-1GP40-0BA1
Configuring the hardware 5
5.1 Configuration example

Introduction
The TIA Portal with the SINUMERIK Toolbox option package offers many options for
configuring the hardware. To better understand the individual functions, this Getting Started is
based on a specific configuration example. The following is an overview of this configuration
example with all components and interfaces.

Configuration overview
As an example, the following configuration of a SINUMERIK 840D sl is to be configured using
the TIA Portal:

NX15.3

DRIVE-CLiQ connection to
the drives
6,180(5,.33 6&$/$1&(VZLWFK ;
'31SHULSKHUDO
,2 PRGXOH SINUMERIK
NCU 730.3 PN
;
PROFINET I/O
;
PROFIBUS I/O
;

; Interface
module
ADI4

3*3&
6,180(5,.
0&331
SINUMERIK operator panel front with TCU

In this sample configuration, drives are not connected to the control and therefore do not need
to be configured. If you have connected drives to your control system, you must configure them
outside of the TIA Portal. You can find a detailed explanation in the ""Commissioning CNC:
NCK, PLC, drive".

SINUMERIK 840D sl STEP 7 Toolbox V16


Getting Started, 12/2019, 6FC5397-1GP40-0BA1 37
Configuring the hardware
5.2 Insert NCU

5.2 Insert NCU

Introduction
In the following, you insert the "NCU 730.3 PN" into the sample project. The NCU module
(Numeric Control Unit) is the CPU of the SINUMERIK 840D sl. It takes over all the CNC, PLC
and communication tasks.

Requirement
● A project is open in the TIA Portal.

Procedure
To insert a SINUMERIK NCU in the project view, proceed as follows:
1. Click "Add new device" in the project tree.
2. Click the "Controllers" button.

SINUMERIK 840D sl STEP 7 Toolbox V16


38 Getting Started, 12/2019, 6FC5397-1GP40-0BA1
Configuring the hardware
5.2 Insert NCU

3. In the folder structure under "Controllers", expand the corresponding SINUMERIK device
family (e.g. SINUMERIK 840D sl) and required NCU and select these.

Figure 5-1 Selected NCU using the SINUMERIK 840D sl NCU 730.3 PN V4.8 as an example

4. Select the firmware version that matches the envisaged firmware version of the real NCU in
the "Version" drop-down list.
5. Confirm your selection with "OK".

Result
The SINUMERIK NCU is created as new device.

SINUMERIK 840D sl STEP 7 Toolbox V16


Getting Started, 12/2019, 6FC5397-1GP40-0BA1 39
Configuring the hardware
5.3 Insert NX module

5.3 Insert NX module

Introduction
In the next step, you insert the NX module into the configuration. You can use this module to
increase the number of controlled axes connected to an NX module. Each NX10.3 can control
up to 3 additional axes and each NX15.3 can control up to 6 additional axes.

Procedure
In order to insert an NX module into the project via the hardware catalog, proceed as follows:
1. In the network view, navigate in the hardware catalog to the folder "Controller > SINUMERIK
840D sl > NX" and select, for example, NX15.3 .
2. You can select the firmware version of the NX module at "Information" in the hardware
catalog. This must match the firmware version of the NCU. Firmware versions of the
configured hardware and the real hardware must match.

SINUMERIK 840D sl STEP 7 Toolbox V16


40 Getting Started, 12/2019, 6FC5397-1GP40-0BA1
Configuring the hardware
5.3 Insert NX module

3. Use drag-and-drop to move the NX module from the hardware catalog to the network view.

 


SINUMERIK 840D sl STEP 7 Toolbox V16


Getting Started, 12/2019, 6FC5397-1GP40-0BA1 41
Configuring the hardware
5.3 Insert NX module

4. To connect the NX module with a master system, click "Not assigned" and select the master
system.
Note
Connection to DP Integrated
Note that the NX modules can only be connected to the DP Integrated of a SINUMERIK
NCU, and not to external PROFIBUS interfaces!
The NX is connected with the NCU and the "Wiring between control and NX" dialog opens.

5. In the "Wiring between control and NX" dialog, select the DP address of the NX in the master
system that matches your real wiring. The DP addresses of the NX modules are
permanently assigned to the DRIVE-CLiQ sockets of the NCU.

DP address of the NX in the master system DRIVE-CLiQ socket on the NCU


10 X100
11 X101
12 X102
13 X103
14 X104
15 X105

SINUMERIK 840D sl STEP 7 Toolbox V16


42 Getting Started, 12/2019, 6FC5397-1GP40-0BA1
Configuring the hardware
5.3 Insert NX module

Note
This setting cannot be undone
Please note that once set, the DP address of an NX cannot be subsequently changed. The
NX modules must be connected to the DRIVE-CLiQ socket of the NCU in the real wiring that
corresponds to the permanently assigned DP address.
If you have incorrectly set the DP address of an NX, delete this NX from the project and add
a new one.
The DP address of the NX module is specified in accordance with your setting and the
appropriate I/O addresses of the telegrams are set automatically.
Note
Default I/O addresses of the telegrams
Depending on the set DP address, the appropriate I/O addresses of the telegrams are set
automatically.
Change this setting only when the I/O addresses of your telegrams differ from the default
setting!
You can also find information on the wiring between NCU and NX in the properties of the DP
Integrated interface on the NCU and NX under "PROFIBUS address".

SINUMERIK 840D sl STEP 7 Toolbox V16


Getting Started, 12/2019, 6FC5397-1GP40-0BA1 43
Configuring the hardware
5.3 Insert NX module

Result
The NX module has been inserted into the project and connected to an NCU.

Note
Handling the NX
● If NX modules were connected with the NCU and the NCU is subsequently deleted, the NX
modules are kept in the project as unconnected slave modules. They can be subsequently
assigned to another NCU. The parameter settings of the NX modules are retained.
● If the DP address of the NX is specified, then the I/O addresses matching the default setting
on the NCK side are entered.

SINUMERIK 840D sl STEP 7 Toolbox V16


44 Getting Started, 12/2019, 6FC5397-1GP40-0BA1
Configuring the hardware
5.4 Inserting an ADI4 module

5.4 Inserting an ADI4 module

Introduction
In the next step, insert the ADI4 module into the configuration and connect it with the MPI/DP
interface (X126).
An ADI4 module (Analog Drive Interface for 4 axes) is an interface module suitable for
operating up to four drives with an analog setpoint interface and TTL/SSI encoders on an
equidistant PROFIBUS DP.

SINUMERIK 840D sl STEP 7 Toolbox V16


Getting Started, 12/2019, 6FC5397-1GP40-0BA1 45
Configuring the hardware
5.4 Inserting an ADI4 module

Procedure
In order to insert an ADI4 module into the project via the hardware catalog, proceed as
follows:
1. In the hardware catalog, navigate to the folder "Distributed I/O > Drive Interfaces > ADI4"
and select the ADI4 module.
2. Use drag-and-drop to move the ADI4 module from the hardware catalog and place it in the
network view.

3. To connect the module to the master system, click "Not assigned" and select the DP
interface.
4. Click the "PROFIBUS_1" bus system and at "General > Network settings" in the "Properties"
tab in the inspector window, change the "Transmission rate" entry from 1.5 Mbit/s to 12 Mbit/
s. The ADI4 module can only be operated with 12 Mbit/s.

SINUMERIK 840D sl STEP 7 Toolbox V16


46 Getting Started, 12/2019, 6FC5397-1GP40-0BA1
Configuring the hardware
5.4 Inserting an ADI4 module

Reference
You can find additional information on the precise parameter assignment of the ADI4 module
in the "ADI4 - analog drive interface for four axes" manual.

Result
The ADI4 module has been created as new device and connected to the NCU.

SINUMERIK 840D sl STEP 7 Toolbox V16


Getting Started, 12/2019, 6FC5397-1GP40-0BA1 47
Configuring the hardware
5.5 Inserting SINUMERIK I/O via the general station description (GSD) file

5.5 Inserting SINUMERIK I/O via the general station description (GSD) file

Introduction
If you want to configure a SINUMERIK I/O that is not available in the hardware catalog, you
must first install the general station description file provided by the manufacturer. SINUMERIK
I/O installed using general station description files are displayed in the hardware catalog, and
can then be selected and configured.

PROFIBUS/PROFINET I/O differences


The general station description file describes all the properties of a PROFIBUS DP slave or a
PROFINET IO device.
● PROFIBUS DP slaves are described in GSD files
● PROFINET IO devices are described in GSDML files
The installation procedure does not differ.

Available SINUMERIK I/O


You can integrate the following SINUMERIK I/O via a GSD/GSDML file into the hardware
catalog at a later point in time:
● SINUMERIK PP 72/48D PN peripheral (I/O) module
● SINUMERIK machine control panel MCP
● SINUMERIK machine pushbutton panel MPP
● SINUMERIK handwheel connection module

Getting Started configuration example


In our configuration example, the following PROFINET I/O should be included using a GSDML
file:
● SINUMERIK MCP 310 PN machine control panel
● SINUMERIK PP 72/48D PN peripheral (I/O) module

SINUMERIK 840D sl STEP 7 Toolbox V16


48 Getting Started, 12/2019, 6FC5397-1GP40-0BA1
Configuring the hardware
5.5 Inserting SINUMERIK I/O via the general station description (GSD) file

5.5.1 Installing general station description files for SINUMERIK I/O

Requirement
The current version of the general station description (GSD/GSDML) files to be installed is
stored on your PG/PC.

Note
General station description files on the Service&Support pages
You can find the current versions of the general station description files in the Siemens Industry
Online Support:
SINUMERIK I/O: GSD/GSDML files (http://support.automation.siemens.com/WW/view/en/
62332440)

Procedure
To install SINUMERIK I/O via general station description files, proceed as follows:
1. In the "Options" menu, select the command "Manage general station description files
(GSD)".
2. In the "Manage general station description files" dialog, select the folder that contains the
GSD/GSDML files.
The device description files saved in the source path are listed.

3. Select the checkboxes of the files that you want to install.


4. Confirm your entry with "Install".

SINUMERIK 840D sl STEP 7 Toolbox V16


Getting Started, 12/2019, 6FC5397-1GP40-0BA1 49
Configuring the hardware
5.5 Inserting SINUMERIK I/O via the general station description (GSD) file

Result
The general station description files are installed, and then the SINUMERIK I/O in the hardware
catalog displayed in the appropriate folders:
● SINUMERIK I/O for PROFINET IO: "Further field devices > PROFINET IO > I/O > SIEMENS
AG > SINUMERIK"
● SINUMERIK I/O for PROFIBUS DP: "Further field devices > PROFIBUS DP > NC/RC >
SIEMENS AG > MOTION CONTROL"

Figure 5-2 Installed SINUMERIK I/O in the hardware catalog

SINUMERIK 840D sl STEP 7 Toolbox V16


50 Getting Started, 12/2019, 6FC5397-1GP40-0BA1
Configuring the hardware
5.5 Inserting SINUMERIK I/O via the general station description (GSD) file

5.5.2 Inserting the SINUMERIK I/O module PP72/48

Requirement
● The respective PROFIBUS GSD file or PROFINET GSDML file is installed.
See: Installing general station description files for SINUMERIK I/O (Page 49)
● The network view is active.

SINUMERIK 840D sl STEP 7 Toolbox V16


Getting Started, 12/2019, 6FC5397-1GP40-0BA1 51
Configuring the hardware
5.5 Inserting SINUMERIK I/O via the general station description (GSD) file

Procedure
Proceed as follows to insert a PP72/48 I/O module:
1. In the hardware catalog, navigate to the respective device:
– PP72/48 (PROFIBUS): "Further field devices > PROFIBUS DP > NC/RC > SIEMENS
AG > MOTION CONTROL"
– PP72/48 (PROFINET): "Further field devices > PROFINET IO > I/O > SIEMENS AG >
SINUMERIK > PP72/48"
2. Use drag-and-drop to move the PP72/48 from the hardware catalog to the network view.

3. Interconnect the inserted SINUMERIK I/O with the NCU.


See TIA Portal online help, search term "Interconnect devices in the network view"

SINUMERIK 840D sl STEP 7 Toolbox V16


52 Getting Started, 12/2019, 6FC5397-1GP40-0BA1
Configuring the hardware
5.5 Inserting SINUMERIK I/O via the general station description (GSD) file

Result
The SINUMERIK I/O modules were created as new devices and connected to the NCU.

Additional information
You can find general information about the device in the SINUMERIK I/O module PP72/48D
2/2A PN manual

5.5.3 Inserting SINUMERIK MCP/MPP

Requirement
● The respective PROFIBUS GSD file or PROFINET GSDML file is installed.
See: Installing general station description files for SINUMERIK I/O (Page 49)
● The network view is active.

SINUMERIK 840D sl STEP 7 Toolbox V16


Getting Started, 12/2019, 6FC5397-1GP40-0BA1 53
Configuring the hardware
5.5 Inserting SINUMERIK I/O via the general station description (GSD) file

Procedure
Proceed as follows to insert a SINUMERIK MCP/MPP:
1. In the hardware catalog, navigate to the respective device:
– MCP/MPP (PROFIBUS): "Further field devices > PROFIBUS DP > NC/RC > SIEMENS
AG > MOTION CONTROL"
– MCP/MPP (PROFINET): "Further field devices > PROFINET IO > I/O > SIEMENS AG >
SINUMERIK"
2. Use drag-and-drop to move the corresponding MCP/MPP from the hardware catalog to the
network view.
3. Interconnect the inserted SINUMERIK I/O with the NCU.
See TIA Portal online help, search term "Interconnect devices in the network view"

Result
The SINUMERIK MCP/MPP has been created as new device and connected to the NCU.

SINUMERIK 840D sl STEP 7 Toolbox V16


54 Getting Started, 12/2019, 6FC5397-1GP40-0BA1
Configuring the hardware
5.5 Inserting SINUMERIK I/O via the general station description (GSD) file

Additional information
General information on the device can be found in the respective manual.

SINUMERIK 840D sl STEP 7 Toolbox V16


Getting Started, 12/2019, 6FC5397-1GP40-0BA1 55
Configuring the hardware
5.6 Configuring network interfaces

5.6 Configuring network interfaces

5.6.1 Introduction
You must now configure or check the network interfaces. In our example configuration, they are
the following interfaces:

Interface Communications Connected component


X127 Ethernet PG/PC
X120 Ethernet Machine Control Panel
X150 PROFINET IO I/O module
X126 PROFIBUS DP ADI4 module
X105 DRIVE-CLiQ NX module

5.6.2 Configuring an Ethernet Interface


For the initial commissioning with a PG/PC, it is necessary to configure an Ethernet interface.
In our example, this involves the interface to the X127 socket.

SINUMERIK 840D sl STEP 7 Toolbox V16


56 Getting Started, 12/2019, 6FC5397-1GP40-0BA1
Configuring the hardware
5.6 Configuring network interfaces

Procedure
In order to set the Ethernet interface, proceed as follows:
1. In the network view, click the CP in the basic rack of the NCU.
2. Under the "Properties" tab in the inspector window, select the "PN/IE interface > Ethernet
addresses" entry.

3. Set the IP address matching your real configuration. If the PG/PC is connected to X127, the
following IP address applies:
Hardware factory setting on the NCU for socket X127
IP address: 192.168.215.1
Subnet mask: 255.255.255.0

5.6.3 Configuring PROFINET


In our configuration example, the SINUMERIK I/O module PP 72/48D PN is connected to the
NCU via PROFINET. You configure the properties of the PROFINET interface for socket X150
as follows:

SINUMERIK 840D sl STEP 7 Toolbox V16


Getting Started, 12/2019, 6FC5397-1GP40-0BA1 57
Configuring the hardware
5.6 Configuring network interfaces

Procedure
In order to set the PROFINET interface, proceed as follows:
1. In the network view, click the PLC in the basic rack of the NCU.
2. Under the "Properties" tab in the inspector window, select the "PROFINET interface >
Ethernet addresses" entry.

3. Check under "IP protocol" whether the correct IP address is set ("192.168.0.1" in the
example).

5.6.4 Configuring PROFIBUS DP


In our example, the ADI4 module is connected to the NCU via PROFIBUS DP. You configure
the properties of the PROFIBUS DP interface for socket X126 as follows:

Procedure

SINUMERIK 840D sl STEP 7 Toolbox V16


58 Getting Started, 12/2019, 6FC5397-1GP40-0BA1
Configuring the hardware
5.6 Configuring network interfaces

Configuring the PROFIBUS DP address on the PLC


1. In the network view, click the PLC in the basic rack of the NCU.
2. In the "Properties" tab, in the inspector window, select the entry "DP Interface > PROFIBUS
address".
The settings of the PROFIBUS address are displayed.

3. In the Parameters area, set the DP address of the interface on the PLC under "Address".
This is transferred from the configuration to the PLC during the load action.

Configuring the PROFIBUS DP address for the ADI4 module


1. In the network view, click the "DP" interface of the ADI4.
2. In the inspector window "Properties", select the entry "PROFIBUS address".
3. Under "Address" set the DP address that matches the hardware. The configured address
must match the hardware address. It is not accepted automatically.
Information about setting the DP address on the hardware is contained in the "ADI4 - Analog
drive interface for 4 axes" Device Manual.

Checking the transmission speed of the ADI4


Although you can view the "Transmission speed" parameter in the DP interface properties, you
must select the bus system to change it:
1. Click the bus system.
2. In the "Properties" inspector window, check under "Network settings" the "Transmission
speed" entry. The ADI4 module can be operated only with the transmission speed 12 Mbit/
s.

5.6.5 Configure Integrated PROFIBUS (DP Integrated)


The PROFIBUS addresses at the DP Integrated were already defined when wiring the NX, and
cannot be subsequently changed (see Insert NX module (Page 40)).

SINUMERIK 840D sl STEP 7 Toolbox V16


Getting Started, 12/2019, 6FC5397-1GP40-0BA1 59
Configuring the hardware
5.6 Configuring network interfaces

Procedure
To check the PROFIBUS addresses, proceed as follows:
1. In the network view, click the DP Integrated interface of the PLC or select the interface in the
device overview.
2. In the "Properties" tab, in the inspector window, select the entry "PROFIBUS address".

Result
The DRIVE-CLiQ sockets of the real hardware are displayed to which the NX modules must be
connected.

Note
Cycle clock settings
You can only make the cycle clock settings on the PROFIBUS Integrated subnet and not
directly on the interface: For the selected subnet, you find the cycle clock settings under
"Equidistance" in the inspector window.
Observe the rules for setting the clock cycle at the field buses (see Commissioning Manual,
"Commissioning CNC: NCK, PLC, drive").

SINUMERIK 840D sl STEP 7 Toolbox V16


60 Getting Started, 12/2019, 6FC5397-1GP40-0BA1
Configuring the hardware
5.7 Configuration of telegrams and I/O addresses

5.7 Configuration of telegrams and I/O addresses


The I/O addresses and telegram types of the NX and SINAMICS Integrated components are
used for the communication between NCU and drive.
The telegrams and I/O addresses are already correctly preset and typically do not require any
configuration because the default settings in the TIA Portal correspond to the default settings
in the machine data of the NCU.
If you want to adapt the telegram configuration following creation of the Getting Started
configuration example, you will find further information in the TIA Portal information (menu
"Help > Show help"), keyword "Telegram configuration".

SINUMERIK 840D sl STEP 7 Toolbox V16


Getting Started, 12/2019, 6FC5397-1GP40-0BA1 61
Configuring the hardware
5.8 Setting up the communication

5.8 Setting up the communication

Introduction
To be able to load the configuration to the PLC, a communication connection (Ethernet) must
be established between the PG/PC and the PLC.
In our configuration example, connect the PG with X127 via Ethernet.

Note
Use the DHCP client
Make sure that the PG/PC at X127 is set to "DHCP Client" and the IP address can be assigned
by the NCU.

SINUMERIK 840D sl STEP 7 Toolbox V16


62 Getting Started, 12/2019, 6FC5397-1GP40-0BA1
Configuring the hardware
5.8 Setting up the communication

Procedure
To establish a communication connection between two devices, proceed as follows:
1. In the "Online" menu, select the "Accessible devices" command.
2. In the drop-down lists "Type of PG/PC interface" and "PG/PC interface", search for the
interface used.
If no devices are accessible at an interface, the connecting line between the PG/PC and the
device is interrupted. If devices are accessible, the connecting line is shown and the devices
accessible at the selected interface of the PG/PC are displayed in a list.

SINUMERIK 840D sl STEP 7 Toolbox V16


Getting Started, 12/2019, 6FC5397-1GP40-0BA1 63
Configuring the hardware
5.8 Setting up the communication

3. If you have connected a new device in the meantime, click the "Refresh" button to refresh
the list of accessible devices.
4. Using "Display", transfer to the project navigator the device that has been found in the
"Online accesses" folder.
The subfolder of the interface to which the selected device is connected is selected in the
project tree.
Note
Several identical devices
If several identical devices can be accessed from the PG, by clicking on the "Flash LED"
button you can then display which device corresponds to the entry in the list of accessible
devices.

SINUMERIK 840D sl STEP 7 Toolbox V16


64 Getting Started, 12/2019, 6FC5397-1GP40-0BA1
Configuring the hardware
5.9 Loading and closing the hardware configuration in the PLC

5.9 Loading and closing the hardware configuration in the PLC

Introduction
The project must be stored and compiled before the system data is created for the PLC and the
complete configuration can be closed.

Requirement
● The hardware configuration is compiled.
● A communication connection exists between the PG/PC (TIA Portal) and the NCU.

Note
Loading configurations to simulated environments
If you want to use the configuration in a simulated environment, you must activate the
simulation capability in the project properties before you load the configuration into the
simulated environment or compile the hardware/software.

Note
General reset before loading into a PLC with Safety Integrated plus (F-PLC)
If the actual hardware has been operated in Safety Integrated plus (F-PLC) mode and you now
want to load a configured hardware configuration with changed Safety Integrated mode, you
must perform a general reset of the PLC prior to the loading.

SINUMERIK 840D sl STEP 7 Toolbox V16


Getting Started, 12/2019, 6FC5397-1GP40-0BA1 65
Configuring the hardware
5.9 Loading and closing the hardware configuration in the PLC

Procedure
Proceed as follows to load the configured hardware configuration into the NCU:
1. In the project navigation, right-click the device name, e.g. "CNC_1", and select the
"Hardware configuration" command in the "Download to device" shortcut menu.
Note
Scope of the data to be downloaded
Alternatively, you can select one of the other commands to start downloading additional
data to the NCU in this step.
See TIA Portal help, keyword "General information on download".
The "Extended download" dialog opens.

SINUMERIK 840D sl STEP 7 Toolbox V16


66 Getting Started, 12/2019, 6FC5397-1GP40-0BA1
Configuring the hardware
5.9 Loading and closing the hardware configuration in the PLC

Figure 5-3 Dialog using the PLC of a SINUMERIK 840D sl as an example

2. Make the following settings in the "Extended download" dialog:


– PG/PC interface: Network card used, e.g. "Intel[R] Ethernet Connection I217-V"
– Connection with interface/subnet: Specific interface on the NCU or "Try all interfaces"
3. Click on "Start search" and then select the found PLC from "Compatible nodes in the target
subnet". Alternatively, you can specify an IP address directly in the "Compatible nodes in the
target subnet" list in the "Address" column.

SINUMERIK 840D sl STEP 7 Toolbox V16


Getting Started, 12/2019, 6FC5397-1GP40-0BA1 67
Configuring the hardware
5.9 Loading and closing the hardware configuration in the PLC

4. Confirm the download with "Load".


The "Download preview" dialog opens.

Figure 5-4 "Download preview" dialog

Note
Consistency check
Before the loading, the consistency of the download is checked. This means that a check is
made as to whether the parameterized hardware of the TIA Portal project matches the
hardware that has been actually installed.

Note
Adapt the IP address?
If the IP address of your PG/PC is located in a different subnet than the PLC, a dialog box
is displayed as to whether the IP address in the PG/PC should be adapted.

5. In the "Download preview" dialog, check the settings and click "Load" to confirm the input.

SINUMERIK 840D sl STEP 7 Toolbox V16


68 Getting Started, 12/2019, 6FC5397-1GP40-0BA1
Configuring the hardware
5.9 Loading and closing the hardware configuration in the PLC

Result
The PLC is stopped and the hardware configuring is loaded into the PLC. The "Results of the
loading action" dialog opens and displays the status of the loading action. The dialog restarts
the PLC after completion, provided the "Start" checkbox has not been deactivated.

SINUMERIK 840D sl STEP 7 Toolbox V16


Getting Started, 12/2019, 6FC5397-1GP40-0BA1 69
Configuring the hardware
5.9 Loading and closing the hardware configuration in the PLC

SINUMERIK 840D sl STEP 7 Toolbox V16


70 Getting Started, 12/2019, 6FC5397-1GP40-0BA1
Creating a PLC program 6
6.1 Overview
The PLC program is constructed modularly. It comprises the two parts:
● PLC basic program
The PLC basic program organizes the exchange of signals and data between the PLC user
program and the NCK, HMI, and machine control panel components.
Use the appropriate PLC basic program depending on the firmware version of an NCU.
– SINUMERIK 840D sl PLC basic program V4.5.x.x
– SINUMERIK 840D sl PLC basic program V4.7.x.x
– SINUMERIK 840D sl PLC basic program V4.8.x.x
– SINUMERIK 840D sl PLC Basic Program V4.9.2.x
● PLC user program
The PLC user program is the user-specific part of the PLC program by which the PLC basic
program has been augmented or extended.

Further information
General information about the PLC basic program is available in the online help of the TIA
Portal under the following keywords:
● Execution structure
● Block listing as table
● Assignment overview
● Generating blocks at runtime on the NCU

SINUMERIK 840D sl STEP 7 Toolbox V16


Getting Started, 12/2019, 6FC5397-1GP40-0BA1 71
Creating a PLC program
6.2 Adding the PLC basic program

6.2 Adding the PLC basic program

6.2.1 Opening the PLC basic program system library

Procedure
Proceed as follows to open and display the system library of the PLC basic program:
1. Switch to the "Libraries" task card.
2. Select the PLC basic program that matches the firmware version of the inserted NCU:
– SINUMERIK 840D sl PLC basic program V4.5.x.x
– SINUMERIK 840D sl PLC basic program V4.7.x.x
– SINUMERIK 840D sl PLC basic program V4.8.x.x
– SINUMERIK 840D sl PLC Basic Program V4.9.2.x

Result
The system library of the PLC basic program has been opened. Information on handling can be
found under Using copy templates (Page 73) and Adding the PLC basic program (Page 76).

Further information
The block descriptions and other information about the PLC basic program are contained in the
P3 section of the SINUMERIK 840D sl Basic Functions Manual. PLC basic program.

SINUMERIK 840D sl STEP 7 Toolbox V16


72 Getting Started, 12/2019, 6FC5397-1GP40-0BA1
Creating a PLC program
6.2 Adding the PLC basic program

6.2.2 Using copy templates

Introduction
The "Global libraries" folder of the "Libraries" TaskCard contains the system library of the
SINUMERIK PLC program for your device version: "SINUMERIK 840D sl PLC basic program
V4.x.x.x".

Figure 6-1 Master copies of the SINUMERIK PLC program

Under the "Master copies" folder there are four subfolders with different contents. You can copy
the contents of these subfolders in their entirety or you can copy the individual objects as
needed.
● Using the Ctrl or shift key, you can select several objects of the same type and then copy
them.
● If you copy a master copies folder in its entirety (e.g. "840D sl PLC BP"), the folder structure
is imported, i.e. new groups (subfolders) are created in your "Program blocks" folder.

SINUMERIK 840D sl STEP 7 Toolbox V16


Getting Started, 12/2019, 6FC5397-1GP40-0BA1 73
Creating a PLC program
6.2 Adding the PLC basic program

Table 6-1 Use and content of the master copies of the PLC basic program

Folder Purpose Contents


840D sl PLC Ba‐ This master copy is intended The master copy contains all the blocks that you require for the maximum
sic Program to create a completely new configuration (31 axes, 10 channels).
project. Use of axis/channel DB
If your machine is using fewer axes or channels, you can either copy only
the required blocks or you can delete the blocks that are not required in the
project tree after copying.
If you have blocks in your project that are not required, this increases,
for example, the time required for the loading or export of the PLC symbols.
Use of ALMSG_DB [DB2]
This master copy contains ALMSG_DB [DB2] in the variant Exten‐
dAlMsg=False.
The used DB2 variant must match in the startup for parameterization of the
RUN_UP [FB1] in OB100 [OB100] (parameter ExtendAlMsg).
840D sl PLC Ba‐ This master copy is used to This master copy contains all the know-how-protected blocks that you re‐
sic Program upgrade blocks after the firm‐ quire for the maximum configuration (31 axes, 10 channels).
(upgrade) ware version of an NCU is up‐ Blocks to be changed by the user are not included (no organization blocks
dated, i.e. if you have carried and not FC12 [FC12], Diagnose [FB29], DB4 [DB4], DB5 [DB5]).
out a device replacement or
Use of axis/channel DB
a migration (Page 97).
If your machine is using fewer axes or channels, you can either copy only
the required blocks or you can delete the blocks that are not required in the
project tree after copying.
If you have blocks in your project that are not required, this increases,
for example, the time required for the loading or export of the PLC symbols.
Use of ALMSG_DB [DB2]
This master copy contains ALMSG_DB [DB2] in the variant Exten‐
dAlMsg=False.
The used DB2 variant must match in the startup for parameterization of the
RUN_UP [FB1] in OB100 [OB100] (parameter ExtendAlMsg).

SINUMERIK 840D sl STEP 7 Toolbox V16


74 Getting Started, 12/2019, 6FC5397-1GP40-0BA1
Creating a PLC program
6.2 Adding the PLC basic program

Folder Purpose Contents


ALMSG_DB_Ex You need this master copy if This master copy contains ALMSG_DB [DB2] in the variant Exten‐
tendAlMsg you use the PLC alarm exten‐ dAlMsg=True (PLC alarm extension via AL_MSG [FC10]).
sion via AL_MSG [FC10] (Ex‐ The used DB2 variant must match in the startup for parameterization of the
tendAlMsg=True). RUN_UP [FB1] in OB100 [OB100] (parameter ExtendAlMsg).
Otherwise you use the DB2
variant "Exten‐
dAlMsg=False", which is con‐
tained in the two above-
named master copies folders.
External source Contains master copies for Contains the following master copies, from which you can generate the
files different external sources blocks named below:
(STL). ● bhg_db_awl
You can copy these sources
– strdat [DB<xy>]
into the folder "External sour‐
ces", e.g. under "CNC_1 > ● diagnose.awl
PLC_1 > External sources". – FB29 [FB29]
You edit objects in the "Exter‐ – DB80 [DB80]
nal sources" folder using an
– DB81 [DB81]
external text editor, e.g. Mi‐
crosoft Editor. – FC99 [FC99]
See also: Create blocks from ● gpob840d.awl
external sources (Page 80) – OB1 [OB1]
– OB100 [OB100]
– OB40 [OB40]
– OB82 [OB82]
– OB86 [OB86]
● mdeclist.awl
– DB75 [DB75]

SINUMERIK 840D sl STEP 7 Toolbox V16


Getting Started, 12/2019, 6FC5397-1GP40-0BA1 75
Creating a PLC program
6.2 Adding the PLC basic program

Note
Selecting the appropriate master copy for ALMSG_DB [DB2]
There are 2 different variants of the block ALMSG_DB [DB2]. The used DB2 variant
(ALMSG_DB [DB2]) must match in the startup for parameterization of the RUN_UP [FB1] in
OB100 [OB100] (parameter ExtendAlMsg).
● DB2 variant "ExtendAlMsg=False"
This variant is contained in the master copies folders "840D sl PLC Basic Program" and
"840D sl PLC Basic Program (upgrade)".
If you use the previous procedure (default value of the parameter ExtendAlMsg in RUN_UP
[FB1]), you do not need to explicitly copy the "ALMSG_DB_ExtendAlMsg" master copy.
● DB2 variant "ExtendAlMsg=True"
This variant is exclusively contained in the separate master copies folder
"ALMSG_DB_ExtendAlMsg".
If you use the extension of the PLC alarms via AL_MSG [FC10], you must use the right
master copy, i.e. copy it separately into your "Program blocks" folder.
Further information about the extension of the PLC alarms via AL_MSG [FC10] is available
under the keyword "ExtendAlMsg" in the Basic Functions Manual, in particular, in the
"Extensions of the PLC alarms via block FC 10" section.

Further information
● General information on handling libraries in the TIA Portal can be found in the TIA Portal
online help, Section "Using libraries".
● The block descriptions and other information about the PLC basic program is contained in
the SINUMERIK 840D sl Basic Functions Manual in the P3: Basic PLC program section.

See also
Classification in the documentation landscape (Page 21)

6.2.3 Adding the PLC basic program


You can copy blocks of the PLC basic program from the respective system library. The "840D
sl PLC Basic Program" folder that it contains is meant for creating a completely new project.
You can copy the PLC basic program blocks in their entirety or individually.

Requirement
● A SINUMERIK 840D sl NCU is inserted.
● In the project, there are no blocks from other creators in the range of numbers of the PLC
basic program.

SINUMERIK 840D sl STEP 7 Toolbox V16


76 Getting Started, 12/2019, 6FC5397-1GP40-0BA1
Creating a PLC program
6.2 Adding the PLC basic program

Procedure
To copy program blocks of the basic program from a master copy to the program blocks folder
of the project tree, proceed as follows:
1. Switch to the "Libraries" task card and open the PLC basic program that matches the
firmware version of the inserted NCU:
– SINUMERIK 840D sl PLC basic program V4.5.x.x
– SINUMERIK 840D sl PLC basic program V4.7.x.x
– SINUMERIK 840D sl PLC basic program V4.8.x.x
– SINUMERIK 840D sl PLC Basic Program V4.9.2.x
See also: Opening the PLC basic program system library (Page 72), Using copy templates
(Page 73)
2. Open the folder "Master copies > 840D sl PLC Basic Program"

SINUMERIK 840D sl STEP 7 Toolbox V16


Getting Started, 12/2019, 6FC5397-1GP40-0BA1 77
Creating a PLC program
6.2 Adding the PLC basic program

3. You have several options for copying the PLC basic program blocks to your project:
– Copying the PLC basic program including folder structure as a whole
Drag and drop the master copies folder "840D sl PLC BP" into the folder Program blocks,
e.g. under "CNC_1 > PLC_1 > Program blocks".

SINUMERIK 840D sl STEP 7 Toolbox V16


78 Getting Started, 12/2019, 6FC5397-1GP40-0BA1
Creating a PLC program
6.2 Adding the PLC basic program

– Copying specific PLC basic program blocks


Open the master copies folder and, if applicable, other lower-level folders and manually
define the blocks which you would like to copy by selecting them and then dragging and
dropping them into the program blocks folder.
To select successive objects, click on the first object, press and hold the Shift key and
then click on the last object.
To select non-successive objects, press and hold the Ctrl key and click on the objects
one-by-one.


Strg

 
Strg

The blocks are copied to your project. If applicable, the "Conflicts during copying" dialog is
displayed.
Note
Copy further required blocks separately (e.g. DB2 variant "ExtendAlMsg=True")
If you are using PLC basic program blocks that are not contained in the master copies folder
"840D sl Basic Program > 840D sl PLC BP", you must copy them separately:
● DB2 variant "ExtendAlMsg=True" from the master copies folder
"ALMSG_DB_ExtendAlMsg"
● Different external STL sources from the master copies folder "External source files"
See: Create blocks from external sources (Page 80), Using copy templates (Page 73)

4. In the project tree, right-click "Program blocks" and select the "Software (compile all blocks)"
command in the "Compile" shortcut menu.

SINUMERIK 840D sl STEP 7 Toolbox V16


Getting Started, 12/2019, 6FC5397-1GP40-0BA1 79
Creating a PLC program
6.2 Adding the PLC basic program

Result
The blocks of the SINUMERIK PLC basic program have been copied to your project. Any
copied folder structure has been imported.

Figure 6-2 Program blocks folder

Now you can check the copied blocks and, if applicable, manually delete the PLC basic
program blocks that you do not require (e.g. unused axis DB, channel DB, FB or FC).
If you have unused blocks in your project, some tasks take unnecessarily long, e.g. the loading
or the creation and import of SINUMERIK archives.

6.2.4 Create blocks from external sources


You do not manage external source files (e.g. *.STL or *.SCL) in TIA Portal in the "Program
blocks" folder, but in the "External sources" folder, e.g. under "CNC_1 > PLC_1 > External
sources". You can then generate blocks from the sources maintained there. These are saved
in the "Program blocks" folder.
You do not edit the files in the "External sources" folder using a TIA Portal editor, but with any
external editor, which you define under Windows.

SINUMERIK 840D sl STEP 7 Toolbox V16


80 Getting Started, 12/2019, 6FC5397-1GP40-0BA1
Creating a PLC program
6.2 Adding the PLC basic program

Requirement
● An external source is available in STL or SCL format.
● The mnemonic set in the TIA Portal corresponds to the setting used in the external source.
These settings are found in the menu bar of the TIA Portal as follows: "Extras > Settings >
General > General settings > Mnemonic".
Note
Use of German mnemonics in external source files of the PLC basic program
The mnemonic setting "German" is required in all external source files contained in the copy
templates of the PLC basic program. This affects the files "bhg_db_awl", "diagnose.awl",
"gpob840d.awl" and "mdeclist.awl".
The process fails if the setting does not correspond to the setting of the source file when the
block is generated.

Procedure
1. In the project tree, select the "Add new external file" command in the "CNC_1 > PLC_1 >
External sources" folder.
2. Select the external file (*.STL or *.SCL) that you want to add in the "Open" dialog.
The external file is copied to the "External sources" folder in the project tree.
Note
Displaying external sources (e.g. STL files) using an external editor
The internal editor of the TIA Portal does not display external sources.
If you add and open an external source in the TIA Portal, the file will be opened with the
application linked with the associated file type (e.g. STL) in Windows (e.g. Microsoft Editor).
See also: TIA Portal online help, search term "Using external source files"

3. Right-click the external source, then select the "Generate blocks from source" command in
the shortcut menu.

Result
You have successfully generated blocks from an external source.
Further information about external sources of the PLC basic program system library can be
found in the SINUMERIK 840D sl Basic Functions Manual.

6.2.5 Correcting OB1


When inserting the blocks from a master copy of the library, the existing organization block OB1
is duplicated because it has a different name in the library than in the newly created PLC.
● Block in project tree: Main [OB1] or the name of your migrated block.
● Block in library: OB1 [OB1]

SINUMERIK 840D sl STEP 7 Toolbox V16


Getting Started, 12/2019, 6FC5397-1GP40-0BA1 81
Creating a PLC program
6.2 Adding the PLC basic program

When the project is compiled, a message is displayed that there may only be one object of the
type "OB1".

Procedure
To identify the not required version of the OB1 and to rectify the problem, proceed as follows:
1. Delete one of the duplicated OB1 blocks in the "program blocks" folder:
– If the "program blocks" folder prior to the insertion contained only the empty Main [OB1]
standard block, you can delete it.
– If you have already programmed your own instructions in the OB1, this block normally
already contains the call for the basic program and you can delete the newly added "OB1
[OB1]" block.

SINUMERIK 840D sl STEP 7 Toolbox V16


82 Getting Started, 12/2019, 6FC5397-1GP40-0BA1
Creating a PLC program
6.3 Edit blocks

6.3 Edit blocks


The individual blocks in the PLC basic program can be processed as follows in the TIA Portal:

Procedure
1. Select the block that you would like to edit (e.g. OB100 [OB100]) in the project tree under
"CNC_1 > PLC_1 > Program blocks".
2. Open the block by double-clicking it.
Note
Change the programming language
You can change the programming language under the "Properties" tab in the inspector
window, under "General > Language". The following can be selected:
● LAD
● FBD
● STL

Further information
How you can specifically change and expand a user program is described in the documentation
of SIMATIC STEP 7 as well as in the higher-level online help of the TIA Portal.

SINUMERIK 840D sl STEP 7 Toolbox V16


Getting Started, 12/2019, 6FC5397-1GP40-0BA1 83
Creating a PLC program
6.4 Configuring Ethernet machine control panels in the PLC program

6.4 Configuring Ethernet machine control panels in the PLC program


The PLC basic program automatically transfers the machine control panel signals (MCP
signals) and the addresses of the MCP in the hardware configuration if the configuration is set
up as laid out below.

SINUMERIK 840D sl STEP 7 Toolbox V16


84 Getting Started, 12/2019, 6FC5397-1GP40-0BA1
Creating a PLC program
6.4 Configuring Ethernet machine control panels in the PLC program

Procedure
1. In the project tree, under "CNC_1 > PLC_1 > Program blocks" open the "OB100" with a
double-click.
2. Set the following parameters:

3. Open the OB1 and insert the following user program:

Note
Hardware address must correspond to the software address
Make sure that the address of the MCP on the hardware corresponds to the configured
address of the MCP in the TIA Portal. (Parameter MCPxBusAdr; see also Function Manual,
SINUMERIK 840D sl Basic Functions)
In our example, you must set the address at the hardware (at the DIP switch of the device)
to 192.

Result
You have completed the configuration of the PLC basic program.

SINUMERIK 840D sl STEP 7 Toolbox V16


Getting Started, 12/2019, 6FC5397-1GP40-0BA1 85
Creating a PLC program
6.4 Configuring Ethernet machine control panels in the PLC program

Further information
Information on the addressing of the machine control panel can be found in Function Manual,
SINUMERIK 840D sl Basic Functions, Section MCP interface in the PLC.

SINUMERIK 840D sl STEP 7 Toolbox V16


86 Getting Started, 12/2019, 6FC5397-1GP40-0BA1
Creating a PLC program
6.5 Loading the PLC program to the PLC

6.5 Loading the PLC program to the PLC

Introduction
For loading the configured PLC project, the following preconditions must be fulfilled:

Precondition
● Typically, between the PG/PC and the PLC, there is an Ethernet network connection; this
is also the case in our particular example (see Setting up the communication (Page 62)).
● The configuration to be loaded corresponds to the actual station configuration.
● In the previous Chapter Loading and closing the hardware configuration in the PLC
(Page 65) you loaded the hardware configuration to the module.
● The NCU is active:
– NCK is in cyclic mode.
– PLC in RUN or STOP mode.

Procedure
1. In the project tree, right-click "CNC_1 > PLC_1" and select "Load to device > Software
(changes only)" in the context menu.
The "Load preview" dialog opens.

2. In the "Download preview" dialog, check the settings and click "Load" to confirm the input.

SINUMERIK 840D sl STEP 7 Toolbox V16


Getting Started, 12/2019, 6FC5397-1GP40-0BA1 87
Creating a PLC program
6.5 Loading the PLC program to the PLC

Result
The PLC is stopped and the PLC program is loaded into the PLC. The "Results of the loading
action" dialog opens and displays the status of the loading action. The dialog restarts the PLC
after completion provided the "Start" checkbox has not been disabled.

SINUMERIK 840D sl STEP 7 Toolbox V16


88 Getting Started, 12/2019, 6FC5397-1GP40-0BA1
Creating a PLC program
6.6 Exporting PLC symbols for SINUMERIK Operate

6.6 Exporting PLC symbols for SINUMERIK Operate

6.6.1 Overview
You can make PLC symbols defined in the TIA Portal available for SINUMERIK Operate in able
to use them for various functions there. You must export the symbols of the associated PLC in
the TIA Portal and then import into SINUMERIK Operate.

Note
Deleting unwanted blocks before exporting PLC symbols
If you have saved unwanted blocks in your project, this lengthens the time required for
exporting and importing PLC symbols.
Consequently, delete unwanted blocks that you copied previously from the basic program
library prior to the export.
See: Using copy templates (Page 73)

Requirement
● The software has been compiled completely.
● The associated languages are activated as project languages in the TIA Portal.
See: Information system, "Activate project languages" section
Note
Comments only in German or English
Because SINUMERIK Operate can manage only German and English comments, you can
export only German and English comments from the TIA Portal.

● The PLC symbols to be exported are valid.


Note
Only valid PLC symbols are exported
The following PLC symbols are not taken into account during the export:
● PLC symbols of know-how-protected blocks
● PLC symbols of F-blocks
● Internal PLC symbols
● Invalid/faulty PLC symbols

SINUMERIK 840D sl STEP 7 Toolbox V16


Getting Started, 12/2019, 6FC5397-1GP40-0BA1 89
Creating a PLC program
6.6 Exporting PLC symbols for SINUMERIK Operate

Procedure overview

Table 6-2 Example procedure for creating and loading PLC symbols

Step Description
1 If necessary, check or edit symbols in the TIA Portal
● You can change the symbolic names of blocks by right-clicking the block and selecting
"Rename" from the shortcut menu.
● You can change symbols of the individual elements in the block editor.
● PLC variables for Flags, Times, Input, Output, Timer and Counter can be changed in the
associated table field (e.g. under "CNC_1 > PLC 1 > PLC variables > Display all variables")
2 Exporting PLC symbols with the TIA Portal (Page 90)
3 If necessary, make export files available on the NCU or PCU, e.g. using a USB FlashDrive
4 Importing PLC symbols in SINUMERIK Operate (Page 93)

6.6.2 Exporting PLC symbols

Note
Deleting unwanted blocks before exporting PLC symbols
If you have saved unwanted blocks in your project, this lengthens the time required for
exporting and importing PLC symbols.
Consequently, delete unwanted blocks that you copied previously from the basic program
library prior to the export.
See: Using copy templates (Page 73)

SINUMERIK 840D sl STEP 7 Toolbox V16


90 Getting Started, 12/2019, 6FC5397-1GP40-0BA1
Creating a PLC program
6.6 Exporting PLC symbols for SINUMERIK Operate

Requirement
● The software has been compiled completely.
● The associated languages are activated as project languages in the TIA Portal.
See: Information system, "Activate project languages" section
Note
Comments only in German or English
Because SINUMERIK Operate can manage only German and English comments, you can
export only German and English comments from the TIA Portal.

● The PLC symbols to be exported are valid.


Note
Only valid PLC symbols are exported
The following PLC symbols are not taken into account during the export:
● PLC symbols of know-how-protected blocks
● PLC symbols of F-blocks
● Internal PLC symbols
● Invalid/faulty PLC symbols

SINUMERIK 840D sl STEP 7 Toolbox V16


Getting Started, 12/2019, 6FC5397-1GP40-0BA1 91
Creating a PLC program
6.6 Exporting PLC symbols for SINUMERIK Operate

Procedure
To export PLC symbols for SINUMERIK Operate, proceed as follows:
1. In the project tree, right-click on the PLC or NCU and select the "Export PLC symbols for
SINUMERIK Operate " in the shortcut menu.
The "Export PLC symbols for SINUMERIK Operate" dialog opens.

2. Enter the settings:


– Select the languages whose PLC symbols you want to export. Only those languages that
you previously selected under "Project languages" are actively displayed.
Note
Comments only in German or English
Because SINUMERIK Operate can manage only German and English comments, you
can export only German and English comments from the TIA Portal.

SINUMERIK 840D sl STEP 7 Toolbox V16


92 Getting Started, 12/2019, 6FC5397-1GP40-0BA1
Creating a PLC program
6.6 Exporting PLC symbols for SINUMERIK Operate

– Select the storage location in which the exported PLC symbols are to be saved. Use, for
example, a USB FlashDrive to subsequently copy the files to the NCU.
3. Click "Export" to start the export operation.

Result
The PLC symbols will be copied to the chosen storage location. The "PlcSym.snh" file is
created. Depending on your settings, the files are also created with German or English
comments: "PlcSym_GR.snt" and "PlcSym_UK.snt".

Note
Notation
The notation (upper and lower case) of the file names created by the program is mandatory and
must not be changed.

6.6.3 Importing PLC symbols

Requirement
● The symbol export files are available on the NCU or PCU, e.g. using a USB FlashDrive
Note
Notation
The notation (upper and lower case) of the file names created by the program is mandatory
and must not be changed.

● The current PLC symbols in SINUMERIK Operate have been saved


Note
Saving or deleting old symbol tables
Note that already existing files are overwritten during the export if you confirm that this
should be done. Furthermore, it can lead to inconsistencies if not all files are exported.
We recommend that the old files are backed up or deleted before a new export, or the files
are exported to an empty directory.

Procedure
To use PLC symbols exported from the TIA Portal in SINUMERIK Operate, proceed as follows:
1. Copy the symbol export files in the following directory on the CF card of the NCU or PCU:
/oem/sinumerik/plc/symbols
2. Restart SINUMERIK Operate.

SINUMERIK 840D sl STEP 7 Toolbox V16


Getting Started, 12/2019, 6FC5397-1GP40-0BA1 93
Creating a PLC program
6.6 Exporting PLC symbols for SINUMERIK Operate

3. After the startup, confirm the "Diagnosis", ">>" and "NC/PLC variables" horizontal softkeys.
4. Select the "Insert variables" softkey.
The imported symbols are displayed in the "NC/PLC variables" table and can be imported.

Further information
Detailed information on how you can load the PLC symbols to the control system are contained
in the SINUMERIK 840D sl Universal Operator Manual under the "Loading PLC symbols"
keyword.

SINUMERIK 840D sl STEP 7 Toolbox V16


94 Getting Started, 12/2019, 6FC5397-1GP40-0BA1
Creating a PLC program
6.7 Completing the first commissioning of the PLC

6.7 Completing the first commissioning of the PLC


Perform a reset (warm restart) of the NCK to synchronize the PLC and NCK.

Procedure
To perform a reset (warm start), proceed as follows:
1. On the operator panel, press the <MENU SELECT> key and select the "Commissioning"
menu.
2. Press the "Reset..." softkey.
3. Acknowledge the "Do you want to trigger a reset (warm restart) for the NCK and the entire
drive system (all drive units)?" prompt with the "Yes" softkey.

Result
● The "RUN" LED illuminates green continuously.
● Status display shows a "6" with a flashing point. This means that the PLC and NCK are in
cyclic operation.
You have now completed the initial commissioning of the PLC.
This means that you have successfully completed the main part of Getting Started.

Additional chapter and references


If you require information about the migration of your STEP 7 project into the TIA Portal, you can
find this in Section Tips for personnel changing over from another system (Page 97).
If you now wish to continue and complete commissioning your system together with the
SINAMICS drives, you can find this information in the "Commissioning CNC: NCK, PLC, drive
for TIA" Commissioning Manual, Chapter "Commissioning NC-controlled drives".

SINUMERIK 840D sl STEP 7 Toolbox V16


Getting Started, 12/2019, 6FC5397-1GP40-0BA1 95
Creating a PLC program
6.7 Completing the first commissioning of the PLC

SINUMERIK 840D sl STEP 7 Toolbox V16


96 Getting Started, 12/2019, 6FC5397-1GP40-0BA1
Tips for personnel changing over from another system 7
7.1 Overview for the migration
If you have worked previously with the SINUMERIK Toolbox for STEP 7 V5.x and as migrating
party are already familiar with the commissioning and configuration of the SINUMERIK 840D sl,
these sections contain more advanced information about the project migration, functionality
and operation of the TIA Portal:
● The migration of program blocks or complete projects is described in the "Migrating
projects" section (Page 98).
● The "Problem solution (Page 107)" section contains help for frequent questions concerning
migrated SINUMERIK projects.
● The "Comparison of functionality (Page 114)" section contains information about the
functionality and operation in comparison to STEP 7 V5.x. In this way, you can familiarize
yourself with the TIA Portal when migrating from STEP 7 V5.x.

Note
Validity of the description
These descriptions concern the special considerations for the migration of projects that were
created with SINUMERIK Toolbox for STEP 7 V5.5 SP4 or higher. The migration notes and
descriptions for STEP 7 (TIA Portal) also apply.
If you want to migrate components that require further option packages, the migration notes of
the associated documentation also apply.
A selection of general migration descriptions and notes are available under "Further
information" (Page 106).

SINUMERIK 840D sl STEP 7 Toolbox V16


Getting Started, 12/2019, 6FC5397-1GP40-0BA1 97
Tips for personnel changing over from another system
7.2 Migrating projects

7.2 Migrating projects

7.2.1 Overview

Basic information on the content of this description

Validity of the description


These descriptions concern the special considerations for the migration of projects that were
created with SINUMERIK Toolbox for STEP 7 V5.5 SP4 or higher. The migration notes and
descriptions for STEP 7 (TIA Portal) also apply.
If you want to migrate components that require further option packages, the migration notes of
the associated documentation also apply.
A selection of general migration descriptions and notes are available under "Further
information" (Page 106).

Conventions
The term "SINUMERIK project" is used in this description to represent a project created with
SINUMERIK Toolbox for STEP 7 V5.5 SP4 or higher.

Overview
To check whether the modules of your project are supported, use the Readiness Check Tool
(http://support.automation.siemens.com/WW/view/en/60162195) prior to the migration.
If modules are not supported in the TIA Portal, alternative modules will be suggested in the
Readiness Check Tool.
Depending on how many of the modules are supported in the TIA Portal, either migrate the
complete project or only program blocks and symbols:
● You can migrate the complete project (Page 103).
● You can migrate only program blocks and symbols, and recreate the hardware configuration
in the TIA Portal (Page 100).
To keep the reworking effort low, you can adapt the project prior to the migration (Page 98).

7.2.2 Preparing a STEP 7 V5.x project for the migration


You can migrate a consistent and executable STEP 7 as of V5.4 project directly to the
TIA Portal. To keep the reworking effort for the migrated project low, you can prepare the project
for the migration.
Section Troubleshooting (Page 107) also provides help for frequently asked questions
concerning migrated projects.

SINUMERIK 840D sl STEP 7 Toolbox V16


98 Getting Started, 12/2019, 6FC5397-1GP40-0BA1
Tips for personnel changing over from another system
7.2 Migrating projects

Basic procedure
● Creating user data blocks from the PLC basic program in the project
User data blocks from the PLC basic program (e.g. axis DB) (Page 125) in the TIA Portal are
not based on UDTs, but rather stored as dedicated data blocks in the project.
– You can create the used data blocks prior to the migration in STEP 7 V5.x in the "Blocks"
folder:
Select in the properties of the newly created block under "Name and type > DB of type"
the associated UDT (e.g. "UDT31"). Use the same symbolic name as in the TIA Portal
system library (see Section "Tabular block listing (Page 71)").
During the migration, the blocks are then transferred automatically to the "Program
blocks" folder.
– Alternatively, you can copy the required data blocks after the migration from the master
copies folder "840D sl PLC Basic Program (upgrade) (Page 73)".
See also:
– User-defined data types from the basic program (Page 125)
– Using user-defined data types (UDT) (Page 123)
– Using copy templates (Page 73)
● Checking the user program for flags without symbol and data type
During the migration, a symbol and a data type are assigned automatically to each used
absolute address (e.g. flags, I/O addresses).
– If you use absolute addresses in your STEP 7 V5.x project for intermediate results for
which no symbol or data type is declared ("temporary flag"), type conflicts can occur after
the migration.
Therefore, preferably augment this information in your STEP 7 V5.x project prior to the
migration.
– In particular, problems occur after the migration when you use in your program
temporary global flags without defined data type (global "temporary flags") in which
different data types are stored.
Correct your program and use instead local data with defined data type and symbol.
● Testing for implicit type conversions
In the TIA Portal, each used absolute address is assigned a symbol and so a unique data
type.
– If the use of an absolute address differs from the declaration of the data type, an implicit
data type conversion can cause problems.
In this case, change the affected implicit type conversions with incompatible operands to
explicit type conversions.
– If in your user program you save data of different types in the same address area, then
possibly neither an implicit nor an explicit data type conversion can be performed.
The elimination of such a problem differs depending on the concrete situation.
See also:
– LAD/FDB/SCL: Data type conversion with MOVE instruction (Page 109)
– Data type conversion (S7-300, S7-400) (help for STEP 7)

SINUMERIK 840D sl STEP 7 Toolbox V16


Getting Started, 12/2019, 6FC5397-1GP40-0BA1 99
Tips for personnel changing over from another system
7.2 Migrating projects

7.2.3 Migrating program blocks and symbols


You can migrate PLC program blocks and symbols from an NCU of a STEP 7 project of Version
5.4 SP5 (or higher) to the TIA Portal.
To keep the reworking effort low, you can adapt the project prior to the migration (Page 98).
If you also want to migrate the hardware configuration, orient yourself on the corresponding
handling overview "Migrating software and hardware configurations (Page 103)".

Requirement
● The project to be migrated is upgraded to SINUMERIK 840D sl Toolbox 4.5 SP2 or higher
for STEP 7 V5.5 SP4 or higher.
● FC1007, FC1008 and FC1010 are not contained in the project.
FC1007, FC1008 and FC1010 are no longer part of the basic program and cannot be
migrated. If these functions are contained in your user program, delete them and the
associated calls.
● The STEP 7 project to be migrated is consistent and can be executed.
If your project cannot be executed, you must correct it in STEP 7 V5.x before you migrate
it. You can check the consistency with SIMATIC Manager and restore by compiling the
blocks.
● Both STEP 7 V5.5 SP4 (or higher) and the TIA Portal are installed on the PG/PC, or the
project has been converted to AM 15 format with the migration tool.
See Migration tool (help for the TIA Portal).
● All option packages used to create the project in STEP 7 V5.x are installed and licensed
(e.g. the option package for SCL).
Specific information concerning the migration of other option packages is contained in the
associated documentation.

SINUMERIK 840D sl STEP 7 Toolbox V16


100 Getting Started, 12/2019, 6FC5397-1GP40-0BA1
Tips for personnel changing over from another system
7.2 Migrating projects

Procedure
To migrate program blocks and icons of a SINUMERIK project into the TIA Portal, proceed as
follows:
1. In the "Project" menu, select the "Migrate project" command.
The "Migrate project" dialog opens

Figure 7-1 Migrate project dialog

2. Make the following settings:

Setting Purpose
Source path Path of the original project that is to be migrated.
Select a project in the format of the initial project (*.s7p) or a project
processed with the migration tool (*.am15).
Close hardware configu‐ Keep the "Include hardware configuration" checkbox deactivated.
ration If you also want to migrate the hardware configuration, orient yourself on
the corresponding handling overview "Migrating software and hardware
configurations (Page 103)".
Target > Project name Input of the project name for the newly created project.
Target path Input of the path on which the new project file is to be created.
Author Name of the author or a person responsible for the project.
Comment Input of a comment for the migration.

3. Click "Migrate" to confirm the details.


A not specified SIMATIC CPU that contains your migrated program blocks is added to the
project tree. You cannot replace this CPU with a SINUMERIK NCU, but rather you must add
it new.

SINUMERIK 840D sl STEP 7 Toolbox V16


Getting Started, 12/2019, 6FC5397-1GP40-0BA1 101
Tips for personnel changing over from another system
7.2 Migrating projects

4. Add from the hardware catalog the devices that belong to your migrated user program and
make the settings as in the STEP 7 V5.x project.
Note
Set the module addresses correctly before copying the tag table
If you copy the migrated tag table (see step 6) into the newly created NCU before you
correctly set the module addresses in the device properties, the "Tags in module" dialog is
displayed.
Do not click "Rewire tags with the new module address" in the dialog.
Otherwise, the tags are assigned incorrectly to the tag table and you must correct it
manually or recopy the tag table.
See also: Rewiring variables in the module (Page 112)

5. In the project tree, delete the "Main [OB1]" block under "CNC_x > PLC_x > program blocks".
6. Copy the migrated data from the not specified SIMATIC CPU into the newly created
SINUMERIK NCU:
– Copy the migrated blocks to the "Program blocks" folder of the newly created device.
– Copy the migrated tag tables to the newly created device.
– Copy the migrated PLC data types (UDT) to the "PLC data types" folder of the newly
created device.
– Copy the migrated technology objects (TO) to the "Technology objects" folder of the
newly created device.
7. Upgrade the PLC basic program by means of the master copies folder "840D sl PLC Basic
Program (upgrade)".
See: Upgrading the PLC basic program (Page 104)
8. Interconnect the devices and re-establish the connections.
See: Configuring of connections (Page 121)
9. Compile all the program blocks. If errors or warnings are issued during the compilation, help
is available in Section Troubleshooting (Page 107).
10.Check the migration log in the project tree under "Shared data > Logs" and systematically
work through the notes contained in the migration log.
Section "Troubleshooting (Page 107)" also provides help for frequently asked questions
concerning migrated SINUMERIK projects.

Result
The program blocks and symbols of the PLC have been migrated and assigned to the new
project in the TIA Portal.
If errors or warnings are issued during the migration, help is available in Section
Troubleshooting (Page 107).
The PLC data types (UDT) contained in the SINUMERIK basic program for STEP 7 V5.x are
transferred during the migration. The data blocks of the PLC basic program in the TIA Portal
(e.g. axis DBs), however, do not use them. (See: Using user-defined data types (UDT)
(Page 123))

SINUMERIK 840D sl STEP 7 Toolbox V16


102 Getting Started, 12/2019, 6FC5397-1GP40-0BA1
Tips for personnel changing over from another system
7.2 Migrating projects

You can now familiarize yourself with the TIA Portal when migrating from STEP 7 V5.x. Section
"Comparison of functionality (Page 114)", for example, is interesting for migration. It contains
information about the functionality and handling compared with STEP 7 V5.x.

7.2.4 Migrating software and hardware configurations


The general procedure for the migration with focus on the special considerations during the
migration of a SINUMERIK project follows.
General information about migration is contained under Migrating STEP 7 projects (S7-300,
S7-400) (help for the TIA Portal) or in the system manual STEP 7 Professional (https://
support.industry.siemens.com/cs/products?search=STEP
%207%20Professional&dtp=Manual) in the section on "Migrating projects".

Requirement
● The project to be migrated is upgraded to SINUMERIK 840D sl Toolbox 4.5 SP2 or higher
for STEP 7 V5.5 SP4 or higher.
● The project to be migrated contains only those modules supported in the TIA Portal.
Use the Readiness Check Tool to check whether the used modules are supported.
Alternative modules will be displayed if modules are not supported in the TIA Portal.
Readiness Check Tool (http://support.automation.siemens.com/WW/view/en/60162195)
● FC1007, FC1008 and FC1010 are not contained in the project.
FC1007, FC1008 and FC1010 are no longer part of the basic program and cannot be
migrated. If these functions are contained in your user program, delete them and the
associated calls.
● The STEP 7 project to be migrated is consistent and can be executed.
If your project cannot be executed, you must correct it in STEP 7 V5.x before you migrate
it. You can check the consistency with SIMATIC Manager and restore by compiling the
blocks.
● All option packages used to create the project in STEP 7 V5.x are installed and licensed
(e.g. the option package for SCL).

Procedure overview

Ste Description
p
1 Preparations of the starting project
● To keep the reworking effort low, you can adapt the project prior to the migration (Page 98).
● If STEP 7 V5.x and the TIA Portal are not installed on the same PG/PC or the starting project is an integrated project,
you must convert the starting project to a migration file using the migration tool.
See: Migration tool (help for the TIA Portal)
2 Migrating the project
You can import the complete project (hardware configuration, program blocks, PLC symbols) by activating the "Include
hardware configuration" checkbox.
See: Migration of projects with the TIA Portal (help for the TIA Portal)

SINUMERIK 840D sl STEP 7 Toolbox V16


Getting Started, 12/2019, 6FC5397-1GP40-0BA1 103
Tips for personnel changing over from another system
7.2 Migrating projects

Ste Description
p
3 Upgrading the PLC basic program (Page 104)
If errors or warnings are issued during the compilation, help is available in Section Troubleshooting (Page 107).
4 Checking the migration log
● A migration log is created for each migration. It contains notes for changed project components. You can fetch the
log in the project tree under "Shared data > Logs" or from the project history. After completion of the migration, the
migration log is displayed in the TIA Portal. Check the log after completion of the migration.
● If the migration failed, an XML file is created as log under "\Logs" in the project directory. You can open it with any
XML editor and view the causes for the failed migration.
5 Post-editing a migrated project
Because the configurations of the starting project are not always fully compatible with the TIA Portal, all configurations
are not necessarily transferred identically in the migrated project. Consequently, systematically work through the notes
contained in the migration log.
The "Problem solution (Page 107)" section contains help for frequently asked questions concerning migrated SINU‐
MERIK projects.

Result
The project has been migrated to the TIA Portal.
You can now familiarize yourself with the TIA Portal when migrating from STEP 7 V5.x. Section
"Comparison of functionality (Page 114)", for example, is interesting for migration. It contains
information about the functionality and handling compared with STEP 7 V5.x.

See also
Using copy templates (Page 73)

7.2.5 Upgrading the PLC basic program


If you upgraded the firmware of an NCU or carried out a project migration, you should then also
upgrade the PLC basic program to the current version.
However, it is essential that you check beforehand whether you would inadvertently overwrite
your own blocks (see requirement).

Requirement
● Block number ranges of the SINUMERIK PLC basic program in the project are not occupied
by blocks of other creators or you have checked which blocks of other creators are located
in the SINUMERIK number range.

SINUMERIK 840D sl STEP 7 Toolbox V16


104 Getting Started, 12/2019, 6FC5397-1GP40-0BA1
Tips for personnel changing over from another system
7.2 Migrating projects

Procedure
To upgrade the PLC basic program, proceed as follows:
1. Switch to the "Libraries" task card and open the PLC basic program that matches the
firmware version of the inserted NCU:
– SINUMERIK 840D sl PLC basic program V4.5.x.x
– SINUMERIK 840D sl PLC basic program V4.7.x.x
– SINUMERIK 840D sl PLC basic program V4.8.x.x
See also: Using copy templates (Page 73), Opening the PLC basic program system library
(Page 72)
2. Open the folder "Master copies > 840D sl PLC Basic Program (upgrade)"
3. Depending on the block number assignment in your project, select one of the following
options:

Assignment of the PLC Possible procedure


GP No. range
Through blocks of other Overwriting specific PLC basic program blocks
creators 1. Open the lower-level master copies folders and select only those
PLC basic program blocks that you use in your project.
or – To select successive objects, click on the first object, press and
hold the Shift key and then click on the last object.
Exclusively through PLC – To select non-successive objects, press and hold the Ctrl key
basic program blocks and click on the objects one-by-one.
2. Drag and drop the selected blocks into your "Program blocks"
folder, e.g. under "CNC_1 > PLC_1 > Program blocks".

Exclusively through PLC Overwriting the PLC basic program including folder structure as a whole
basic program blocks Drag and drop the entire master copies folder "840D sl PLC BP" into
your "Program blocks" folder, e.g. under "CNC_1 > PLC_1 > Program
blocks".
The blocks are copied to your project. A check is made for duplicate block names and the
"Conflicts during copying" dialog is displayed.
Note
Copy further required blocks separately (e.g. DB2 variant "ExtendAlMsg=True")
If you are using PLC basic program blocks that are not contained in the master copies folder
"840D sl Basic Program > 840D sl PLC BP", you must copy them separately:
● DB2 variant "ExtendAlMsg=True" from the master copies folder
"ALMSG_DB_ExtendAlMsg"
● Different external STL sources from the master copies folder "External source files"
See: Using copy templates (Page 73)Create blocks from external sources (Page 80)

4. Select the option "Replace existing objects and move to this location" and confirm with "OK".
5. In the project tree, right-click "Program blocks" and select the "Software (compile all blocks)"
command in the "Compile" shortcut menu.

SINUMERIK 840D sl STEP 7 Toolbox V16


Getting Started, 12/2019, 6FC5397-1GP40-0BA1 105
Tips for personnel changing over from another system
7.2 Migrating projects

Result
The PLC basic program has been upgraded and is currently compiled.

Now you can check the copied blocks and, if applicable, manually delete the PLC basic
program blocks that you do not require (e.g. unused axis DB, channel DB, FB or FC).
If you have unused blocks in your project, some tasks take unnecessarily long, e.g. the loading
or the creation and import of SINUMERIK archives.

See also
Adding the PLC basic program (Page 76)

7.2.6 More information


The Siemens Industry Online Support and the online help of the TIA Portal contain general
information about the migration of STEP 7 V5.x projects. It normally also applies to the
migration of SINUMERIK projects.

Documentation in the TIA Portal online help


● Migrating projects in a TIA Portal project
● Migrating STEP 7 projects
● Special considerations for the migration (S7-300, S7-400)
● Migration of program blocks (S7-300, S7-400)

FAQs in Siemens Industry Online Support


● Overview of the most important documents and links to the TIA Portal (http://
support.automation.siemens.com/WW/view/en/65601780)
● Webinar for the migration topic (http://support.automation.siemens.com/WW/view/en/
57425491)
● Requirements for migrating a STEP 7 V5.x project (http://support.automation.siemens.com/
WW/view/en/62100731)
● List with devices and modules supported in the TIA Portal (http://
support.automation.siemens.com/WW/view/en/50029532)
● Migration of a SCL program (http://support.automation.siemens.com/WW/view/en/
59784005)
● Comparison of the standard blocks and instructions in STEP 7 (TIA Portal) and STEP 7 V5.x
(http://support.automation.siemens.com/WW/view/en/54137142)
● Differences for the keyboard operation (http://support.automation.siemens.com/WW/
view/en/48697265) (key combinations)

SINUMERIK 840D sl STEP 7 Toolbox V16


106 Getting Started, 12/2019, 6FC5397-1GP40-0BA1
Tips for personnel changing over from another system
7.3 Troubleshooting

7.3 Troubleshooting

7.3.1 Overview
This section provides help for frequently asked questions regarding migrated projects.
The following messages in the TIA Portal are discussed:
● "Objects with ambiguous addresses exist in the program"
See: Duplicate block addresses (Page 107)
● "Avoid absolute accesses on the local data stack" and "Access to x with non-unique
address"
See: Automatically assigned absolute access (Page 108)
● "The data type of the actual parameter x does not match the data type y of the formal
parameter"
See: Incompatible data types (Page 109)
● "Implicit conversion from data type x to data type y not possible"
See: LAD/FDB/SCL: Data type conversion with MOVE instruction (Page 109)
● "The called block DB20 in network x does not exist"
See: PLC machine data in DB20 (Page 127)
● "The settings for the system diagnostics are invalid. Please check the settings"
See: Configuration and activation of the Web server (Page 111)
● "The module address has been changed. How should the assigned variables be handled?"
See: Rewiring variables in the module (Page 112)

7.3.2 Duplicate block addresses


If multiple blocks are present with the same addresses or numbers in the "Program blocks"
folder (or a subordinate folder), an error will be displayed in the "Info > Compile" inspector
window during the compilation process.

Figure 7-2 Error: "Objects with ambiguous addresses exist in the program"

SINUMERIK 840D sl STEP 7 Toolbox V16


Getting Started, 12/2019, 6FC5397-1GP40-0BA1 107
Tips for personnel changing over from another system
7.3 Troubleshooting

Troubleshooting
If duplicate block numbers exist, proceed as follows:
● If this involves one of the blocks of the basic program that you do not require (e.g. unused
axis DB, channel DB, FB or FC), you can delete it.
● If a user block has the same block number as a required basic program block, you must
change the number of the user block. (You cannot change the addresses of required basic
program blocks.)
● If after the migration an additional system block with a previously used address is added
automatically, you can change the number of the automatically generated block.
System blocks are not stored directly in the "Program blocks" folder, but rather in a
subfolder, e.g. "CNC_1 > PLC_1 > Program blocks > System blocks > Program resources
> SEL [FC36]".
If the "Number" property field cannot be edited, you can delete the block and recompile
program blocks. During the compilation process of the calling block, the deleted block will
be recreated with a free block address.
You can view information about the calling structure of the blocks by right-clicking a block
and selecting the "Call structure" command.

7.3.3 Automatically assigned absolute access


Because blocks are tested more exactly in the TIA Portal than in STEP 7 V5.x, in some cases,
after the migration, a consistent and executable LAD/FDB block can be represented only in
STL. For the automatic conversion of such a block in STL, further errors or warnings may be
displayed in the TIA Portal.
To avoid such messages, check your user program preferably prior to migration for flags
without symbol and data type. If this is not possible, you can proceed as described below.

Troubleshooting
To rectify the problems, add new entries for address accesses in the block editor and assign a
symbolic name to the associated address:
● Warning "Avoid absolute accesses on the local data stack"
If you use temporary results in a LAD/FDB block, after the migration in STL, they are
absolute accesses to the local data stack.

Figure 7-3 Alarm: Absolute access to the local data stack

Declare symbolic variables in the Var_Temp area of the block and use them in the program.
● Error "Access to x with an ambiguous address"
An attempt is made to access a non-declared address area x of a symbolically declared
variable.
Declare for the subarea x a symbolic name and use it in the program.

SINUMERIK 840D sl STEP 7 Toolbox V16


108 Getting Started, 12/2019, 6FC5397-1GP40-0BA1
Tips for personnel changing over from another system
7.3 Troubleshooting

7.3.4 Incompatible data types


After the migration of a project to the TIA Portal, type conflicts can result, because during the
migration, a symbol and a data type are assigned to each used absolute address of a flag.
Examples:
● In the STEP 7 V5.x project, flags were used for intermediate results for which no data type
(and no symbol) was defined.
● In the STEP 7 V5.x project, a flag word for which no data type was defined was used for the
block call.
If an incorrect data type is assigned for the migration, the error message shown below is
displayed during the compilation:
● "The data type of the actual parameter x does not match the data type y of the formal
parameter"
To correct the data type, switch in the block editor to the named parameter with incorrect data
type (e.g. "Word") and specify the correct data type instead. Alternatively, you can use the
"Rewire variable" (Page 112) dialog.

See also:
Migration help for STEP 7 in Section "General notes for the migration of program blocks"
(programs with absolute addressing).

7.3.5 LAD/FDB/SCL: Data type conversion with MOVE instruction


If you use a MOVE instruction in a STEP 7 V5.x block, for example, to transport data types from
axis/channel DBs to user DBs and implicitly convert the data type (e.g. "Real > DInt" or "Real
> Word"), warnings or error messages may be displayed in the TIA Portal after the migration.

Figure 7-4 Implicit conversion of data type error

Troubleshooting
● If you use such a MOVE instruction but have not copied the axis/channel DBs to the
"Program blocks" folder, the data type cannot be checked (absolute access). Warnings are
displayed because of access made to blocks not present in the project.
You can still compile and load the configuration; the required axis/channel DBs are then
generated by the runtime on the NCU. However, you can then not address symbolically
those axis/channel DBs not present in the project.

SINUMERIK 840D sl STEP 7 Toolbox V16


Getting Started, 12/2019, 6FC5397-1GP40-0BA1 109
Tips for personnel changing over from another system
7.3 Troubleshooting

● If you use such a MOVE instruction, have already copied the axis/channel DBs present in
the "Program blocks" folder and compiled the project, all absolute addressings are
automatically converted into symbolic addressings. This cannot be undone.
Because, in this case, the data type information is present in the TIA Portal and the above
mentioned implicit data type conversions are not permitted, errors will be issued during the
compilation.
To rectify the errors, you must convert the data type using two MOVE instructions. For
example, for the REAL > DInt conversion, create a new variable of the DWord type, add a
second MOVE instruction and convert using "REAL > DWord > DInt".

7.3.6 Inconsistency of the data blocks for a different runtime version


If the basic program blocks used in the TIA Portal belong to an older runtime version than that
of the actual hardware, inconsistencies can occur between the blocks in the project and on the
controller:
If a data block (e.g. axis DB) loaded onto the NCU from an older version is smaller than required
by the runtime in the newer version, it will be deleted at runtime and replaced with a so-called
CPU data block of the appropriate length. In the TIA Portal, an inconsistency is then detected
and displayed in online mode. The monitoring of the current values is not possible in online
mode.
In this case, you have the following options:
● Despite the inconsistency, you can continue working with the different block versions, but
not symbolically address the additional functions of the new block. The PLC program,
however, still functions because blocks of newer versions only append but not move signals.
● In the TIA Portal, you can add the appropriate Global DB to the runtime version of the NCU,
explicitly delete the CPU DB on the PLC and reload the Global DB into the NCU. (A CPU DB
cannot be overwritten by a global DB.)
● You can upload the new block from the NCU into the TIA Portal. This corrects the
inconsistency, but also deletes the symbolic information of this data block. If the PLC
program was addressed symbolically, errors will be issued during the compilation.
See also the information system, "PLC programming > Create user program >
Programming fundamentals > Blocks in the user program > CPU data blocks" section.

7.3.7 Renaming blocks


You cannot rename blocks used by know-how protected blocks if the password is not known or
the know-how protection cannot be revoked for any other reasons.
If your user program contains blocks with non-revokable know-how protection that call other
blocks of the basic program, they are affected.

SINUMERIK 840D sl STEP 7 Toolbox V16


110 Getting Started, 12/2019, 6FC5397-1GP40-0BA1
Tips for personnel changing over from another system
7.3 Troubleshooting

The following blocks are affected within the SINUMERIK basic program:
● GP_PAR [DB7]
● FC12 [FC12]
● RUN_UP [FB1]: Renaming possible, complete compilation with the "Software (compile
blocks completely)" command required.

7.3.8 Configuration and activation of the Web server

Overview
The Web server can be used to monitor the PLC via the Internet or the company-internal
Intranet. Evaluations and diagnostics can therefore be performed remotely.
Connect the PG/PC to the PROFINET interface X150 and make the network settings on the PG/
PC so that the subnet address configured for X150 is accessible. The Web server cannot be
accessed via X120/X130/X127.
You can configure the Web server of the PLC in the same way in the TIA Portal as in STEP 7
V5.x. See also: Commissioning Manual, SINUMERIK 840D sl Commissioning CNC: NCK, PLC.

After activation of the Web server, the "Activate system diagnostics" dialog is called. If you
confirm this dialog with "Yes", the following settings are made in the properties of the PLC:
"System diagnostics > General > Activate system diagnostics for this PLC".

Note
Troubleshooting for double block assignment
The system diagnostics requires system diagnostic blocks that by default occupy the same
address area as the blocks of the PLC basic program (FB49, DB49, FC49, DB50).
If you activate the system diagnostics for a SINUMERIK project, an error message with the
prompt to adapt the settings of the system diagnostics will be issued for the next compilation.
In this case, switch to the properties of the system diagnostic blocks by double-clicking the error
message and change the block numbers.

SINUMERIK 840D sl STEP 7 Toolbox V16


Getting Started, 12/2019, 6FC5397-1GP40-0BA1 111
Tips for personnel changing over from another system
7.3 Troubleshooting

Figure 7-5 Default block numbers of the system diagnostics blocks are already assigned

Further information
● Information on the configuration of the PLC Web server on the NCU can be found in the
Commissioning Manual, SINUMERIK 840D sl Commissioning CNC: NCK, PLC.
● General information on the Web server can be found in the information system of the TIA
Portal, keyword "Web server".

7.3.9 Rewiring variables in the module


If a module address is assigned to a variable, and you change the address of this module, a
dialog will be displayed indicating whether the address of the variable also needs to be changed
(rewired).

Figure 7-6 "Variables in the module" dialog

Migration: Set the module addresses correctly before copying the variables table
If you have migrated a project without hardware configuration and copy the migrated variable
table to the newly created NCU before you have set the module addresses in the device
properties, you are not permitted to rewire the variables.

SINUMERIK 840D sl STEP 7 Toolbox V16


112 Getting Started, 12/2019, 6FC5397-1GP40-0BA1
Tips for personnel changing over from another system
7.3 Troubleshooting

Otherwise, the inputs in the function blocks of the basic program are assigned incorrectly and
the program is no longer executable. You must correct it manually or copy the variable table
again.
After completion of the migration including the adapted module addresses and the migrated
variable table, you can use this dialog in order to transfer a planned change to module
addresses automatically to the variable table.

SINUMERIK 840D sl STEP 7 Toolbox V16


Getting Started, 12/2019, 6FC5397-1GP40-0BA1 113
Tips for personnel changing over from another system
7.4 Comparison of functionality

7.4 Comparison of functionality

7.4.1 Overview
The SINUMERIK TIA Portal Toolbox offers a number of functional changes. Some functions
differ from the functions that you know from migrating SINUMERIK Add-on for STEP 7 V5.x.
This section provides an overview of the new functionality and compares functions of the TIA
Portal with functions from STEP 7 V5.x.

Function SINUMERIK 840D sl Toolbox SINUMERIK TIA Portal Toolbox


for STEP 7 V5.x
Adding the SINU‐ Extended functionality and changed handling
MERIK PLC basic The SINUMERIK Toolbox for STEP 7 V5.x The TIA Portal Toolbox contains various copy templates
program contains a library with the PLC basic pro‐ with basic program blocks for each firmware version.
gram for this specific firmware version.
Some data blocks are not contained in this The copy templates also contain data blocks of the axes/
library, but rather they are created at runtime spindles and DB2 alarms that differ from the toolbox for
on the controller (e.g. axis DB). STEP 7 V5.x.
Although this permits a simple symbolic addressing of
the blocks,
you should add only those blocks that you require in your
program.
See: User-defined data types from the basic program
(Page 125)
Defining user-de‐ Changed handling
fined data types In STEP 7 V5.x you can create user-defined In the TIA Portal you can create used-defined structured
(UDT) data types (UDT) and store them in the data types (UDT) in the special "PLC data types" folder.
"Blocks" folder. See: Using user-defined data types (UDT) (Page 123)
The user data blocks from the basic program The user data blocks from the basic program are not
(e.g. axis DB) provided by SIEMENS are al‐ based on UDT, but rather they are global DBs.
so based on UDT. Symbolic names have These data blocks are supplied as copy templates and
been declared for these UDTs in the symbol can be added to the project so they can be addressed
table without the associated blocks (CPU symbolically.
DBs) being contained in the project.
User-defined data types from the basic program
(Page 125)
Addressing ele‐ Changed handling
ments symbolically In STEP 7 V5.x, you could address operands In the TIA Portal, however, symbolic addressing has pri‐
(I/O signals, flags, counters, times, DBs, ority which increases the readability of the program and
FBs) either absolutely or symbolically, al‐ so simplifies error correction.
though absolute addressing had priority as
default.
In STEP 7 V5.x, you could assign a symbol In the TIA Portal, there is no symbol table and all used
to operands (I/O signals, flags, counters, objects have a symbolic name.
times, DBs, FBs) using the symbol table See: Changing the operand priority (absolute/symbolic)
without the operand itself needing to be con‐ (Page 127)
tained in the project.

SINUMERIK 840D sl STEP 7 Toolbox V16


114 Getting Started, 12/2019, 6FC5397-1GP40-0BA1
Tips for personnel changing over from another system
7.4 Comparison of functionality

Function SINUMERIK 840D sl Toolbox SINUMERIK TIA Portal Toolbox


for STEP 7 V5.x
Generating and Simple operation
loading PLC sym‐ The "PLC Symbol Generator" external tool You can export the PLC symbols directly via the TIA
bols can be used to export PLC symbols for SIN‐ Portal.
UMERIK Operate. See: Exporting PLC symbols (PLC Symbol Generator)
(Page 115)
Organizing objects Extended functionality
into libraries You can organize parts of your program into Libraries in the TIA Portal can contain additional hard‐
libraries so, for example, they can be added ware components.
to other programs. See: New library functions (Page 116)
Configuring con‐ Simple operation
nections In STEP 7 V5.x, you open NetPro in order to In the TIA Portal, you can edit connections in the net view
edit connections. under "Connections".
See: Configuring of connections (Page 121)
Creating SINU‐ Extended functionality
MERIK archives In STEP 7 V5.x, you can create SINUMERIK In addition to the SINUMERIK PLC archives known from
PLC hardware upgrade archives and PLC STEP 7 V5.x, you can now create PLC reload archives in
commissioning archives to obtain precom‐ which a selection of program blocks is saved.
piled data for use with SINUMERIK Operate. See Handling SINUMERIK archives (Page 122)
Symbolic access to Changed handling
PLC machine data In STEP 7 V5.x, you can use absolute ad‐ In the TIA Portal, you can symbolically directly access
dressing to access elements of the DB20 (in‐ block elements of the DB20 and so access the PLC ma‐
terface for PLC machine data). You can use chine data when you add and declare the DB20 in the
the symbol table to symbolically address the project.
DB20. See: PLC machine data in DB20 (Page 127)
The DB20 is created at runtime on the con‐
troller.

See also
Safety Integrated and Safety Integrated plus (Page 117)
Working in the project view and the portal view (Page 118)
Displaying program blocks in the tabular overview (Page 119)

7.4.2 Exporting PLC symbols (PLC Symbol Generator)

Comparison of functionality
When the SINUMERIK Toolbox is used for STEP 7 V5.x, you could prepare defined symbols
for SINUMERIK Operate in the Engineering System by using the external "PLC Symbol
Generator" tool.
In the TIA Portal, this functionality is fully integrated in the software and can be called from the
menu bar or the shortcut menu (see Section "Generating and loading PLC symbols (Page 89)").

SINUMERIK 840D sl STEP 7 Toolbox V16


Getting Started, 12/2019, 6FC5397-1GP40-0BA1 115
Tips for personnel changing over from another system
7.4 Comparison of functionality

Figure 7-7 Exporting PLC symbols using the shortcut menu

7.4.3 New library functions


Unlike STEP 7 V5.x libraries, TIA Portal libraries can also contain hardware, including the
device configuration or inserted modules.
This allows you to copy preconfigured components and configured hardware components with
drag-and-drop to a global library in order to add them together with the made settings later to
another project.

SINUMERIK 840D sl STEP 7 Toolbox V16


116 Getting Started, 12/2019, 6FC5397-1GP40-0BA1
Tips for personnel changing over from another system
7.4 Comparison of functionality




Figure 7-8 Copying hardware with drag-and-drop to a library

Further information for handling libraries in the TIA Portal can be found in the information
system under the keyword "Library > Fundamentals".

7.4.4 Safety Integrated and Safety Integrated plus


The F-configuration tool allowed you to use the SINUMERIK Safety Integrated (SPL) safety
functions with the SINUMERIK 840D sl Toolbox for STEP 7 V5.x.
Two different Safety Integrated modes are available in the TIA Portal (from NCU Version 4.8),
whereby Safety Integrated is deactivated as default setting:

Figure 7-9 NCU Safety Integrated settings are "not active" by default.

SINUMERIK 840D sl STEP 7 Toolbox V16


Getting Started, 12/2019, 6FC5397-1GP40-0BA1 117
Tips for personnel changing over from another system
7.4 Comparison of functionality

The NCU always supports both Safety Integrated modes, although they must be licensed and
configured differently. Whether Safety Integrated should be used and its preferred mode
depends on the associated automation task.
Consequently, you must decide for a Safety Integrated mode directly after adding the NCU and
activate its mode manually in the NCU properties.
The activation at the start of the configuring execution sequence allows the system to assign
some safety-relevant parameters automatically (e.g. PROFIsafe addresses).
If you do not select the correct Safety Integrated mode already at the start, you may get error
messages during the compilation and must set these safety-relevant parameters manually
afterwards.

7.4.5 Working in the project view and the portal view


Views in the TIA Portal
The TIA Portal provides various views for the automation project between which you can switch
at any time:
● Project view

The project view shows all components of the project as well as all associated work areas
and editors.
Working in the project view is similar to working as you know from STEP 7 V5.x.
● Portal view

Although the portal view provides a task-oriented overview and configuration options for
many important components, such as CPUs, HMI devices or drives,
not all configuring options are available (e.g. configure I/O peripherals). If required, an
automatic switch to the project view for the selected task is made.

SINUMERIK 840D sl STEP 7 Toolbox V16


118 Getting Started, 12/2019, 6FC5397-1GP40-0BA1
Tips for personnel changing over from another system
7.4 Comparison of functionality

Switching between views


The portal view is displayed during the first start of the TIA Portal or as default setting.
● The associated "Project view" or "Portal view" link in the lower left-hand area can be used
to switch the views at any time.

● You can change the settings (via "General > General > Start view") to specify the view to be
used to start the TIA Portal.

7.4.6 Displaying program blocks in the tabular overview


In STEP 7 V5.x, the list of the program blocks was not displayed in the project tree, but rather
as an overview in the work area. The program blocks could be sorted in this overview, e.g.
according to addresses or symbolic names.
In the TIA Portal, you can display the individual program blocks already in the project tree by
expanding the "Program blocks" folder. The sorting, however, cannot be set in the project tree,
but rather the blocks are always sorted according to type and name.
You can, however, maximize the project tree view in order to display the content of the
"Program blocks" folder in the work area.

SINUMERIK 840D sl STEP 7 Toolbox V16


Getting Started, 12/2019, 6FC5397-1GP40-0BA1 119
Tips for personnel changing over from another system
7.4 Comparison of functionality

Figure 7-10 Maximizing the project tree

You can then display the program blocks as symbols, list or details. In the details view, you can
sort the program blocks according to any column, e.g. according to the address or
programming language.

Figure 7-11 Maximized project tree

Further information
● You can find details on the maximized overview in the TIA Portal online help under
"Overview window".
● A table with all blocks of the PLC basic program and the associated block addresses, PLC
symbols, etc. (e.g. for printing) is available under Tabular listing of blocks (Online Help).

SINUMERIK 840D sl STEP 7 Toolbox V16


120 Getting Started, 12/2019, 6FC5397-1GP40-0BA1
Tips for personnel changing over from another system
7.4 Comparison of functionality

7.4.7 Configuring of connections

Comparison of functionality
In STEP 7 V5.x, you can create connections in NetPro, e.g. for the configuring of
interconnected plants. In the TIA Portal, make these settings in the net view.
You can switch the net view by clicking "Interconnect" or "Connections" in the toolbar. In the
"Connections" dropdown list, you can select a connection type directly and then use drag-and-
drop in the work area to create connections between devices.

   

Figure 7-12 Net view with active "Connections" functionality

No Function Purpose
.
1. Networking Functionality within the net view with which you can interconnect devi‐
ces and configure nets.
2 Connections Functionality within the net view with which you can create connections.
3 Dropdown list for select‐ Depending on the operational purpose or device type, select in the
ing the connection type dropdown list the connection type to be created.
The associated possible communications partners are then color-high‐
lighted.

SINUMERIK 840D sl STEP 7 Toolbox V16


Getting Started, 12/2019, 6FC5397-1GP40-0BA1 121
Tips for personnel changing over from another system
7.4 Comparison of functionality

No Function Purpose
.
4 Net view tab The "Net view" tab in the "Devices & nets" editor provides two function‐
alities: "interconnect" and "connections".
If you switch to the net view, the "interconnect" functionality is initially
active.
5 Color-highlighting of If you activate the "connections" functionality in the net view, all possible
possible communication communications partners that match the selected connection type are
partners highlighted.
The following can be used as communications partner:
● Controller (e.g. PLC of the SINUMERIK NCU)
● PC applications (e.g. WinCC RT Advanced of the PCU 50.5)

Further information
General information on connections in the net view can be found in the online help of the TIA
Portal, keyword "Communication via connections".

7.4.8 Handling SINUMERIK archives

Comparison of functionality
Unlike STEP 7 V5.x, data blocks for axes/spindles are now already contained in the project and
also saved in the SINUMERIK PLC archive.
You can also create additional so-called PLC reload archives in the TIA Portal with which you
can save a selection of program blocks.

Restrictions
The F-blocks used for the Safety Integrated plus (F-PLC) mode cannot be stored in PLC reload
archives, because a mutual dependency between F-blocks and the associated hardware
configuration with failsafe components exists. Instead, you can save F-blocks together with
other blocks and hardware data in a PLC commissioning archive.

Time required for creating and importing archives


If the creation or import takes longer than usual, you may have saved data blocks of non-
activated axes/spindles in the archive. In this case, delete the superfluous data blocks in the
"Program blocks" folder and recreate the archive.

SINUMERIK 840D sl STEP 7 Toolbox V16


122 Getting Started, 12/2019, 6FC5397-1GP40-0BA1
Tips for personnel changing over from another system
7.4 Comparison of functionality

Further information
● Information about the general handling of copy templates in libraries can be found at Using
copy templates (Page 73).
● The detailed procedure and an overview of the data for SINUMERIK PLC archives
contained in the TIA Portal are available under Creation of SINUMERIK-PLC archives
(online help).

7.4.9 Using user-defined data types (UDT)

Overview
Many programs require user-defined data types that can be edited by various program
locations, e.g.
● UDT31: Axis/spindle signals for data blocks Axis1 [DB31]...Axis31 [DB61]
● UDT2: Alarms/messages for data block ALMSG_DB [DB2]
In the PLC basic program of the TIA Portal, the user-defined data types from the basic program
(axes/spindles, channels, mode groups, alarms/messages, tool management, PLC/HMI, MCP/
HHU) are not based on user-defined data types. Instead, these data blocks are contained in the
basic program as global data blocks that define their elements appropriately for each block.
This allows them to be directly addressed symbolically. See User-defined data types from the
basic program (Page 125).

Comparison of functionality
In STEP 7 V5.x, you can define your data types and store these directly in your "S7 program >
Blocks" folder in which the data blocks and other program blocks are also stored.
In the TIA Portal, you can also declare your own structured PLC data types (UDT), use them in
data blocks and address these elements symbolically. These PLC data types, however, are
located in a separate folder ("CNC_1 > PLC_1 > PLC data types"). You can also create the
UDTs from an external source (STL).

SINUMERIK 840D sl STEP 7 Toolbox V16


Getting Started, 12/2019, 6FC5397-1GP40-0BA1 123
Tips for personnel changing over from another system
7.4 Comparison of functionality

In STEP 7 V5.x, data blocks defined by SIEMENS are also based on UDT (data blocks of axes/
spindles, channels, mode groups, alarms/messages, tool management, PLC/HMI, MCP/HHU).
Unlike STEP 7 V5.x, in the basic program in the TIA Portal, these data blocks are not based on
UDTs, but rather are global DBs that define their elements in each DB. As previously,
SIEMENS specifies the structure and the symbology. Consequently, you can copy these data
blocks without further dependencies of UDTs in a single step from the system library into the
"Program blocks" folder.

 

Figure 7-13 Copying blocks from a copy template

SINUMERIK 840D sl STEP 7 Toolbox V16


124 Getting Started, 12/2019, 6FC5397-1GP40-0BA1
Tips for personnel changing over from another system
7.4 Comparison of functionality

Further information
● An overview of the differences between STEP 7 V5.x and the TIA Portal as well as
information about the procedure are contained in the Service & Support portal Programming
user-defined data types in the TIA Portal (http://support.automation.siemens.com/WW/
view/en/51339156).
● Information about the concept and the procedure for PLC data types are contained in the
information system under the keyword "Data type, PLC data type".
● Information about symbolic programming with UDTs is contained in Section "Symbolic
programming of the user program with interface DB" of the Base Functions (FB1) Function
Manual.

7.4.10 User-defined data types from the basic program

Comparison of functionality
Unlike the SINUMERIK Toolbox for STEP 7 V5.x, the user data blocks from the basic program
in the Engineering System are supplied for the TIA Portal Toolbox:
● Axes/spindles: Axis1 [DB31]…Axis31 [DB61]
● Channels: Chan1 [DB21]…Chan10 [DB30]
● PLC / mode group signals: Mode group [DB11]
● DB2 alarms from the PLC (alarm numbers 500000 to 799999): ALMSG_DB [DB2] or
ALMSG_DB_ExtendAlMsg [DB2]
● Tool management DB74 [DB74]
● PLC/HMI signals: MMC [DB19]
● MCP / HHU (SDB210): DB77 [DB77]
They were not contained in the SINUMERIK basic program for STEP 7 V5.x, but rather were
created on the NCU only at runtime. You could address them symbolically only with an
appropriate symbol table.
In the TIA Portal, these blocks are provided as copy templates in the system library appropriate
for your NCU version:

SINUMERIK 840D sl STEP 7 Toolbox V16


Getting Started, 12/2019, 6FC5397-1GP40-0BA1 125
Tips for personnel changing over from another system
7.4 Comparison of functionality

Figure 7-14 "Copy templates" folder in the "Libraries" task card

If you copy them in your project to the "Program blocks" folder, you can also address them
symbolically like other blocks. Unlike STEP 7 V5.x, access is no longer made to user-defined
data types (UDT), but rather the data structure is defined in the data blocks themselves.
Because of this different handling of the data blocks, you must augment a project migrated from
STEP 7 V5.x subsequently with the data blocks, e.g. by means of the "840D sl PLC Basic
Program (upgrade)" copy template. Otherwise, access in the user program is made to non-
existent data blocks and warnings or errors will be issued during the compilation. (Symbolic
access to the elements of a data block is not possible if the data block is not contained in the
project.)
You should ensure that only the required axis/channel DBs are stored in the "Program blocks"
folder:
● The copy template "840D sl PLC Basic Program (upgrade)" contains all of the know-how-
protected blocks that you require for the maximum configuration (31 axes, 10 channels).
● If your machine is using fewer axes or channels, you can either copy only the required
blocks or you can delete the blocks that are not required in the project tree after copying.
If you have data blocks for non-activated channels or axes/spindles in the project, the
procedure for compiling, loading and creating/importing of archives is delayed.
You can also create your own global libraries as copy templates in which, for example, you save
only the blocks required for a specific configuration.

Further information
● You will find further information about the data blocks in the copy templates in Sections
"Using copy templates (Page 73)" and "Overview (Page 71)".
● A functionality comparison of the symbolic addressing in STEP 7 V5.x and the TIA Portal is
available under Changing the operand priority (absolute/symbolic) (Page 127).
● Information about creating your own libraries as copy templates can be found in the
information system of the TIA Portal, keyword "Library".

SINUMERIK 840D sl STEP 7 Toolbox V16


126 Getting Started, 12/2019, 6FC5397-1GP40-0BA1
Tips for personnel changing over from another system
7.4 Comparison of functionality

7.4.11 PLC machine data in DB20


The DB20 provides the interface for PLC machine data and is not contained in either
STEP 7 V5.x or in the TIA Portal part of the PLC basic program.
In STEP 7 V5.x, you can use absolute addressing to access elements of the DB20 (interface
for PLC machine data). You can use the symbol table to symbolically address the DB20.
In the TIA Portal, you can symbolically directly access block elements of the DB20 and so
access the PLC machine data when you add and declare the DB20 in the project.

Basic procedure
Add this data block in the "Program blocks" folder so that you can access this data symbolically
in the TIA Portal. The declaration for DB20 in the project must match the specified values in the
machine data for SINUMERIK Operate (MD14504, MD14506, MD14508).
If you do not create the DB20 in the TIA Portal, it will be created on the NCU at runtime. In this
case, you cannot access symbolically the elements of the DB20, and warnings will be issued
during the compilation because the block is not found in the project.

Further information
Information about the declaration of the DB20 is contained in the following documentation:
● SINUMERIK 840D sl / 828D Function Manual Basic Functions, Section "PLC machine data"
● SINUMERIK 840D sl List Manual, SINAMICS S120 Lists, Book 2, Section "PLC machine
data (DB20)"

7.4.12 Changing the operand priority (absolute/symbolic)

7.4.12.1 Effects of the symbolic addressing


In STEP 7 V5.x, you could address operands (I/O signals, flags, counters, times, DBs, FBs)
either absolutely or symbolically, although absolute addressing had priority as default. In the
TIA Portal, however, symbolic addressing has priority which increases the readability of the
program and so simplifies error correction.
In STEP 7 V5.x, you could assign a symbol to operands (I/O signals, flags, counters, times,
DBs, FBs) using the symbol table without the operand itself needing to be contained in the
project. In the TIA Portal, there is no symbol table and all used objects have a symbolic name.

SINUMERIK 840D sl STEP 7 Toolbox V16


Getting Started, 12/2019, 6FC5397-1GP40-0BA1 127
Tips for personnel changing over from another system
7.4 Comparison of functionality

This change of the operand priority in the PLC program can, however, require changes in your
migrated user program. Similarly, persons making the migration may need to make themselves
familiar with the changed handling of certain functionalities:
● Data type for PLC variables
If you define PLC variables in the TIA Portal, you must specify the associated data type. This
is tested more restrictively in the TIA Portal than in STEP 7 V5.x. In particular, after the
migration, corrections must be made to the user program.
See also:
– Incompatible data types (Page 109)
– LAD/FDB/SCL: Data type conversion with MOVE instruction (Page 109)
● Declarations only with symbolic addressing
Each data type (e.g. UDT or blocks) has a symbolic name. You must use the symbolic
addressing for the declaration of instances.
See also:
– Declaration of multi-instances (GET [FB2], PUT [FB3]) (Page 128)
– Declaration of static local data in the block interface (Page 131)
● Variables adaptation when changing the module address (Page 112)

7.4.12.2 Declaration of multi-instances


Both in STEP 7 V5.x and in the TIA Portal you can add function blocks as multi-instances using
the FB2.
In the TIA Portal, you do not address the block using its address "FB2", but rather symbolically
using its "GET" name.
Because GET, however, is also the name of an instruction for S7 communication, you must
take care when programming that the correct block is addressed:
● When you enter "GET" (with quotes), the FB2 of the SINUMERIK basic program is
addressed.
● When you enter GET (without quotes), the instruction is used for S7 communication.

SINUMERIK 840D sl STEP 7 Toolbox V16


128 Getting Started, 12/2019, 6FC5397-1GP40-0BA1
Tips for personnel changing over from another system
7.4 Comparison of functionality

Procedure
To correctly address the SINUMERIK "GET [FB2]" block rather than the S7 communications
instruction GET for programming, use one of the following methods:
● Addressing a block with drag-and-drop

You can drag-and-drop the "GET [FB2]" block from the project tree into a network of your
block. The "Call options" dialog is then displayed in which you can configure the associated
instance data block.
● Enter the "GET" block name directly (note the quotes)
If you enter the block completely (e.g. in an STL source, in an empty box or as data type in
the block interface), ensure that you write the name within quotes.
● Enter the GET block name and select "GET" in the auto-complete list

SINUMERIK 840D sl STEP 7 Toolbox V16


Getting Started, 12/2019, 6FC5397-1GP40-0BA1 129
Tips for personnel changing over from another system
7.4 Comparison of functionality




If you enter the block name itself (e.g. in an empty box or as data type in the block interface),
you can select the FB2 from the auto-complete list.

Further information
For further information, refer to the TIA Portal online help:
● Fundamentals of instances
● Fundamentals for block properties
● Overview of the block properties

SINUMERIK 840D sl STEP 7 Toolbox V16


130 Getting Started, 12/2019, 6FC5397-1GP40-0BA1
Tips for personnel changing over from another system
7.4 Comparison of functionality

7.4.12.3 Declaration of static local data in the block interface


If, when programming blocks in the block interface, you declare static local data ("Static"
section) and want to specify a block as "data type" in order to declare an instance, unlike STEP
7 V5.x, you cannot address absolutely.

Instead, simply enter the symbolic name of the block (e.g. "GET" or "PUT").

In this case, use quotes explicitly to avoid inadvertently addressing an instruction with a similar
name. (See also Declaration of multi-instances (Page 128))

SINUMERIK 840D sl STEP 7 Toolbox V16


Getting Started, 12/2019, 6FC5397-1GP40-0BA1 131
Tips for personnel changing over from another system
7.4 Comparison of functionality

SINUMERIK 840D sl STEP 7 Toolbox V16


132 Getting Started, 12/2019, 6FC5397-1GP40-0BA1
Index

A D
ADI4 module Details, 24
connect, 46 DP Integrated
Insert, 46 setting, 60

B E
Block Ethernet interface
DB2, 125 configuring, 57
DB20, 127 Extended download, 66
DB21...30, 125
DB31...61, 125
DB49, 111 F
DB50, 111
FBD, 83
DB7, 110
Firmware version, 40
External source, 81
FB1, 110
FB1007, 100, 103
FB1008, 100, 103
G
FB1010, 100, 103 GSD file
FB2, 127, 128 downloading, 49
FB3, 127 GSD files
FB49, 111 Installing, 49
FC12, 110 GSDML file
FC49, 111 downloading, 49
Multiple assigned address, 107 GSDML files
Blocks Installing, 49
Data blocks of the NC/PLC interface, 125
editing, 83
open, 83 H
Hardware configuration
load, 66
C
Command bar, 24
Communications I
establishing, 63
Insert
Components
ADI4 module, 46
NCU, 28
NCU, 38
Connect
NX module, 40
ADI4 module, 46
Inspector window, 24
NX module, 40
Integrated PROFIBUS
Conversion
setting, 60
Data type, 99
Interconnected plant, 121
Interface
X150, 111

SINUMERIK 840D sl STEP 7 Toolbox V16


Getting Started, 12/2019, 6FC5397-1GP40-0BA1 133
Index

Interface 105, 56
Interface 120, 56
Interface 126, 56 P
Interface 127, 56
PLC
Interface X150, 56
Communication setup, 63
PLC basic program, 73
Upgrade, 105
L PLC symbol export, 89
LAD, 83 PLC symbols
Library generate, 89
Global library, 72 load, 89
System library, 72 Portal view, 24
PROFIBUS DP
configuring, 58
M PROFINET interface
Configuring, 58
Machine data
Programming language
MD14504, 127
FBD, 83, 109
MD14506, 127
LAD, 83, 109
MD14508, 127
SCL, 109
Master copies
STL, 83
PLC basic program, 73
Project tree, 24
Menu bar, 24
Project view, 24
Migration
PLC blocks, 100, 103
Mnemonics
setting, 81
R
Multi-instance, 128 Reset
NCK, 95
Restart
N NCK, 95
NC/PLC interface, 125
NCK
Reset, 95
S
Restart, 95 Safety Integrated mode
NCU Change, 65
Insert, 38 SINUMERIK handwheel, 48
optional components, 29 SINUMERIK machine control panel MCP, 48
NetPro, 121 SINUMERIK machine pushbutton panel MPP, 48
NX module SINUMERIK PP 72/48 peripheral (I/O) module, 48
connect, 40 STL, 83
Insert, 40 Subcomponents
NCU, 28
System diagnostics, 111
O
Operation
MOVE, 109
T
Task cards, 24
Tool
PLC symbol generator, 115

SINUMERIK 840D sl STEP 7 Toolbox V16


134 Getting Started, 12/2019, 6FC5397-1GP40-0BA1
Index

Troubleshooting
Ambiguous addresses, 107
Double block assignment, 111
Incompatible data type, 109
System diagnostics blocks, 111

V
VDI interface, (NC/PLC interface)

W
Web browser, 111
Web server
Configuration, 111
Work area, 24

SINUMERIK 840D sl STEP 7 Toolbox V16


Getting Started, 12/2019, 6FC5397-1GP40-0BA1 135
Index

SINUMERIK 840D sl STEP 7 Toolbox V16


136 Getting Started, 12/2019, 6FC5397-1GP40-0BA1

You might also like