ST-SERV3 V58 en
ST-SERV3 V58 en
ST-SERV3 V58 en
3. Software Commissioning
TIA-Service Training 3
6. Using System Blocks
ST-SERV3 Course
7. Analyzing SIMATIC S7 Diagnostic Data
AL: N ECCN: 5D992B1
Export Regulations
AL Number of European resp. German export list. 8. Diagnostic Messages with WinCC flexible
Goods with labels not equal to “N“ are subject to export authorization.
ECCN Number of US export list. (Export Control Classification Number). Goods
with labels not equal to “N“ are subject to re-export authorization for
export to certain countries.
Indication Goods labeled with “AL not equal to N“ (here: technical documentations)
are subject to European or German export authorization when being 9. Commissioning the MM 420 with the
exported out of the EU.
Goods labeled with “ECCN not equal to N“ (here: technical “Starter“ SW
documentations) are subject to US re-export authorization.
Even without a label, or with label “AL:N“ or “ECCN:N“, authorization may
be required due to the final whereabouts and purpose for which the
goods are to be used (here: technical documentations).
Decisive are the export labels stated on order acknowledgements,
delivery notes and invoices.
10. PROFINET IO
This document was produced for training purpose.
SIEMENS assumes no responsibility for its contents.
The reproduction, transmission or use of this document or its contents is not permitted
without express written authority. Offenders will be liable to damages. All rights,
including rights created by patent grant or registration of a utility model or design, are 11. Maintenance
reserved.
© SIEMENS AG 2008
12. Solutions
Name: ___________________________
Contents Page
Training Area Setup with S7-300 ................................................................................................... 2
Configuration of the S7-300 Training Unit ......................................................................................... 3
The Simulator ................................................................................................................................... 4
The Conveyor Model ..................................................................................................................... 5
Complete Symbol List ..................................................................................................................... 6
If You Want to Know More .............................................................................................................. 8
Training Area Setup with S7 - 400 .................................................................................................. 9
Configuration of the S7 - 400 Training Unit ..................................................................................... 10
S7 - 300 Training Area The training area consists of the following components:
• An S7-300 programmable logic controller with the CPU 315-2 DP
• Digital input and output modules, analog module
• Simulator with digital and analog sections
• Conveyor model
• ET 200S distributed peripheral
• MM420 Micromaster with PROFIBUS module
• TP170B Touchpanel
• Programming device or PC
Addresses For the training unit with the CPU 315-2DP and for the S7-400 training unit, you
can set the starting addresses of the modules by parameter assignment
(freely).
DI DO
.0 .......... .......... .0
.1 .......... .......... .1
.2 .......... .......... .2
.3 .......... .......... .3 V
.4 .......... .......... .4
.5 .......... .......... .5
.6 .......... .......... .6 -15V...+15V AI2 AO1 -15V...+15V
AI1 AO2
.7 .......... .......... .7
.0 .......... ..........
.0
.1 .......... ..........
.1 AI1 AI2
.2 .......... .......... V
.2
.3 .......... ..........
.3
.4 .......... ..........
.5 .......... ..........
.4
.5
0 8 1 5 AI1 AI2 AO1 AO2
.6 .......... ..........
.6
.7 .......... ..........
.7
Design Two cables connect the simulator to the S7-300™ or S7-400™ training unit. The
simulator is divided into the following three sections:
• Analog section with a voltmeter for displaying the values at analog channels
0 and 1 or the analog outputs 0 and 1. You use the selector switch to choose
the voltage value you want to monitor. There are two separate
potentiometers for setting the values for the analog inputs.
Addressing You use the following addresses to address the inputs and outputs in your user
program :
Switch / Mom.Cont. IW 0
LEDs QW 4
Thumb. buttons IW 2
Digital display QW 6
Design The slide above shows the conveyor model with its sensors and actuators.
Note The following pages contain either further information or are for reference to
complete a topic.
Slot No. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
PS CPU DI DI DO DO AI
32 32 32 32 8
Design You can see the design of the S7-400 training unit in the slide above.
Addressing You have the default addresses, as shown in the slide above, as long as no
configuration or parameter settings have been made.
Contents Page
Objectives .......................................................................................................................................... 2
Commissioning Checklist ……….................................................................................................... 3
From Process to Project .................................................................................................................. 4
SIMATIC S7 – Project Management ................................................................................................ 5
Connecting the PG/PC to Subnets .................................................................................................... 6
Setting the PG/PC Interface …......................................................................................................... 7
PG Routing ...................................................................................................................................... 8
Online Connection using "Accessible Nodes" ……............................................................................ 9
Offline / Online View in the SIMATIC Manager ............................................................................... 10
Erasing Data Stored on the MMC .................................................................................................... 11
Performing a Memory Reset and Warm Restart ............................................................................. 12
Hardware Configuration and Parameter Assignment ...................................................................... 13
Inserting a Station and Generating a Setpoint Configuration ........................................................... 14
Configuring a PROFIBUS - DP Master System ................................................................................ 15
Configuring Compact and Modular DP Slaves …….......................................................................... 16
Monitoring and Modifying Variables ................................................................................................. 17
Opening a Variable Table and Establishing a Connection to the CPU ............................................. 18
Modifying Outputs in the STOP State ............................................................................................. 19
Exercise 1: Performing a CPU Memory Reset and a Warm Restart ............................................... 20
Exercise 2: Setting the PG Interface to MPI .................................................................................... 21
Exercise 3: Retrieving a Project and Saving It ................................................................................. 22
Exercise 4: Uploading a Hardware Station in the PG and Copying "My_Program" .......................... 23
Exercise 5: Configuring the Hardware including the ET200 ............................................................. 24
Exercise 6: Testing the Conveyor Model‘s Sensor/Actuator Wiring ................................................. 25
WinCC flexible ................................................................................................................................. 26
Configuring Phase, Downloading Phase and Process Control Phase .............................................. 27
Exercise 7: Setting the Touch Panel Interface for Transfer ............................................................. 28
Exercise 8: Switching the PG Interface to PROFIBUS DP ............................................................... 29
Exercise 9: Checking the PROFIBUS DP ......................................................................................... 30
Exercise 10: Checking the RT Interface of the WinCC flexible Station ........................................... 31
Exercise 11: Checking the Connection to the Controller ................................................................. 32
Exercise 12: Transferring the WinCC flexible Project into the TP170B .......................................... 33
Checklist The checklist shows the individual preparatory steps for commissioning the
hardware. If you do not want to use the default setting, it may be necessary to
assign parameters to the modules before you check the inputs and outputs.
The individual steps are described in more detail on the following pages.
Project Management
SIMATIC Manager
Hardware
FB21
OB1
Process Software
Process When you take a closer look at a process you want to automate, you will find
that it is made up of a multitude of smaller sections and sub-processes, which
are all interlinked and dependent on one another.
The first, most important task is to break down the automation process as a
whole into separate sub-tasks.
Hardware and Each sub-task defines certain hardware and software requirements which the
Software the automation system must fulfill:
• Hardware:
- Number and type of inputs and outputs
- Number and type of modules
- Number of racks
- Capacity and type of CPU
- HMI systems
- Networking systems
• Software:
- Program structure
- Data management for the automation process
- Configuration data
- Communication data
- Program and project documentation
Multiproject
“TIA_PRO2_solution“
S7 – Standard Projects
Multiproject A multiproject folder is a folder for all projects and libraries of an automation
solution that contains one or more STEP 7 projects and, optionally, also
libraries. The projects within the multiproject can contain objects with cross-
project interrelations (such as cross-project S7 connections).
Benefits When projects are a component of a multiproject, their scope can be smaller
and easier to follow.
With the help of the multiproject you can, for example, create a project for every
operator for distributed editing and divide the stations according to their
operator between the projects.
Cross-project functions make sure that you can almost handle a multiproject
like one single project.
Examples of cross-project functions in STEP 7 (basic package):
- Save As (save multiproject with all projects in another location)
- archiving (multiproject with all projects)
- adjustment of cross-project networking (such as, bringing together subnets)
- updating the view (all projects of a multiproject)
General For troubleshooting in networked systems, you can connect the programming
device or PC directly to the various subnets, such as MPI, PROFIBUS or
Industrial Ethernet. You can see the modules that you need in order to do this in
the table in the slide above.
PG/PC Interface So that you can have an online connection with STEP 7, you have to set up the
PG/PC interface accordingly. In the slide on the right you can see an example
for connecting to Industrial Ethernet.
Interface Parameter
CP5611 Assignment Used:
CP5611 (MPI)
CPU
General You use the "Set PG/PC Interface" tool to define the connection between an
application such as STEP 7 and a module such as CP 5611. The tool is
activated with Start Æ Settings Æ Control Panel .
Interface Parameter Here, enter the module used, such as, CP5611 and the interface used, such
Assignment Used as, MPI. If you connect the PG to the Profibus, use the setting CP5611
(PROFIBUS). To save a switch-over of the PG/PC interface, you can also use
the setting CP5611 (Auto). The bus parameters are then automatically
determined. With this setting, however, the connection takes longer.
Properties In this tab, you adapt the parameters of the interface. For "Address", enter the
MPI address of the PG. This must be unique in the network.
To make communication possible, the "Transmission Rate" and "Highest Node
Address" parameters must be the same for all nodes (stations).
The "PG/PC is the only master on the bus" setting is only activated if only slaves
are connected to the PG.
Diagnostics With this, you can check whether a connection can be made.
PG 740
MPI
PROFIBUS/Ethernet
Overview With PG Routing, you can use PG functions from a fixed location in the network
even across various subnets. During network configuration with STEP 7, special
routing tables are automatically generated for the gateways. These routing
tables contain system data and must be loaded in the S7-CPUs or CPs in the
associated gateways.
Properties With the PG, all S7 stations that were configured within an S7 project during
network configuration can be reached from a central location in the network that
you choose. User programs or a hardware configuration can be loaded with it or
test and diagnostic functions can be executed, for example.
Area of Use This type of connection provides you with quick access, such as for service
purposes. You can access all accessible programmable modules (CPUs, FMs,
CPs) in the network. You choose this method when you don‘t have any project
data about the target systems on your PG.
What to Do You can activate the "Accessible Nodes" window with the menu options PLC Æ
Display Accessible Nodes. In the "Accessible Nodes" object, all accessible
programmable blocks in the network are displayed with their address.
Note Nodes (stations) that are not programmable with STEP 7 can also be displayed
(such as programming devices or operator panels). On the CPU to which the
PG is connected, the addition (direct) is displayed. In the slide, the CPU with the
MPI address =4.
Offline View In the project window of the SIMATIC® Manager, the offline view displays the
project structure stored on the hard disk of the programming device.
• The "S7 Program" folder contains the "Sources" and "Blocks" objects.
• The "Blocks" folder contains the system data created with the HWConfig t
tool and the blocks created with the LAD/STL/FBD Editor.
Online View The online view shows the offline project structure in the left window and in the
right window it shows the blocks stored online in the selected CPU.
As a result, the "S7 Program" seen in the online view only contains the "Blocks"
folder which contains the following objects :
• System data (SDB)
• User blocks (OB, FC, FB)
• System blocks (SFC, SFB).
The titlebar in the online window is highlighted in color.
Changing Views Changing between offline and online view takes place:
• through the View Æ Offline or View Æ Online menu items
or
• with the corresponding icon in the toolbar :
- Online
- Offline
Note You can arrange the "ONLINE" and "OFFLINE" views next to each other (as in
the slide) or under each other with Window Æ Arrange Æ vertical
(horizontal)
Icon
or
Icon
or
Reason When a Micro Memory Card is used in the PLC, the user program is retained
after a memory reset. The following possibilities are available for erasing.
What to Do The Micro Memory Card (MMC) can be erased online through direct access to
the CPU or offline by using an appropriate interface in the programming device:
Erasing Online • In the SIMATIC Manager use the menu options "PLC Æ display accessible
nodes" to select the objects (blocks, files or S7 project archives). Press the
<DEL> button to erase online on the CPU.
or
• In the SIMATIC Manager use the menu option "View online" to get an online
view and select the objects (blocks, files or S7 project archives). Press the
<DEL> button to erase online on the CPU.
Erasing Offline 1. Insert the Micro Memory Card in the slot on the PG and, in the SIMATIC
Manager, press the icon you see to the left.
2. Thereupon, a new window opens which displays the contents of the Micro
Memory Card.
3. With the right mouse button, click on S7 Memory Card and choose the
menu option Delete. Individual objects (blocks, files, projects) can also be
erased.
RUN RUN
1. Set the mode selector switch to STOP STOP
MRES
STOP
MRES
RUN-P
2. Hold (Press) the mode selector switch in the MRES RUN
RUN
position until the STOP LED has flashed twice slowly. STOP
Release the mode selector switch so that it returns to MRES
STOP
the STOP position.
MRES
within 1 sec
RUN-P
RUN 3. Turn (Press) the mode selector switch to the MRES posi- RUN
tion once more until the STOP LED begins to flash quickly. STOP
STOP
Release the mode selector switch so that it returns to MRES
the STOP position.
MRES
RUN-P
RUN RUN
4. Set the mode selector switch to the RUN-P (RUN)
STOP
position ! (A warm restart is carried out in the transition MRES
STOP from STOP to RUN/RUN-P)
MRES
Memory Reset A memory reset can also be initiated from the PG.
When a memory reset is performed on an S7 CPU, the following happens:
• all CPU user data as well as the entire load and work memory are cleared
• the CPU interrupts all connections to other communications partners
• the CPU parameters and all modules are set to default values
• in the case that a memory card is used, the CPU copies the relevant portion
of the stored program needed for execution into the internal RAM
Important When a memory reset is performed, only the work memory and the RAM load
memory of the CPU (insofar as it exists) are cleared, not the contents of the
inserted Memory Card (EEPROM or MMC)!
If the inserted Memory Card still contains a user program, this is automatically
reloaded into the CPU‘s work memory after the memory reset and subsequent
warm restart. Should this not be desired, you must explicitly erase the memory
card before the memory reset, as previously described.
HW Configuration The modules are supplied from the factory with preset parameters. If these
default settings are OK, a hardware configuration is not necessary.
A configuration is necessary:
• if you want to modify preset parameters or addresses of a module (such as
to enable the hardware interrupt of a module)
• if you want to configure communication connections
• with stations that have distributed peripherals (PROFIBUS-DP)
• with S7-400™ stations that have several CPUs (multicomputing) or
expansion racks
• with fault-tolerant programmable logic controllers (option package).
Actual Configuration In an assembled system, the actual existing configuration and parameter
assignment of the modules can be uploaded from the CPU. This creates a new
HW station in the project.
A configuration upload is necessary, for example, if the project structure does
not exist locally at the PG. After the actual configuration is read out, you can set
parameters and add part numbers.
Notes With the S7-400™, the CPU can be assigned parameters in such a way, that
when there are differences between the setpoint configuration and the actual
configuration, the CPU startup is interrupted.
To call the HW Config tool, there must be a hardware station in the SIMATIC®
Manager.
Insert Station You insert a new station in the current project by selecting the menu options
Insert Æ Station Æ SIMATIC® 300 Station or SIMATIC® 400 Station.
Generating a This means specifying how the modules are to be arranged in the rack. This
Setpoint configuration, specified by you, is referred to as the setpoint configuration.
Configuration
Rack For example, you open a SIMATIC® 300 station in the Hardware Catalog.
Opening the "RACK-300" folder shows the icon for a DIN rail. You can insert this
in the "Hardware Configuration" window by double-clicking on it (or using drag &
drop).
Two rack component lists then appear in the two-part window: a plain list in the
top part and a detailed view with order numbers, MPI addresses and I/O
addresses in the bottom part.
Power Supply If a load current power supply is required double click or use drag & drop to
insert the appropriate "PS-300" module from the catalog in slot no.1 in the list.
CPU You select the CPU from the "CPU-300" folder, for example, and insert it in slot
no. 2.
Slot No. 3 Slot no. 3 is reserved as the logical address for an interface module (for multi-
tier configurations). If this position is to be reserved in the actual configuration
for the later installation of an IM, you must insert a dummy module DM370
(DUMMY).
"Inserting" Modules From slot no. 4 onwards, you can "insert" a choice of up to 8 signal modules
(SM), communications processors (CP) or function modules (FM) from the
"HardwareCatalog" using drag & drop or with a double-click. The slots on which
the selected module can be inserted are automatically highlighted in green.
Result
Distributed I/O All master systems consisting of a DP master and DP slaves that are connected
using a bus cable and that communicate via the PROFIBUS-DP protocol are
designated as distributed I/Os.
DP Slave
1. From the "Hardware Catalog" select the desired compact DP slave (such as
ET200B) or the interface module (such as IM151-1 Standard for ET200S) for
a modular slave.
2. Drag the symbol (such as IM151-1 Standard for ET200S) onto the symbol for
the master system:
The dialog box "Properties – PROFIBUS interface DP" is opened. Here you
can set the following properties:
• properties of the PROFIBUS subnet (baud rate, etc.).
• the PROFIBUS address of the DP slave.
4. For a modular DP slave, you now insert the desired modules from the
"Hardware Catalog" into the configuration table.
The addressing and parameter assignment of the modules is then handled
similar to the configuration of the centrally inserted modules.
Modify Value Valid You can make the "Modify value" entered in a table invalid by selecting that
value and clicking on the icon. The now "invalid" value is displayed like a
comment. You can make the modify value "valid" again when you click on the
icon again. Only valid modify values can be activated.
Saving the You can use Table Æ Save or Table Æ Save as... to save a variable table.
Variable Table You can give the variable table any name you choose. The name is inserted as
the symbolic name in the symbol table.
You can reuse saved variable tables for monitoring and modifying, making it
unnecessary to re-enter the variables to be monitored.
Accessible CPUs
Configured
Directly CPU
connected
Station 1 (VAT from Station 2 Station 3
CPU HW Station
"Station 2")
PG
Area of Use Variable tables that are stored in a Blocks folder of an S7 program can be
reopened at a later time for test purposes by double-clicking on them.
However, before you can activate the "Monitor" and "Modify" functions, an
online connection to a CPU has to be established.
For this purpose, the menu commands PLC Æ Connect to . . . or the
associated icons in the toolbar provide the following possibilities:
Configured CPU If the variable table is stored in the Blocks folder of a hardware-dependent S7
program (assigned to a CPU in the project view), a connection to the station
with the MPI address is established. This station was also assigned to the
higher-level CPU with the help of the HW Config tool.
If the variable table is stored in the Blocks folder of a hardware-independent S7
program folder (assigned directly to the project root in the project view), the
MPI address of the hardware-independent S7 program can be established
using the Properties dialog of the program folder while in the online view of the
SIMATIC® Manager.
Direct... A connection is established to the CPU that is directly connected to the PG/PC
via the PG-MPI cable. The PG can determine to which PLC it is connected
through the MPI cable.
Accessible CPU In this case, a dialog is displayed with the project view. In this dialog, you can
select a program folder. An online connection can then be established to its
configured CPU.
Function and The "Enable Peripheral Outputs" function can only be activated when the CPU
Area of Use is in the STOP state.
It switches off the output disable of the peripheral outputs (PQ). This enables
you to modify the peripheral output even though the CPU is in the STOP mode.
The "Enable Peripheral Outputs" function is used to check the functioning of the
output modules and the wiring of the peripheral outputs.
Note When you change the operating mode of the CPU from STOP to RUN or
STARTUP, the Enable Peripheral Outputs is deactivated and a message
appears.
MRES
RUN-P
2. Hold (Press) the mode selector switch in the MRES
RUN RUN
position until the STOP LED has flashed twice slowly.
STOP
Release the mode selector switch so that it returns to MRES
STOP the STOP position.
MRES
within 1 sec
RUN-P
RUN 3. Turn (press) the mode selector switch to the MRES posi- RUN
-tion once more until the STOP LED begins to flash quickly. STOP
STOP
Release the mode selector switch so that it returns to MRES
the STOP position.
MRES
RUN-P
RUN RUN
4. Set the mode selector switch to the RUN-P (RUN)
STOP
STOP
position. (A warm restart is carried out in the transition MRES
from STOP to RUN/RUN-P)
MRES
Task You are to perform a CPU memory reset and check whether the memory reset
was successful.
What to Do 1. If a CPU with MMC is used at your training area, the MMC must first be
explicitly erased.
For example, SIMATIC Manager Æ Accessible Nodes Æ in the Blocks
folder select all blocks Æ Delete
2. Carry out the memory reset according to the steps in the slide above
(manually and from the PG).
3. Check if the memory reset was successful. It was successful if only system
blocks (SDBs, SFCs, SFBs) are left in the CPU
SIMATIC Manager Æ Accessible Nodes Æ Double-click on MPI=2
Æ Click on Blocks
Notes To make sure that no "old" blocks are left in the CPU, a memory reset of the
CPU should be performed. The following steps are carried out during a memory
reset:
• All user data is deleted (Exception: MPI parameter assignments and the
contents of the diagnostic buffer are retained).
• Hardware test and initialization
• If an Eprom memory card or a Micro Memory Card (MMC) is installed, the
CPU copies all data on the cards that is relevant for execution back into the
internal RAM after the memory reset.
• If no memory card or Micro Memory Card is installed, the preset MPI
address on the CPU is retained. If, however, a memory card is installed, the
MPI address stored on it is loaded.
Task The PG‘s interface is to be switched to MPI so that an online connection to the
CPU can be established.
Task You are to retrieve a project and save it under the name "My_Project".
Notes The project contains a WinCC flexible project for the TP170B touchpanel as well
as a hardware-independent S7 program for controlling the conveyor model.
Task A hardware station is to be created in the project and the already existing S7
program "My_Program" is to be assigned to the CPU of the hardware station.
Note When assigning an S7 program to a CPU, its complete program folder with all
blocks including the system data and the symbol table are overwritten. The
system data lost in the process must then be regenerated with the "HW Config"
tool.
Open the HW Station with HW Config Æ Menu Station Æ Save and Compile
What to Do (also see the steps to be done that are shown in the slide)
1. In your project, create a hardware station by reading out your training unit
PLC Æ Upload Station
2. Copy or pull, using drag&drop, the S7 program called "My_Program" to the
CPU (the system data that gets lost in the process will be recreated in the
next exercise).
3. Delete the hardware-independent program called "My_Program".
Check whether the structure of your project corresponds to the one shown in
Picture 3.
Result Your project structure corresponds to the structure of your training unit. It
includes an S7 station with a CPU that contains an S7 program called
"My_Program".
What to Do 1. Complete the actual configuration in such a way that it corresponds exactly to
your training station (with power supply module and the order numbers of all
modules).
2. Parameterize the MB 10 memory byte as CPU clock memory byte.
3. Parameterize the measuring range ±10V for the input channels 0 and 1 of the
OFF ON analog input module and deactivate (if they exist) all other input and output
channels.
64
32 4. Expand the existing configuration to include the distributed (remote) station
ET 200S (additional connection possibility for the conveyor model).
16
5. On the IM 151-1‘s address switches, set the Slave Address to 4
8
(see slide left)
4
Note: Changes to the slave address only take effect after Power ON/OFF!
2
1 6. Change the addresses of the mixed DI/DO module in the UR0 Universal
Rack to IB 88 and QB 88.
7. As the input and output addresses in the ET200 S, configure the addresses
IB 8 and QB 8.
Note: So that the 8 channels of a module are located in one byte, you have to
pack the addresses. To do so, select both modules and then click on "Pack
Addresses" (see slide)
8. After "Save and Compile" download the configuration into the CPU.
9. Verify that the configuration is error-free. The error LEDs – Group error (SF)
and bus error (BUSF) must be dark on the CPU.
ET200S
Example: Q 8.5
(Conveyor to right)
Task The wiring of the conveyor model‘s sensors and actuators to the distributed
peripheral station ET200S is to be checked.
If you should encounter any kind of error, please let your instructor know!
Advanced
Advanced Demo
- Complete funtional scope
Standard - Limited to a max. 30 days
Compact
*) Option
Micro
E n g i n e e r i n g (ES)
R u n t i m e (RT)
RT Options
SIMATIC S7 Date: 13.06.2007
SITRAIN Training for
Automation and Industrial Solutions
Siemens AG 2007. All rights reserved. File: SERV3_02E.26
WinCC flexible The Engineering System (ES) is the software with which you carry out all the
Engineering System necessary configuring tasks in order to create an interface for controlling and
monitoring machines and systems.
Editions The Engineering System of WinCC flexible is modularly graded into different
editions. The edition determines which operator panels of the SIMATIC HMI
spectrum can be configured.
With each higher edition, a wider range of target devices and functions is
supported. The configuration data is compatible.
Micro: Configuring the micro panels
Compact: Configuring the micro panels and panels of the 70 and 170 series
Standard: Configuring all panels (micro panels, panels of the 70/170/270 and
370 series)
Advanced: Configuring the PC-based and all other panels (micro panels,
panels of the 70/170/270/370 series and PC Runtime)
Advanced Demo:Test version limited to 30 days
Changing the WinCC With the WinCC flexible Compact edition and above, you can change to a higher
flexible Edition WinCC flexible edition with a "Powerpack".
Runtime WinCC flexible Runtime (RT) is the software for process visualization on the
operator panel. With Runtime, you execute the project during process operation.
The various panels already come delivered with operating system and the
appropriate Rutime version. Possible, additionally required Runtime components
are loaded along with the project onto the panel.
PC/PG
WinCC flexible
PC/OP/TP
Configuration Configuration
data data Flash Flash
Source file
<Name>.hmi
Ethernet MPI
DP
PLC
Introduction You configure your project on a PC or programming device (PG). You then
generate the configuration under WinCC flexible and download it to the
PC/OP/TP.
If the PC/OP/TP is connected to the PLC, the PC/OP/TP displays the current
values in the tags and graphics. The three phases of working with the
configuration data are shown in the slide.
1. Defining the PLC and the type of connection (MPI, PROFIBUS DP,
Industrial Ethernet etc.)
2. Making general settings for the PC/OP/TP (defining the current
connections etc.)
3. Generating objects such as tags, screens, messages etc.
4. Downloading (transferring) the generated database to the HMI system via
MPI, PROFIBUS DP, or Industrial Ethernet
Editors WinCC flexible includes a set of editors (tools) for configuring the different types
of objects. You create each object under a symbolic name. You must specify
this symbolic name time and again, for example, when creating, editing,
referencing or deleting the object.
Transfer PROFIBUS OK X
Panel is the only master on bus
Start
Station Parameters
Address: 1
Control
Panel Time-out: 1s
NetworkParameters
Transmission Rate: 1.5 Mbits/s
Profile: DP
Bus Parameters…
Transfer Settings OK X
Channel Directories
S7-Transfer Settings OK X
Channel 1:
Enable Channel MPI
Serial:
Remote Control PROFIBUS
Channel 2:
MPI/ Enable Channel
Properties...
Profibus
Remote Control Advanced
Task The interface of the TP170B is to be set up as in the slide, so that the WinCC
flexible project can then be downloaded from the PG to the panel.
Before you can parameterize the interface, you must exit Runtime. For this,
there is, as a rule, a button in the Start screen for doing so. After exiting
Runtime, the "Loader" appears through which the "Control Panel" (see slide)
can be activated. The Loader also appears after every voltage recovery.
Task So that the WinCC flexible project can be downloaed from the PG onto the
touch panel, the PG‘s interface parameters and the transfer settings of the
touch panel must both be parameterized to PROFIBUS DP.
What to Do 1. Change the PG‘s interface to PROFIBUS DP. Use the parameters shown in
the slide.
Attention:
For "Interface Parameter Assignment Used" DO NOT select "PROFIBUS -
DP Slave"
2. Plug the PG‘s online cable onto the CPU‘s PROFIBUS plug.
Note The "active" and "passive" node properties indicate whether a node can (active)
or cannot (passive) initiate communication to another node.
Task So that the panel‘s Runtime can communicate with the S7 station during the
process control phase, the panel‘s interface must be parameterized with the
HW Config tool.
What to Do Using the HW Config tool, check the parmeterization of the panel‘s interface. If
necessary (see slide) make the appropriate corrections.
2xL
Task Make a connection so that the panel‘s Runtime communicates with your training
unit.
Task The given WinCC flexible project "TP_170B_Color" is to be downloaded into the
panel.
What to Do 1. Activate the Transfer function and make the settings as shown in the slide
2. Start the data transfer to the panel using "Transfer"
Contents Page
Objectives .......................................................................................................................................... 2
System Description: The Conveyor Model as Distribution Line ........................................................ 3
Check List for SW Commissioning .................................................................................................. 4
STEP7 – Debugging Tools, Overview .............................................................................................. 5
Eliminating Stop Errors ................................................................................................................... 6
Diagnostics with I Stack, B Stack, L Stack ..................................................................................... 7
Displaying the Hardware Diagnostics .............................................................................................. 8
Exercise 1: STOP Troubleshooting .................................................................................................. 9
STOP Troubleshooting ..................................................................................................................... 10
Displaying Cross References ........................................................................................................... 11
Go To Location ............................................................................................................................... 12
Step-by-Step Function Test of the System ....................................................................................... 13
Program Test with PLCSIM ............................................................................................................... 14
Program Structure of the S7 Program Provided .............................................................................. 15
Exercise 2: Commissioning - Startup Program and Operating Mode Section ................................. 16
Exercise 3: Commissioning - Checking the Weight ........................................................................ 17
Exercise 4: Commissioning - Controlling the Conveyor Motor ........................................................ 18
Exercise 5: Commissioning - Monitoring the Transport Functions ................................................... 19
Exercise 6: Commissioning - Conveyor Model – Indicator Lights .................................................... 20
Exercise 7: Commissioning - Counting Parts and Statistics .......................................................... 21
If You Want to Know More ............................................................................................................... 22
The Data Type: STRUCT (Structures) ............................................................................................. 23
Declaration of STRUCTs ............................................................................................................... 24
User-defined Data Types: UDT ........................................................................................................ 25
Using UDTs ..................................................................................................................................... 26
L_Restart_aut Q 4.6
Preset weight
"QW_DigDisp" (QW 6) "PIW_AI1" (PIW 304)
Start Position
Start Pushbutton
Conveyor Model as Parts are laid on the coveyor at the light barrier bay and weighed. After you press
Distribution Line the pushbutton at the light barrier bay, the part is transported to the first free bay
(1, 2 or 3) and counted.
Operation The distribution line can be operated completely from the touchpanel. Messages,
such as, System ON or conveyor fault are displayed on the touchpanel as well as
on the simulator. Statistical values (quantities and utilization of Bays 1 to 3) can
be preselected via the BCD thumbwheel and are displayed on the BCD digital
display. These values are displayed on a separate screen on the touchpanel.
Operating Modes The system can be switched on and off via the buttons "System On" and "System
Off". When the system is turned on, either the MANUAL or AUTO mode can be
preselected using the button "M/A-ModeSelect" and then switched on using the
button "Accept".
MANUAL Mode In Manual mode, you can move the conveyor in the desired direction using the
buttons "Jog right" and "Jog left".
AUTO Mode When AUTO mode is switched on, the indicator light at the light barrier bay
indicates with its continous light that a new part can be placed in the light barrier
if …
• …a valid weight is set on the simulator potentiometer (100 < weight < 400)
• …at least one of the Bays 1 to 3 is free (bay indicator light is dark)
• …there is no conveyor fault (LED "L_Conv_Fault" or display on the TP)
Transport is started by pressing the pushbutton at the light barrier bay. As soon
as a part reaches an empty bay, the conveyor motor is stopped. A 2Hz flashing
indicator light indicates that the part can be removed from the conveyor. The bay
is still considered to be occupied even though the part has been removed and is
only enabled when the bay pushbutton is pressed to acknowledge the change.
Each transport function is monitored for time. If it takes longer than 6 seconds,
there is a fault and the conveyor motor is automatically switched off.
Hardware Make sure that the hardware commissioning was carried out.
Commissioning For this, a visual control of the LEDs on the modules was carried out and the
sensors and actuators were checked with the "Monitor/Modify Variables" tool.
Stop Errors After a warm restart, errors can now occur that lead the CPU to Stop. You can
localize these with the "Module Information" tool and eliminate them.
Function Test After the Stop errors have been eliminated, you have to check the correct
of the System functioning of the system. If the user program is a structured program, you can
carry out the commissioning step-by-step, by enabling the block calls one after
the other in the organization block.
Saving and Archiving The final version of the program is transferred to diskette when commissioning
the Program is completed. So that the project can fit onto a diskette, it must be archived
(compressed).
Debugging Tools:
Debugging Tools:
• Module Information
• Monitor / Modify Variables
- Diagnostic buffer
• Monitor Blocks (Block Status)
- I STACK
• Reference Data
- B STACK
- Cross References
- L STACK
- Assignment of I/Q/M/T/C
• Hardware Diagnostics
- Program Structure
- Addresses without Symbols
- Unused Symbols
Using There are various STEP 7 test functions for troubleshooting, depending on the
Test Functions ... type of error caused:
…when CPU in STOP For errors that are detected by the system, the test functions Diagnostic Buffer, I
STACK, B STACK, L STACK and Hardware Diagnostics give detailed
information on the cause of the error and the location of the interruption. By
programming Error OBs (see the chapter on Organization Blocks), information
on the error that occurred can be evaluated by program and the transition of the
CPU into the STOP state can be prevented. If the CPU has stopped, the use of
the test functions Monitor / Modify Variable and Monitor Blocks makes little
sense since the CPU neither reads nor outputs process images while in the
STOP state, and also no longer executes the program.
…when CPU in RUN Vice versa, it makes little sense, as a rule, to use test functions such as I
STACK, B STACK or L STACK for troubleshooting when the CPU is in RUN,
since program execution has not been interrupted and the system does not
provide any information on the error that occurred. The Module Information test
function merely provides general information on the CPU‘s operating mode or
on errors that occurred in the past. Functional errors can be diagnosed as
follows:
• Process Fault (such as a wiring error)
- wiring test of the inputs: Monitor Variable
- wiring test of the outputs: Enable Peripheral Outputs (only when CPU
STOP)
• Logical Programming Errors (such as a double assignment)
- All test functions listed, with the exception of Enable Peripheral Outputs ,
can be used for searching for logical program errors.
Introduction If no program was written for an error organization block or the error OB
contains the call of the SFC block "STOP", then the CPU goes into the Stop
state when there are program errors or hardware faults. You can determine the
cause of the Stop from the diagnostic buffer.
The diagnostic buffer is a part of the "Module Information" tool. It can be
accessed from the SIMATIC Manager or from the Program Editor by selecting
the menu options:
Diagnostic Buffer The diagnostic buffer is is a FIFO buffer in a battery-backed memory area in the
CPU that cannot even be deleted by a memory reset. It contains all diagnostic
events in the order in which they occurred.
All events can be displayed on the programming device in plain text and in the
sequence in which they occur.
Details on Event When you select an event, additional information is supplied in the "Details on
Event" box:
• Event ID and event number,
• additional information, depending on the event, such as the address of the
instruction that caused the event,
• etc.
Open Block When you click on the box, the block in which the error
occurred can be opened in the CPU.
Point of interruption
You can see the contents of the You can see the values of the
accumulators, registers, status word temporary variables at the
etc. at the time of interruption in the
time of interruption in the L stack.
I stack.
Introduction For synchronous errors (OB 121, OB122) it may make sense, depending on the
circumstances, to display further information about the cause of the error or its
location using the stack contents (I stack, B stack, L stack). That way, you can
determine for example, which values were stored in the accumulators at the
time when the CPU went into STOP.
B Stack Blocks are often called several times in a user program. This means that the
information concerning the block number and the instruction causing the
interruption does not clearly indicate in which call chain the error occurred.
The B stack contains a list of all those blocks called whose execution at the time
of the transition to the STOP state were started but were not as yet completed.
I Stack The I stack contains the contents of the registers at the time of interruption:
• contents of the accumulators and address registers
• which data blocks are open
• contents of the status word
• program execution level (such as OB 1 or OB 10)
• interrupted block specifying the network and the number of the instruction
• next block to be executed
L Stack The L stack contains the values of the temporary variables of the blocks. You
need some experience to evaluate this data however, since the contents are
given in a "Hex Dump" rather than in "plain language".
Twice
Diagnosing Hardware The function opens the station that can be accessed online and gives you
information about the status or operating mode of the modules. You can see that
there is diagnostic information for a module when you see the diagnostic symbols
that indicate the status of the associated module or the operating mode of the
CPU. When you double-click the symbol, a screen with further information pops
up.
In the example shown, the analog input module (slot 7) has triggered a diagnostic
interrupt. As a result, the CPU has gone into the STOP mode. Both modules have
been given symbols accordingly. By double-clicking the CPU, you would see the
diagnostic buffer. By double-clicking the analog module, you would be given the
relevant diagnostic data. In the example, the external auxiliary voltage (supply
voltage) of the analog module has failed.
Customizing Settings If you have selected the Options Æ Customize Æ View menu options in the
SIMATIC® Manager and activated (checked) the "Display Quick View when
Diagnosing Hardware" checkbox, only a list of faulty modules will be displayed
instead of the full "Diagnosing Hardware" view.
Note You will find an actual application example on this test function in the Analog
Value Processing chapter.
Task The previously described S7 program for controlling the conveyor model is now to
be commissioned. It contains 3 STOP errors that you are to find and eliminate so
that the CPU remains in RUN after a warm restart.
What to Do Please note, that after every STOP error correction, you must carry out a CPU
warm restart. If, after the warm restart, the CPU once again goes into the STOP
state, there still exists a further STOP error.
1. Create a backup copy of the S7 program provided which is called
"My_Program" and rename it "Backup_Program".
2. Download all the blocks of the S7 program "My_Program" into the CPU and
carry out a warm restart.
3. Search for and correct the 3 STOP errors and while making the corrections
answer the questions of the following page.
Note In addition to the errors (STOP errors) detected by the system, the program also
contains functional errors (RUN errors) so that the correct program function is still
not established after the STOP errors have been eliminated. The RUN errors will
be eliminated in the next exercises.
What to Do Please note, that after every STOP error correction, you must carry out a CPU
warm restart. If, after the warm restart, the CPU once again goes into the STOP
state, there still exists a further STOP error.
During error correction, answer the following questions on the errors that occur:
error: ................………………………………………….......................................
correction: (old instruction Æ new instruction)
……….……...………..………………………………………………………...…….
error: ........……………………………………………….......................................
correction: (old instruction Æ new instruction)
………………………………...…………………………………………………….
Even if it is not necessary for troubleshooting here:
From the B STACK determine in which block the FC 28 is called and a faulty
actual operand is passed:
Block called: ...........…………………………………… ……………………….…
From the I STACK determine which data block was open via the DB Register 1
at the time of interruption:
Data block opened via DB Register 1: …….....................……………………..…
error: ...............………………………………………….......................................
correction: (old instruction Æ new instruction)
……………...……………………………………………………………………….
Even if you already know the solution:
Open the SIMATIC station with HW Config and check what the correct
peripheral addreass must be.
Area of Use The Cross References (list) gives you information about how which addresses
are used in which blocks (with which instruction). Thus, you can find out, for
example, where in the entire user program a memory bit is (double) assigned.
You open the cross references with View Cross Æ References or by clicking the
icon you see here on the left.
You can display the cross references for all inputs, outputs, bit memories,
timers, counters, blocks (except OBs), peripheral inputs and outputs.
Cross Reference of When you select an address in the cross reference list, you can open a new
Individual Addresses window using the right mouse button and View Æ Cross Reference for Address.
This window contains only the cross references for this one address.
Structure The cross references list is structured as a table. This list has the following
columns:
• Address (Symbol): absolute address of the operand
• Block (Symbol): block in which the address is used
• Type: read-only (R) or write-only (W) access
• Language: programming language in which the block was
created
• Location: network and instruction which uses the address
1 x right
Function and In troubleshooting, it is often necessary only to determine where one address is
Area of Use used or assigned in the program. In this case, it makes more sense to call the
"Go To Æ Location" function instead of the cross references list. The Go to
Location is called directly from the LAD/FBD/STL Editor and gives you an
excerpt from the cross references list for the specific address.
When you select the option Overlapping Access to Memory Areas, word-by-
word accesses to an address are also displayed, for example.
Handling Using the right mouse button, click on the address. The Go to Location dialog
window appears. Its entries have the same meaning as those in the cross
references.
If an entry is of particular interest or an indicated program location is to be
shown, you use Go To Æ Location to open the indicated block with the Editor.
In the above example, the program location at which the input I 0.2 is scanned
(Access Type R) is of interest. After selecting the relevant line, you can use the
Go To button to open FC 17, NW 5 directly.
When you click the Starting Point button, you return to the beginning.
Type of Access By default, all accesses to the addresses are displayed. When you choose
"Selection", you can display, for example, write-only accesses (assignment, set,
reset).
6 5 4
FC 1 FC 2
Scan
cycle DB 4
3 2
FC 3 FB 4
FB 4
7
Hardware
interrupt
8
Cyclic
interrupt
x Sequence for program test
Introduction You can carry out the commissioning of a structured program (every block
contains a specific system function) step-by-step.
What to Do Download the user program with the exception of the organization blocks. That
way, the blocks are not yet executed.
Now, as a first step, you can test the start-up characteristics by downloading the
OBs for the startup (OB 100-OB102).
The cyclic program can now be tested step-by-step, that is, beginning with the
block in the highest nesting depth (in the example FB 4). For this, the necessary
block calls are inserted in OB 1. Then you can commission system sections, that
consist of a group of blocks (in the example FC 1). To do so, insert a network
with the instruction BEU into OB 1 (which contains all block calls). Move this
network through the program until all blocks are called.
Depending on the program structure, the program sections for interrupt handling
are either tested at the end (if the interrupt program doesn‘t intervene in the
cyclic execution) or are integrated in the test of the cyclic program.
Area of Use With S7-PLCSIM (option package), you can process and test your program on a
simulated automation system that exists on your computer or programming
device.
Since the simulation is implemented completely in the STEP 7 software you
don‘t need any S7 hardware (CPU or signal modules).
With the simulated S7-CPU, you can test programs for S7-300 and S7-400
CPUs and eliminate errors.
S7-PLCSIM offers you a simple operator interface for monitoring and modifying
the various parameters that are used in your program (to switch on and switch
off inputs, for example). While your program is being processed by the
simulated CPU, you can run the STEP 7 software to monitor and modify
variables with the variable table (VAT), for example.
That way, the program quality can be increased and commissioning time
reduced.
Functions The following functions are available for testing the user program:
• continuous scan or single scan mode,
• display of Tabs,
• simulation of inputs, outputs, bit memories, timers, counters, and data,
• ActiveX Control for exchanging process values with another application.
Call The simulation software is called directly from the SIMATIC Manager with the
icon
Application The program structure describes the call hierarchy or the nesting of blocks in an
S7 user program.
Block, Instance DB Displays the name of the block and the associated instance DB. If "Display
absolutely and symbolically" was selected in the filter settings, the symbolic
name for both is also displayed.
Local Data (in Path) Displays the sum of the bytes needed in the CPU for local data that are required
for the called blocks of a call path up to the respective block.
Language Shows the language for the calling block that is located one level up in the call
hierarchy.
Location Shows the language-dependent location of the call position in the calling block
that is located one level up in the call hierarchy.
Local Data Displays the number of bytes for local data that are needed in the CPU for the
call of the block.
DI DO
L_Weight_invalid Q 4.0
L_SYSTEM Q 4.1
L_MAN Q 4.2
L_AUTO Q 4.3
L_Restart_man Q 4.5
L_Restart_aut Q 4.6
Function (OB100) A manual warm restart (CPU STOP->RUN) is indicated with the simulator LED
Startup Program "L_Restart_man" (Q 4.5); an automatic warm restart (power recovery) with the
simulator LED "L_Restart_aut" (Q 4.6).
Function (FC 15) The system is switched on via the touchpanel button "System On". It is switched
Operating Mode off via the button "System Off". The state is indicated with the simulator-LED
Section "L_SYSTEM" (Q 4.1) and displayed on the touchpanel.
When the system is switched on, the warm restart indicators "L_Restart_man"
(Q 4.5) and "L_Restart_aut" (Q 4.6) are automatically acknowledged.
When "L_SYSTEM" (Q 4.1) is turned on, a MAN mode or an AUTO mode can
be preselected via the button "M/A-ModeSelect" and then switched on using the
button "Accept". With every preselect change, the mode currently active is
switched off.
What to Do 1. Open the OB1 block and after the "Call FC 15" instruction, insert the
instruction "BEU" (Block End unconditional).
2. On the touchpanel select the "Conv" screen.
3. Correct the program (S7 program and/or the touchpanel program!) so that
the above-described functions are established.
Note You will eliminate the problem of the flashing simulator LED "L_Weight_invalid"
in the next exercise.
Message when
invalid
weight
Display
of current
weight
Function (OB35) The part weight (0 to 500kg) is simulated via the simulator potentiometer
Weight Check "PIW_AI1" (PIW 304) and displayed on the touchpanel in the screen "Conv".
As long as an invalid weight (weight < 100kg or weight > 400kg) is set…
• … the simulator indicator light "L_Weight_invalid" (Q 4.0) flashes
• … a message exists on the touchpanel in the screen "Messages"
• … a display window appears once showing the message
Note The conveyor model indicator lights don‘t show any signals as yet since the
corresponding program section (FC 14) has not yet been commissioned. In this
block, however, the maintenance, of which bay is empty and which one is
occupied or has not yet been acknowledged, is also programmed.
Consequently, all bays are currently always "empty". Since a transport function
always ends at the first "empty" bay, this now always happens at Bay 3.
Function (FC 16) The control of the conveyor motor is programmed in FC 16 and is to function in
Conveyor Control the MANUAL and AUTO modes as follows:
MANUAL Mode When MANUAL mode is switched on, you can move the conveyor using the
buttons "Jog left" and "Jog right".
What to Do 1. Open the OB1 block and move the instruction "BEU" (Block End
unconditional) to behind the instruction "Call FC16".
2. On the touchpanel, select the "Conv" screen.
3. Test the jogging to the RIGHT and LEFT while in MANUAL mode.
4. Set a valid weight (100 < Weight < 400) and check the transport while in
AUTO mode.
5. Correct the program (S7 program and/or the touchpanel program!) so that
the above-described functions are established.
L_Restart_man Q 4.5
L_Restart_aut Q 4.6
T_Ackn L_Conv
I 1.0 Q 5.0
_Fault _Fault
Conveyor Fault:
- Flashing light
- Message
Function (FC 17) The transport functions while in AUTO mode are (timely) monitored. If a
Monitoring transport function takes longer than 6 seconds, the conveyor is switched off and
the fault is indicated with a flashing light on the simulator LED "L_Conv_Fault"
and on the touchpanel in the screen "Conv". As well, a display window appears
with a message that is also output in the "Messages" screen.
Only after the fault has been acknowledged via the touchpanel button
"Acknowledge Fault" or on the simulator via the pushbutton "T_Ackn_Fault"
(I 1.0) can a new transport function be started.
Durchführung 1. Open the OB1 block and move the instruction "BEU" (Block End
unconditional) to behind the instruction "Call FC17".
2. On the touchpanel, select the "Conv" screen and activate the AUTO mode.
3. Test whether a transport function can be started.
4. Check whether the corresponding messages (as shown in the slide) are
output when there is a conveyor fault.
5. Correct the program (S7 program and/or the touchpanel program!) so that
the above-described functions are established.
Function (FC 14) In AUTO mode, the parts are transported from the light barrier bay to the first
Indicator Lights empty bay. When the part reaches the bay, the conveyor stops and the indicator
light the the associated bay indicates with a 2Hz flashing light that the part can
be removed from the conveyor. After the part has been removed, the bay is still
considered to be "occupied" which is indicated by a continuous light on the
indicator light. Only after acknowledging with the associated bay momentary
contact is the bay "enabled".
What to Do 1. Open the OB1 block and move the instruction "BEU" (Block End
unconditional) to behind the instruction "Call FC14".
2. On the touchpanel, select the "Conv" screen
3. Activate the AUTO mode and set a valid weight.
4. Check whether all bays are utilized.
5. Correct the program (S7 program and/or the touchpanel program!) so that
the above-described functions are established.
0 0 0 5 0 0 3 3
Function (FB 18) The parts transported in AUTO mode are counted for each bay. The total
Count Parts/Statistic quantity and the quantities of the individual bays as well as their proportional
utilization are displayed on the touchpanel in the "Statistic" screen.
Function (FC 28) In addition to the weight set on the simulator potentiometer, the above-
BCD Display mentioned quantities can also be displayed on the BCD digital display. For this,
the appropriate preselection must be set on the BCD thumbwheels:
Preselection at IW 2: Display at QW 6:
0001 to 0003 Quantites Bay 1 to 3
0004 Total Quantity
0005 to 0007 Utilization Bay 1 to 3
0008 Current part weight
other Error message 'EEEE'
What to Do 1. In OB1, remove the instruction BEU (Block End unconditional) so that all
blocks are executed.
2. On the touchpanel, select the "Statistic" screen.
3. Compare the values from the Statistic screen with the values that are
displayed on the BCD digital display.
4. Check the above-described functions and correct the program (both the S7
as well as the touchpanel program!)
Note The following pages contain either further information or are for reference to
complete a topic.
STRUCT (Structure):
z Group of Motor: STRUCT
components of Set_Speed: REAL
different data types Actual_Speed: REAL
z Declaration: Enable: BOOL
StructName: STRUCT Disturbance: BOOL
Comp1Name: data type; END_STRUCT
Comp2Name: data type;
...
END_STRUCT
Example:
z Declaration of a variable: Access to the variable
• MotorControl : STRUCT S #MotorControl.ON
ON : BOOL; L #MotorControl.ActualSpeed
OFF : BOOL; T #MotorControl.SetSpeed
SetSpeed : INT; ...
ActualSpeed : INT;
END_STRUCT;
Overview The STRUCT (Structure) data type represents a specific number of components
that can each have different data types. A structure can have up to eight nesting
levels.
A structure can be declared in the declaration part of a logic block, in a global
DB or in a user defined data type (UDT).
The following restrictions apply for the data types of the components of a
structure:
• elementary (no restrictions)
• complex (DATE_AND_TIME, ARRAY, STRUCT, UDT)
• no parameter types
• no FBs (multi-instance model)
Access to STL instructions can be used to access components (elementary data types) of
Components a structure. A component of the structure is addressed using:
• StructureName.ComponentName
A period must be inserted between StructureName and ComponentName as a
separator.
If the nesting depth of the structure is greater, that is, components of the
structure are in turn structures, then access of the lowest components of the
structure is possible using the “name path”, such as:
• StructureName.ComponentName.SubcomponentName. ...
A period must be inserted between the names of components and
subcomponents in each case.
Acceptance of If new initialization values are entered in the declaration view of a DB, these
Initialization changes become effective (valid as actual values) only after the menu option
Values Edit Æ Initialize Data Block has been carried out.
The initialization values of STRUCTs in the declaration of input and output
parameters in FBs are accepted in the instance DB when it is generated.
Example:
z Definition of a new data type (Structure):
UDT1 STRUCT
SetSpeed : REAL; ...
ActualSpeed : REAL; UDT1: STRUCT
Enable : BOOL; Set_Speed: REAL
Disturbance : BOOL;
END_STRUCT; Actual_Speed: REAL
z Access to variables:
L #Motor_1.ActualSpeed
Overview When a data structure repeats itself frequently in a user program or when a data
structure is to be given its own name, then STEP7 permits user defined data
types (UDT= User Defined Data Type) to be defined (like typedef in the high
level language "C").
A task to be solved can be programmed more efficiently through the use of
application-related data types. Users, like manufacturers, can then draft and use
data types adapted for their problem.
Creation of UDTs UDTs are created with the DB Editor or with the text editor and then stored in
the block folder as a block (UDT1 to UDT65535).
A symbolic name can then be assigned to this UDT or to the related data
structure in the global symbol table. A globally valid "template" is created
through a UDT. This template can then be used as often as is desired in the
declaration of new variables or for the creation of global DBs.
FC23
Overview In the above example, UDT5 is created from four components (SetSpeed,
ActualSpeed, Enable, Disturbance) for a drives structure and then inserted in
FC23 in the declaration of in/out parameters.
A one-dimensional ARRAY with 10 components of the UDT5 data type is
declared in FC23.
Initial Values for User defined data types are pre-assigned and then used in the user program
UDTs just like structures. The structure of a UDT is the same as that for a STRUCT.
The declaration of variables that can be processed by the user program, has not
yet taken place with the creation of a UDT. The UDT is a "template" that you can
use as often as you like for the declaration of new variables.
Just as with a structure, you can also define initial values in the UDT. If the UDT
is then used for the declaration of a variable, the contents of these variables are
initialized with the initial values of the UDT (not for parameters in FCs, for in/out
parameters of FBs and temporary variables).
Creation of DBs A UDT can also be used as a pattern for the creation (Dialog: New Data Block)
of a global data block. In this case, a DB is set up with the same structure and
with the initial values of the respective UDTs.
Contents Page
Objectives ........................................................................................................................................ 2
Block Overview in STEP 7 ............................................................................................................... 3
Variables - Overview ........................................................................................................................ 4
Total Usage of the Local Data Stack ................................................................................................. 5
IEC Counter and Timer Functions ........................................................................................................ 6
Exercise 1: Replacing Traditional Counters with IEC Counters (SFBs) .......................................... 7
Exercise 2: Replacing the Traditional Timer Function with IEC Time (SFB) ................................... 8
Blocks for Structured Programming ................................................................................................. 9
Parameter Declaration in Functions and Function Blocks ................................................................. 10
Function Properties .......................................................................................................................... 11
Function Block Properties ................................................................................................................. 12
Instance Formation of Function Blocks ............................................................................................. 13
Structure of the Multi-Instance Model ................................................................................................ 14
Exercise 3: Using Multi-Instances of the Type IEC Counter ............................................................ 15
Exercise 4: FB 17: Using Multi-Instances of the Type IEC Timer .................................................... 16
System function - FB (with memory) stored in the CPU‘s operating system and
block (SFB) callable by the user
System data
- data block for configuration data and parameters
block (SDB)
Blocks in STEP 7 Blocks are, by their function, their structure or their application, limited parts of
the user program. The blocks in STEP 7 can - in keeping with their contents - be
divided into two classes :
• User Blocks: User blocks include Organization Blocks (OB), Function Blocks
(FB), Functions (FC) and Data Blocks (DB).
The programming person stores the program instructions for data
processing or process control in the blocks (OB, FB and FC).
In the data blocks (DB), the programming person can save data that occur
during program execution and then reuse them at a later time.
User blocks are created in a programming device and are downloaded from
there into the CPU.
• System Blocks: System blocks include System Function Blocks (SFB),
System Functions (SFC) as well as the System Data Blocks (SDB).
SFBs and SFCs are used to solve frequently required PLC standard tasks.
They are integrated in the CPU‘s operating system.
SDBs contain parameter assignment data that are evaluated exclusively by
the CPU. SDBs are not created or written by the user program, but by tools
such as HW-CONFIG or NETPRO.
SDBs are created by these tools during saving of the parameter
assignment data - invisible to the user - and downloaded into the CPU.
Downloading is only possible in the STOP mode.
absolute symbolic
Access
General Up until now, the inputs and outputs in our programs were coded directly with
their actual address assignments. This type of programming is fixed to these
address locations and is therefore not well-suited for repetitive processes.
Blocks that are not parameterized are best used for custom machinery where
there is no repetition in the process.
For frequently reoccurring functions in larger systems it is better to make
reusable, parameter-assignable blocks (Functions, FCs and Function Blocks,
FBs). These blocks use symbolic input and output parameters (local symbol
names), which are supplied with actual operands when the block is called.
You have to assign these operands when you make a call to a Function or a
Function Block. The program logic of the FC/FB remains unchanged and you
can therefore reuse the logic several times.
Local Variables Up until now, you used global variables (bit memories and data blocks) to save
production data, for example. In this chapter you will find out more about data
storage in local variables.
Local variables can be read only by the block in which they were originally
created. Because of this, local variables cannot be used as data interfaces
between different program blocks.
There are two types of local variables: Temporary and Static.
• Temporary Variables:
Temporary variables are variables that are stored only while the block is
being executed. They can be declared in all program blocks (OB, FC, FB).
• Static Variables:
If the data are to be retained even after the block is executed, the data must
be stored in static variables.
Static variables can only be declared in function blocks. The instance DB
assigned to the FB is used as the storage location for these static variables.
OB 1 FC 17 FC 20
3
2
with temp. with temp.
variables 4 variables
5 FC 30
7 with temp.
6 variables
Result 1 2 3 4 5 6 7
Usage of
the L stack
256 Bytes
FC30
FC20
FC17 FC17 FC17 FC17 FC17
OB1 OB1 OB1 OB1 OB1 OB1 OB1
Total Usage For every program execution level or priority class (such as, OB 1 with all
blocks that are called in it or by it), a separate L stack is reserved. That is, a
segment of defined size is reserved on the L stack of the CPU (allocation or
reservation of memory space).
The local variables of OB 1 as well as the local, temporary variables that are in
blocks (FCs and FBs) called in or by OB 1 are stored in this L stack.
You can use the "Reference Data" tool to show to what extent an S7 program
puts a burden on the Local stack.
Reference Data In the SIMATIC Manager, select the Blocks folder and choose the menu
options Options Æ Reference Data Æ Display Æ Program Structure.
Note If the (CPU specific) maximum number of local data is exceeded (overflow of
the L stack) during program execution in the CPU, the CPU goes into the
STOP mode. "STOP caused by error when allocating local data" is entered as
the cause of error in the diagnostics buffer.
General In addition to the traditional timer and counter functions (SIMATIC S5), you also
have the IEC timers and counters..
They correspond in their function to the IEC standard 61131 (EN 61131). They
are stored as system blocks in the CPU‘s operating system.
Benefits The IEC timers and counters have greater timer and counter ranges. The
number of timers and counters is only limited by the size of the work memory.
Note Please look in the STEP 7 ONLINE Help for an exact description of the
individual system function blocks. To do so, select the block and press the F1
key.
Task In "FB_Statistic" (FB 18), the transported parts for each bay are counted with
traditional counters (S5 counters). In order to implement a greater counting
range, the traditional counters are to be replaced with the IEC counter "CTU"
(SFB 0).
What to Do 1. In FB 18, replace the S5 counters used with the IEC counter "CTU"
(SFB 0) and use the data blocks DB 101 to DB 103 as instance data blocks
in the call of the SFB 0.
Note:
In the LAD/FBD/STL Editor, you will find the necessary IEC counter "CTU"
(SFB 0) under: View Æ Overviews Æ in the Overviews folder Libraries Æ
Standard Library Æ System Function Blocks
2. Download all modified / newly generated blocks into the CPU and test the
program.
Task In "FC_Fault" (FC 17), the transport functions while in AUTO mode are
monitored with the traditional timer (S5 time). The traditional timer is now to be
replaced with the IEC timer "TON" (SFB 4).
What to Do 1. In FC 17, replace the S5 timer used with the IEC timer "TON" (SFB 4) and
use the data block DB 104 as instance data block for the SFB.
Note:
In the LAD/FBD/STL Editor, you will find the necessary IEC counter "CTU"
(SFB 0) under: View Æ Overviews Æ in the Overviews folder Libraries Æ
Standard Library Æ System Function Blocks
2. Download all modified / newly generated blocks into the CPU and test the
program.
Modularization Abstraction is the basis for solving complex problems, in which we concentrate
of Tasks on the fundamental aspects of a program in every abstraction level and ignore
all the details that are not essential. Abstraction helps us to divide complex tasks
into partial tasks which can then be solved on their own.
Structured STEP7 supports this concept of modularization with its block model. The partial
Programming tasks that result from the division of the entire task are assigned blocks in which
the necessary algorithms and data for solving the partial problems are stored.
STEP7 blocks such as functions (FC) and function blocks (FB) can be assigned
parameters so that the concepts of structured programming can be implemented
with them. This means:
• Blocks for solving partial tasks implement their own data management with
the help of local variables.
• Blocks communicate with the "outside world", that is, with the sensors and
actuators of the process control or with other blocks of the user program,
exclusively through their block parameters. No access to global addresses
such as inputs, outputs, bit memories or variables in DBs can be made from
within the instruction section of blocks.
Overview Parameters are used as channels for transferring information between the
calling block and the called block. The symbolic names, data types and, if
necessary, initial values of parameters are established in the declaration table.
Declaration Types The type of parameter indicates the direction of the data transfer:
in Input parameters (FB, FC): They are used to pass information from the calling
block to the called block. Only a read-only access to the input parameters is
possible within the called block.
out Output parameters (FB, FC): They are used to pass information (results) from
the called block back to the calling block.
in_out In/Out parameters (FB, FC): In/Out parameters are used to transfer information
in both directions. A read and write access is possible to in/out parameters.
Name and Type Just like local variables, parameters have a symbolic name and a type (data or
parameter type). Parameters can be used in the code section of a block in the
same way as local variables of the same data type.
For this reason, parameters are also called formal parameters within a block.
Block Calls In a block call, the formal parameters of a block (FC) must be assigned to actual
parameters. If the FB is not assigned actual values with the call, initial values
from the DB will be used.
To avoid a misinterpretation (regarding the data type) or erroneous use of the
actual parameters that are passed, the PLC Editor checks that the actual
address created is exactly the same type as the formal parameter when the
block is called (Exception: POINTER and ANY).
The type check and the parameter passing mechanism is language
independent. This guarantees that blocks that were created with different PLC
Editors (STL, LAD, FBD, SCL, etc.) can call each other.
Parameter-assignable
blocks:
as many input, output, and Function FC10
in/out parameters as
required Program
in On_1 BOOL
in On_2 BOOL
without memory, i.e. only execution out Off BOOL
temporary variables ...
Application Functions are primarily used when function values are to be returned to the
calling blocks. (for example, mathematical functions, single control with binary
logic operation).
IEC 61131 If IEC 61131-3 conforming functions are to be created, then the following rules
Conforming must be observed:
Functions
• Functions can have as many input parameters as is required. They can,
however, only return one result to the output parameter RET_VAL.
• Global variables can neither be read nor written within functions.
• Absolute addresses can neither be read nor written within functions.
• No instances of function blocks can be called within functions.
Because of the missing "memory", the returned result of a norm-conforming
function is solely dependent on the values of the input parameter. For identical
values of the input parameter, a function also returns the identical result.
It is therefore up to the programming person to create norm-conforming
functions or to do the block programming and structuring in STEP 7 as it is in
STEP 5.
Overview Function blocks (FB) are blocks of the user program and represent logic blocks
with memory according to the IEC Standard 61131-3. They can be called by
OBs, FBs and FCs.
Function blocks can have as many input, output and in/out parameters as is
required as well as static and temporary variables.
Unlike FCs, FBs are instantiated, that is, an FB is assigned its own private data
area in which the FB can "remember" process states from call to call, for
example. In the simplest form, this private data area is its own DB, the so-called
instance DB.
"Memory" The programming person has the opportunity to declare static variables in the
declaration section of a function block. The function block can "remember"
information from call to call in these variables.
The ability of a function block to "remember" information over several calls is the
essential difference to functions.
Application With the help of this "memory", a function block can implement counter and
timer functions or control process units, such as processing stations, drives,
boilers etc., for example.
In particular, function blocks are well suited for controlling all those process units
whose performance depends not only on outside influences but also on internal
states, such as processing step, speed, temperature etc.
When controlling such units, the internal status data of the process unit are then
copied to the static variables of the function block.
OB, FB or FC SFB 0 DB 2
Counter
Algorithm values
CALL SFB0, DB2
...
for
counting
+ for
... Bay 1
FB Instance
FB x
Counter
Declaration within FBs
values
(Multi – instances) for
Bay 3
What is an The concept of instantiating function blocks has great importance and makes up
Instance? the essential distinctive criterion to the FCs. The setting up of variables within a
high level language such as "C" under declaration of variable name and data
type in the declaration is called "instantiate" or "instance forming".
Just like variables, function blocks are also "instantiated". Only through this
‘own’ data area, in which the block parameter values as well as the static
variables are stored, does an FB become an executable unit (FB-instance).
The control of a physical process unit, such as a drive or a boiler then takes
place with the help of an FB instance, that is, a function block with an assigned
data area. The relevant data for this process unit are then stored in this data
area.
Instantiating You can create an FB instance, that is, the assignment of its own memory area
in an FB call, in two ways in STEP 7:
• through the explicit declaration of an instance data block when a function
block is called.
• through the explicit declaration of instances of a function block within a
higher-level function block (multi-instance model).
STEP 7 then makes sure that the data area required for the instance is set
up within the data area of the higher-level FB.
DB10
FB10
FB1
...
e.g. OB1 stat Drill FB1 Algorith-
stat Motor_1 FB2 ms Data
stat Motor_2 FB2 for for drill
drilling
.
CALL FB10,DB10
CALL Drill
. Data
. FB2
for
CALL Motor_1 Control Motor_1
logic for
.
a motor
CALL Motor_2 Data
for
Motor_2
Instance DB of FB10
Multi-instance Model In addition to instantiation of function blocks, when you specify an instance DB
in an FB call, STEP 7 also supports the explicit declaration of FB instances
within a higher-level function block.
For this purpose, instances of the called function blocks are declared with data
type FB1 or FB2 using symbolic identifiers (Drill, Motor_1 and Motor_2). This
takes place in the declaration section of the calling FB 10 function block in the
section "static variable". Within the higher-level function block, the individual
instances are then called using their symbolic identifier. The higher-level FB10
function block must however be called with its own instance DB (DB10).
In the creation of the higher-level instance DB, STEP 7 makes sure that the data
areas required for the individual instances are set up in the data area of the
higher-level FB10.
In the call of the individual instances using the symbolic names, the CALL macro
makes sure that the AR2 register is set to the beginning of the data area
assigned to the instance so that the parameters and local variables of the
instance are also accessed during the processing of the called function block.
Benefits The use of the multi-instance model has the following benefits:
• The individual instances do not require their own data block every time.
Within a call hierarchy of function blocks, only one instance DB is used in
the call of the "outer" function block.
• The multi-instance model "welds" a function block and an instance data area
into one object (FB instance), that can also be handled as one unit. The
programming person does not have to take care of the management
(creation, addressing) of the individual instance data areas. He must simply
provide an instance DB for the "outer" FB.
• The multi-instance model supports an object-oriented programming style.
right
mouse button
Task In "FB_Statistic" (FB 18), the bay quantities are recorded, while in AUTO mode,
by calling the IEC timer "CTU" (SFB 0). The data blocks DB 101 to DB 103 are
used as instance data blocks for the SFB calls.
Instead of the direct SFB calls, calls of multi-instances of the data type SFB 0
are now to be employed.
What to Do 1. In FB 18, declare the multi-instances, that is, the static variables "Count1",
"Count2" and "Count3" of the data type SFB 0 (see slide).
2. In FB 18, replace the calls of the IEC counter, that is, the calls of "CTU"
(SFB 0) with the previously declared multi-instances.
Note: The call of a multi-instance is edited exactly the same way as that of
an FC or FB. You will find the declared multi-instances in the Program
Element Catalog in the directory "Multiinstances".
A conventional FB call can also be changed very easily into a multi-instance
call, as shown in the slide.
3. In OB 1, update the call of the FB 18 and download all modified / newly
generated blocks into the CPU.
Task To make use of the benefits of the multi-instance model, a multi-instance of the
type "TON" IEC Timer is now to be used instead of the directly used IEC timer.
Note Multi-instances can only be declared in FBs. The timely monitoring of transport
functions programmed in FC 17 must therefore now be programmed in an FB.
Since it is not possible to rename an FC as an FB, the FB must be created. To
do so, proceed as follows:
What to Do 1. Create the new "FB_Fault" (FB 17) function block and in it declare the multi-
instance or static variable "SD_Time" of the data type SFB 4 (see slide).
2. From FC 17, copy all networks into the new FB 17.
3. In FB 17, replace the call of the SFB4 with the call of the multi-instance
"SD_Time" (see slide)
4. Instead of FC 17, now integrate FB 17 into your program and use the DB 17
data block as the instance DB to FB 17.
er
? o int
#P
?
#Ini_Value
?
#Counter
Contents Page
Objectives ........................................................................................................................................ 2
Addressing Possibilities with STEP 7 ................................................................................................ 3
Direct Addressing of Variables ......................................................................................................... 4
Direct Addressing of Address Identifiers in Data Blocks .................................................................... 5
Analyzing DB Information in the Program ........................................................................................ 6
Memory Indirect Addressing ............................................................................................................. 7
Structure of Pointers with Memory Indirect Addressing ..................................................................... 8
Address Areas for Storing 16-Bit and 32-Bit Pointers ........................................................................ 9
Example of Memory Indirect Addressing ........................................................................................... 10
Testing the Program Execution using Breakpoints (Part 1) ............................................................. 11
Testing the Program Execution using Breakpoints (Part 2) .............................................................. 12
Exercise 1: Storing Part Weight Values (FC 35) ........................................................................... 13
If You Want to Know More .............................................................................................................. 14
Programming Loop Operations ....................................................................................................... 15
Area-Internal, Register Indirect Addressing ...................................................................................... 16
Area-Crossing, Register Indirect Addressing .................................................................................... 17
Addressing Procedure
32-bit pointer
16-bit pointer 32-bit pointer 32-bit pointer area-
(DB, T, C) area-internal area-internal crossing
Examples:
Direct With direct addressing, the memory location is coded in the instruction. That is,
Addressing the address identifier specifies the address value the instruction is to process.
Symbolic In a control program, addresses can have absolute addressing (such as I 1.0)
Addressing or symbolic ("start signal" for example). The symbolic address uses names
instead of the absolute addresses.
A program is easier to read when meaningful names are used. With symbolic
addressing differentiation is made between local symbols (in the declaration part
of a block) and global symbols (symbol table).
Indirect With indirect addressing you are able to address address identifiers whose
Addressing address is determined only at program runtime. With indirect addressing,
program parts, for example, can be scanned repeatedly (loop programming),
whereby the addresses used are assigned different addresses with every scan.
With indirect addressing, differentiation is made between:
• memory indirect addressing: A pointer to the addressed address is found in
a user memory’s memory cell (such as MD30).
With memory indirect addressing, the variables, in the memory in which the
pointer of the addressed address identifier is stored, can also be assigned
symbolic names.
• register indirect addressing: The pointer to the addressed address is loaded
in one of the two address registers (AR1 or AR2) of the S7 processor before
being accessed. (Is dealt with in the Course ST-PRO3).
Caution Since the addresses are only calculated at run-time with indirect addressing,
there is the danger that memory areas are unintentionally overwritten and you
can then have an unexpected PLC reaction.
T 114 -- Timers
C 13 -- Counters
Direct Addressing With the help of direct addressing, simple (elementary) variables, that is,
of Variables variables up to a length of a maximum of 4 bytes, can be addressed. Simple
variables consist of:
• an address identifier (such as: "IB" for input byte)
• an exact address (memory location) (byte or bit address) within the memory
area, that is determined by the address identifier.
Global, symbolic names (symbol table) can also address addresses or simple
variables.
Peripherals Unlike S5, it is now necessary to make a distinction between inputs and outputs
when accessing peripherals. However, it is still only possible to have a read-only
access (L PIW) of peripheral inputs and a write-only access (T PQW) of
peripheral outputs.
Local Data With STEP 7 it is also possible to have an absolute access of the local data
stack’s own blocks, for example:
• A L 12.6 (scan local data bit with address 12.6 for signal state = 1)
• L LW 12 (Load local data word in ACCU1)
DBX/DIX You can also access directly simple variables within data blocks:
• A DBX 12.6 (Scan data bit with address 12.6 of a DB for signal state =
1, DB must be opened beforehand).
• L DB5.DBW10 (Load DW10 in DB5)
Complex You can symbolically access local variables that have a complex data type,
Variables such as structures or arrays,.
Absolute access is only possible with components of complex variables that are
elementary data types.
Overview The CPU makes two data block registers available for data address processing.
The numbers of the data blocks currently open are found in these registers.
Before you can access a data block, you must first open it using one of the two
data block registers.
You can open a data block using the following instructions:
• OPN DBx or OPN DIx
or by means of a fully-qualified access to a DB variable:
• L DBx.DBWy (L DIx.DIWy is not possible!)
In this case DB number x is also loaded in the DB register.
Addressing Data blocks are organized byte-by-byte in STEP7. For the direct access of
addresses with BIT, BYTE, WORD or DWORD length, the byte address (as for
I/Q/M) is indicated in each case.
Symbolic Access For a symbolic access you enter the data block’s symbol name in the symbol
list. You use the DB Editor to assign symbolic names to the data block’s
individual variables.
Now, a complete symbolic access of a data element is possible with the L
"Values"..Number_1 instruction. DB19 now opens ("Values" is the symbol name
of DB 19) and DW 2 is loaded (Number_1 is the symbol name of DW2).
DB Register 123 24
CDB 123
DI Register 24
before: after:
DB, DI Registers These registers contain the current valid numbers of the opened data blocks.
You can open two data blocks simultaneously in a call level.
STL prefers to use the first DB register for accessing shared (global) DBs and
the second DB register for accessing instance DBs. These registers are also
called DB register or DI register for this reason .
The CPU treats these registers equally. Every data block can be opened with
one of these two registers (even with both simultaneously).
L DBLG, L DILG: These instructions read out the data length of the currently opened data blocks
in number of bytes. With the help of this information, the user program can test if
a DB has the necessary length before the DB is accessed.
L DBNO, L DINO: These instructions read out the numbers of the currently opened data blocks.
Overview With memory indirect addressing, the address of the variable to be accessed
is found in an address (memory location).
Program statements using memory indirect addressing contain:
• an instruction (such as: OPN, A, L)
• an address identifier (such as DB, C, T, I, QW, MD)
• and a [variable], that must be enclosed within square brackets.
This variable contains the address (pointer) of the operand that the
instruction accesses.
The instruction will interpret data stored in the specified [variables], as either a
word or double word pointer depending on the address identifier used.
Instructions with You use the 16-bit pointer for addressing timers, counters or blocks (DB, FC,
16-bit Pointers FB).
You can address all timer and counter instructions with indirect addressing. To
address timers, counters or blocks, use area identifiers of the form T, C, DB,
DI, FB, FC. The address (memory location) of the addressed operand is stored
in a word.
A DB or DI register can open a data block. If a zero is found in the pointer
when you indirectly open a data block (DB, DI), then the DB/DI register is
loaded with the value "0". An error is not triggered when you load with "0".
You can use the UC or CC instructions (not CALL) to address the call of logic
blocks indirectly. The blocks, however, may not contain any block parameters
or static variables.
This pointer in word format is interpreted as an integer number (0 to 65 535).
The pointer refers to the number of a timer (T), a counter (C), a data block
(DB, DI) or a logic block (FC, FB).
0 0 0 0 0 0 0 0 1 0 0 1 0 0 1 0 146
215 27 20
Interpretation as unsigned integer between 0 and 65 535
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 1 0 1 1
215 20 22 20
Instructions with Memory indirect addressing using 32-bit pointers can access the following
32-bit Pointers addresses :
• Bits that are addressed by bit logic operations.
I, Q, M, L, DIX or DBX can be used as address identifiers
• Bytes, words and double words that are addressed by load or transfer
instructions. IB, IW, ID, DBB, DBW, DBD, DIB, DIW, DID, PIB, PIW, PID,
can be used as address identifiers.
The address of the addressed operand is interpreted as 32-bit pointer. In this
double word, the least significant bits (bit 0 to bit 2) are interpreted as bit
address. The next 16 bits (bit 3 to bit 18) are interpreted as byte address of the
addressed operand. Memory indirect addressing does not analyze bits 19 to
31.
Note If you want to access an address by means of memory indirect addressing and
use load or transfer instructions, you must make sure the bit address of the
pointer is “0”.
If this is not the case, the CPU triggers a runtime error during execution.
Loading of 32-bit You can use the following syntax to load 32-bit pointer constants into ACCU1:
Pointer Constants
L P#<Byte address>.<Bit address>
Storage Locations for You must store 16-bit and 32-bit pointers for memory indirect addressing in
Pointers one of the following areas:
• M - Bit memory
• L - Local data
• D - Data block (DB or DI)
T QD[“Speed_1“] T QD[#Pointer]
T QD[DBD22]
T QD[DID22]
Address Areas With memory indirect addressing, the address (memory location) is found in a
for Pointers 16-bit or a 32-bit address. This address can be found in one of the following
areas:
• Bit memory: as an operand addressed absolutely or as variable addressed
symbolically through the symbol table.
• Local data stack: as an operand addressed absolutely or as temporary
variable declared in the block’s declaration section.
• Global (Shared) data block: as an operand addressed absolutely. When
you use global (shared) DBs as the storage location for pointers, make
sure that the DB register (OPN DB n, for example) opens the “correct” data
block before accessing.
• Instance data block: as an operand addressed absolutely. When you use
instance data observe the following points:
• OBs and functions: Within functions or OBs, a pointer stored in an instance
data block can be used exactly as if it were stored in a global (shared) DB.
Just remember that instead of the DB register, the DI register is now used.
• FBs: Within FBs, instance data, that is, parameters or static variables,
cannot generally be used symbolically for memory indirect addressing.
• Absolute access of local data within an FB is, in principle, possible using
the “address” entered in the declaration section. However, when the FB is
used as multi instance, it must be noted that this address is not the
absolute address specified in the instance DB but is actually the
address relative to AR2.
Note When you pass pointers for memory indirect addressing to blocks or you want
to keep the value permanently in static variables, then you must copy the
pointer value from the parameter or static variable into a temporary variable.
Then complete the access using this temporary variable.
Description This example shows a function that initializes all bytes, that is, all variables of a
data block and overwrites them with the value "0".
In Network 1, the number of the data block passed via the input parameter
#DBNr is first of all copied onto the temp variable #Nr, which then serves to
indirectly open the data block. It is necessary to recopy onto a temp variable
because parameters cannot be used for indirect addressing.
In Network 2, the length [in bytes] of the data block is first of all determined and
assigned to the temp variable #number, which serves as the loop counter in the
subsequent LOOP.
Within the LOOP, the temp variable #Pointer is used for indirect addressing of
the data block byte that is first of all to be overwritten with the value 0. In the first
loop pass this is the DBB 0 because #Pointer was already initialized in Network
1 on the value P#0.0. With each loop pass the #Pointer is increased by the
value P#1.0 using DINT addition so that in the second loop pass #Pointer points
to DBB 1, in the third loop pass to DBB 2 etc..
Since the number of loop passes corresponds exactly to the length of the data
block in bytes, all data block bytes are addressed in ascending order via
#Pointer and overwritten with the value 0.
Note The system function SFC 21 (FILL) can also be used to delete or pre-assign a
memory area.
Breakpoints With the help of this test function, you can test a program you see in STL in single-
step mode and thus follow the sequence of the executed instructions as well as the
associated register contents.
You can set several breakpoints, depending on the CPU. The number of possible
breakpoints depends on the CPU used.
Note In order to carry out these test functions, you must have fulfilled the following
requirements:
Breakpoint You can choose the breakpoint functions in the Program Editor by selecting the
Functions "Test" menu option or through the Breakpoint Bar.
You can activate the breakpoint bar by selecting the View Æ Breakpoint Bar menu
option in the Program Editor.
Attention If the program execution encounters a breakpoint, the CPU switches from RUN to
HOLD mode.
In this mode, the STOP LED lights up and at the same time the RUN LED flashes.
The outputs are deactivated for safety reasons.
Break-
point
Next
state-
ment
Breakpoint Bar
Set/Delete Breakpoint Breakpoints Active (on/off)
Show Next Breakpoint
Execute Call
Set/Delete Breakpoint With "Set/Delete Breakpoint" you determine where the program execution is to be
halted. The breakpoint‘s statement is not executed.
Breakpoints Active With "Breakpoints Active" you activate all breakpoints; not only those already set but
also those still to be set.
Show Next With "Show Next Breakpoint", the Editor jumps to the next selected breakpoint,
Breakpoint without executing the program.
Resume With "Resume", the program runs until the next active breakpoint.
Next Statement With "Next Statement", you execute the program in single-step. If you reach a block
call, you jump to the first statement after the block call with "Next Statement".
The Execute Next Statement and Execute Call menu options require a free
breakpoint for the internal implementation.
Execute Call Here, when you reach a block call you branch into the block with "Execute Call". At
the end of the block you jump back to the next statement after the block call.
Call in OB 1
Task In AUTO mode, parts are transported from the light barrier bay to Bays 1 to 3.
Always at the moment when the part reaches the first empty bay or when the
conveyor is stopped (see slide, FC 35 – call condition), the just set weight value
is to be stored in the data block "DB_Weight".
If the maximum number of part weight values is reached, the values are to be
overwritten from the beginning, that is, beginning with "PartWeight[1]".
To manage the part weight values, the data block variables "Max_Number"
(DBB 0) with the maximum number of part weight values and "Act_Number"
(DBB 1) with the current number of stored values of part weight values is used.
Tip:
To make it easier to monitor if the data block really overwrites from the
beginning when it reaches the maximum number, set the maximum number
to 5, for example.
Note The following pages contain either further information or are for reference to
complete a topic.
Transfer to
NEXT: loop counter
Code section to be
executed several
times
No
Iteration
Continue
(end-controlled)
Code
Accu 1 > 0?
Loop Instruction The loop instruction LOOP simplifies the programming of program loops.
For programming a loop instruction, the desired number of loop scans to be
executed are loaded in ACCU1-L. LOOP interprets the right word of
Accumulator 1 as unsigned 16-bit number in the range from 0 to 65535.
With every execution of the LOOP instruction, the value in ACCU1-L is
decremented by one. Subsequently, the value is compared to zero. If the value
is unequal to zero, a jump takes place to the jump label designated in the LOOP
instruction. If the value is equal to zero no jump takes place, and instead, the
immediately following instruction is executed.
Note The loop counter must not be initialized with 0, because this would cause the
loop to be executed 65535 times.
0 0 0 0 0 0 0 0 0 0 0 0 0 B B B B B B B B B B B B B B B B X X X
215 20 22 20
z Command Syntax:
LAR1 P#10.0 // Presetting of AR1: 00000000 0000 0000 0000 0000 0101 0000
+ 200
L M W [AR1, P#200.0]
Overview With register indirect, area-internal addressing, the address (memory location)
of the operand to be accessed is found in one of the two address registers (AR1,
AR2).
The address registers’ contents are, in this case, an area-internal 32-bit pointer
with the same configuration and the same meaning as with memory indirect
addressing.
Syntax With register indirect, area-internal addressing, the entire instruction consists of:
• an instruction (such as: A, L, T)
• an address identifier (such as I, MB, QD), that is the combination of an area
identifier (I, Q, M, DB, DI, etc.) and an identifier for the access width
(B=Byte, W=WORD, D=DWORD).
• and the declaration of an address register, which together with a constant
offset must be enclosed within square brackets. This offset is added to the
contents of the specified address register before the instruction is executed.
The address register’s contents and the offset have the format of area-
internal pointers consisting of byte address and bit address.
The offset’s declaration (even P#0.0) in the command syntax is imperative.
Notes • With indirectly addressed byte, word or double word addresses, the entire
offset must have the bit address "0". Otherwise the CPU triggers a runtime
error during execution of the instruction.
• If the AR1 or AR2 address register specified in the register indirect, area-
internal addressing contains an area-crossing pointer (see next page), then
the pointer’s area identifier is not evaluated during execution of the
instruction.
The area identifier in the address identifier is valid.
1 0 0 0 0 R R R 0 0 0 0 0 B B B B B B B B B B B B B B B B X X X
z Command Syntax:
LAR1 P#E10.0 // Presetting of AR1: 10000001 0000 0000 0000 0000 0101 0000
Overview With register indirect, area-crossing addressing, the area identifier (such as I, Q,
M) and the address (memory location) (byte.bit address) of the operand to be
accessed is found as area-crossing pointer in one of the two address registers
(AR1, AR2).
Syntax With register indirect, area-crossing addressing, the entire instruction consists
of:
• an instruction (such as: A, L, T)
• an identifier for the access width (B=BYTE, W=WORD, D=DWORD).
• and the declaration of an address register, which together with a constant
offset must be enclosed within square brackets.
The address register’s contents must be an area-crossing pointer with an
area identifier and a byte.bit address in this case.
The offset has the format of an area-internal pointer consisting of a byte and
bit address that is added to the pointer’s byte.bit address in the declared
address register before the instruction is executed.
The offset’s declaration (even P#0.0) in the command syntax is imperative.
Notes • With indirectly addressed byte, word or double word addresses, the entire
offset must have the bit address "0". Otherwise the CPU triggers a runtime
error during execution of the instruction.
• For CPUs that have older firmware versions, access to their own local data
(identifier: 110) is not possible with indirect area-crossing addressing.
In these cases, the runtime error "unknown area identifier" is triggered.
Access to their own local data is then only possible with area-internal
addressing.
Contents Page
Objectives .......................................................................................................................................... 2
Interesting Facts about Libraries ..................................................................................................... 3
Design and Contents of the Standard Library ................................................................................... 4
Interesting Facts about System Functions ...................................................................................... 5
Overview of the System Functions (Excerpt) .................................................................................... 6
System Functions that Exist in the CPU ......................................................................................... 7
Call of System Functions and System Function Blocks .................................................................. 8
Example: "READ_CLK" (SFC 1) ....................................................................................................... 9
TIME_OF_DAY and DATE_AND_TIME Data Types ........................................................................ 10
Example: "BLKMOV" (SFC 20) .......................................................................................................... 11
Assignment of Parameters of the ANY Data Type ........................................................................... 12
Analyzing an Error Message …....................................................................................................... 13
Exercise 1: Recording the Time Stamp with SFC 1 .......................................................................... 14
Exercise 2: Data Backup with SFC 20 .............................................................................................. 15
If You Want to Know More ............................................................................................................. 16
Additional Exercise: Specified Time Relay ...................................................................................... 17
The Library: TI-S7 Converting Blocks (Excerpt) .............................................................................. 18
The Library: IEC Function Blocks (Excerpt) .................................................................................... 19
The Library: Communication Blocks .............................................................................................. 20
The Library: PID Control Blocks ..................................................................................................... 21
The Library: Miscellaneous Blocks (Excerpt) .................................................................................. 22
Library Structure:
A library may contain several program folders
A library may not contain any "Hardware"
Each program folder contains:
the folders "Blocks", "Sources", "Symbols"
the folder "Charts" (only for the option software: S7-CFC)
Using Libraries:
With the SIMATIC Manager you can:
create libraries (not with the same names as projects)
copy Blocks and Sources between libraries and projects
archive libraries
With the LAD/FBD/STL Editor you can
store network templates in libraries as Sources and then reuse them
whenever you need
Overview Libraries are used to store reusable program components for the SIMATIC S7.
The program components can be copied into a library from existing projects or
they can be created directly in the library regardless of the projects.
For the creation of S7 programs in a library, you have the same functions as for
projects – with the exception of testing.
Using Libraries Blocks that are to be used again and again can be stored in libraries. From
there, you can copy them into the appropriate user progam and they can be
called by other blocks.
Introduction When you install the STEP 7 software, a standard library with the name
"Standard Library" is automatically installed on the hard drive.
Opening the Library To open a library, you either use the command: File Æ Open or the appropriate
icon in the toolbar.
Then, a further dialog pops up in which you can select the desired project,
library or sample project.
Standard Library The Standard Library contains the following S7 program folders:
• Communication Blocks: contains the functions for connecting to
distributed peripherals when using an S7-300 PROFIBUS CP,
• IEC Function Blocks: contains blocks for IEC functions such as, for handling
the data types DATE_AND_TIME and STRING,
• Miscellaneous Blocks: contains blocks for the time stamping of messages
and for time of day synchronization,
• Organization Blocks: contain all OBs with the symbolic identifiers for the start
information,
• PID Control Blocks: with function blocks for PID control,
• S5-S7 Converting Blocks: with the standard blocks needed for the
conversion of S5 programs to S7,
• System Function Blocks: contains all S7-300/400 system functions (SFCs
and SFBs),
• TI-S7 Converting Blocks: with generally usable standard functions, such as
Scaling analog values, etc.
Notes When option packages are installed, additional libraries may be created.
You can find a description of the S7 Libraries - PID and TI-S7 Converting Blocks
under: Toolbar Æ SIMATIC Æ Documentation Æ English Æ STEP 7- PID
Control or System and Standard Functions for TI-S7 Converter.
Introduction Functionality, that cannot be implemented with STEP 7 instructions (for example
DB creation, communication with other PLCs, etc.) can be implemented in
STEP7 with the help of system functions (SFCs) or system function blocks
(SFBs).
SFCs and SFBs are blocks that are stored in the CPU’s operating system
instead of in the user memory. For that reason, the actual instruction part is not
transmitted but only the SFC’s or SFB’s declaration part during the reading out
of an SFC or SFB from the CPU.
With the help of the STL/LAD/FBD Editor, the "block" that is read out can be
opened and the declaration part displayed. A reverse transmission of SFCs and
SFBs into the CPU is, however, not possible.
In the user program, the SFBs and SFCs can however be called just like FBs or
FCs using the CALL instruction. With SFBs, a user DB must also be specified as
instance DB for the SFB for that reason.
Which SFBs and SFCs are available depends individually on the PLC system
(S7-300 or S7-400) used and on the CPU installed. The blocks have, however,
regardless of whether they are called in an S7-300 or S7-400, the same
numbers, the same functionality and the same call interface.
Manual An extensive description of the system functions can be found in the manual:
• The System Software Reference Manual for S7-300/400, System Functions
and Standard Functions.
Online Help There is also an extensive description of the system functions in the STEP 7
software. Call the help menu in the program editor and select the entry:
• Help Topics Æ Calling Reference Helps (LAD, FBD, STL, Blocks ... )
Æ Jumps to Language Descriptions and Help on Blocks and System
Attributes Æ Help on SFBs/SFCs.
Copy and Block • SFC 20 copies the contents of a memory area (source) into another memory
Functions area (destination)
• SFC 21 fills a memory area (destination field) with the contents of a pre-
defined memory area (source field)
• SFC 22 creates a non-initialized DB in the work memory
• SFC 23 deletes a DB in the work memory and if necessary in the load mem.
• SFC 24 determines whether a DB exists in the work memory (with length)
• SFC 25 compresses the memory, since gaps occur when block corrections
are made and these gaps are closed when compression takes place
• SFC 44 (Call in OB 122) deposits a replacement value for a faulty input
module in the Accumulator. Usage in OB121 is also possible.
Program Control • SFC 35 triggers the synchronized start of OB 60 in all CPUs when
multicomputing
• SFC 43 restarts the cycle time monitoring of the CPU
• SFC 46 puts the CPU into the Stop state
• SFC 47 implements waiting times in the user program of up to 32767 µs
Handling the Clock • SFC 0 sets the real-time clock date and time on the CPU
• SFC 1 reads the current date and time of the CPU
• SFC 48 synchronizes all the slave clocks on a bus segment. The CPU with
the call must be parameterized as the master clock.
Run-Time Meter The CPU has a specific number of run-time meters with which it can record the
operating time of equipment, for example.
• SFC 2 sets the run-time meter to a pre-assigned value
• SFC 3 starts and stops the run-time meter
• SFC 4 reads the current operating hours and the status
• SFC 64 reads the CPU‘s system time. The system time is a cyclic time
counter that counts up every 10 ms (S7-300) or 1 ms (S7-400).
General In the "Performance Data" you can, among other things, query online which
system functions are available on a CPU.
SIMATIC Manager Æ PLC Æ Diagnostic/Settings Æ Module Information ... Æ
Performance Data
System Functions:
SFC20
CALL SFC 20 EN ENO
SRCBLK :=
RET_VAL:= ??.? SRCBLK RET_VAL ??.?
DSTBLK :=
DSTBLK ??.?
System Function A system function block SFB is a function block that is integrated in the
Blocks operating system of an S7-CPU. For that reason, SFBs are not downloaded into
the CPU as part of the user program.
Just like FBs, SFBs are blocks "with a memory". They have to be instantiated in
the user program.
System Functions A system function is a function that is integrated in the operating system of the
S7-CPU. SFCs can be called from the user program just like FCs.
Just like FCs, SFCs are blocks "without a memory".
Call When a system function is called it is automatically copied into the associated
user program.
Furthermore, all system functions are stored in the Standard Library, S7
Program System Function Blocks. From this library, the SFCs and SFBs can
also be copied into the user program.
There is a completed symbol list (with English identifiers) in the library from
which the symbols of the blocks used are automatically entered in the symbol
list of the user program.
SFC1
EN ENO
RET_VAL ??.?
CDT ??.?
SFC1 "READ_CLK" The SFC 1 "READ_CLK" (read system clock) reads out the time in the CPU and
provides as a result a time stamp consisting of a date and the time of day.
Year Month
Byte n1) Byte n+1
(90 ... 89) (01 ... 12)
Byte n+2
Day Hour
(01 ... 31) (00 ... 23) Byte n+3
Minutes 1=Sunday
Byte n+4
Seconds 2=Monday
(00 ... 59) (00 ... 59) Byte n+5
3=Tuesday
4=Wednesday
Milliseconds Weekday 5=Thursday
Byte n+6 Byte n+7 6=Friday
(000 ... 999) (1..7) 7=Saturday
DATE_AND_TIME The DATE_AND_TIME data type represents a point in time, consisting of the
date and the time. Instead of DATE_AND_TIME you can also use the
abbreviation DT.
DATE_AND_TIME or DT are key words and can therefore also be written in
lower case.
In the declaration, you can pre-assign an initial value to a variable (not as block
parameter in an FC, as in/out parameter in an FB or as temporary variable).
The pre-assignment must be of the type:
• DT#year-month-day-hours:minutes:seconds.milliseconds
You don‘t have to specify the milliseconds.
Variables of the DATE_AND_TIME data type can either be processed with the
help of absolute accesses to the individual components or with the associated
functions of the IEC library.
SFC20
EN ENO
DST_BLK ??.?
SFC20 "BLKMOV" The system function "BLKMOV" (block move) copies the contents of a memory
area (= source field) into another memory area (= destination field).
Permittable source areas (fields) are:
• parts of data blocks
· • bit memories
· • process image input table
· • process image output table
Notes Source and destination areas may not overlap. If the specified destination area
is larger than the source area, then only as much data is copied into the
destination area as is contained in the source area. If the specified destination
area is smaller than the source area, then only as much data as fits into the
destination area is copied.
The source area can also be located in a data block that is only stored in the
load memory (DB that was compiled with the keyword UNLINKED ) !
Assignment A parameter of the "ANY" data type can be assigned using the pointer display
as well as by direct declaration of address (variables).
Pointer Display With assignment using the pointer display (for example: P#DB5.DBX10.0 INT 8)
the STL/LAD/FBD Editor sets up an ANY pointer that corresponds in type and in
number with the declarations.
Assignment in the pointer display always makes sense when a data area is to
be addressed for which no variable was defined or for example, no suitable
variable (ARRAY or STRUCT, for example) can be defined (P, PII, PIQ, M, for
example).
In addition, the absolute pointer display must be used when the correct
information about the replication factor and the data type is required within the
called block (for example, ARRAY[1..8] OF REAL).
Address A parameter of the "ANY" type can also be directly assigned with the address
Display to which the ANY pointer is to point. This declaration can take place absolute or
using the symbolic variable name.
With the declaration of an absolute address, the STL/LAD/FBD Editor
automatically determines the associated data type (BOOL, BYTE, WORD,
DWORD,), a replication factor of "1", the DB number as well as the area-
crossing pointer to the first bit of the address and enters these values in the
pointer structure.
Likewise, the STL/LAD/FBD Editor determines the correct information using the
address when the declaration takes place using the symbol name and the
variable that is entered is of the elementary data type.
Note If a variable is of the complex data type (for example, ARRAY[1..8] OF REAL),
then the STL/LAD/FBD Editor merely enters information in bytes about the area
occupied by the variable (that is,: replication factor: 32, data type: BYTE).
Example:
W#16#8081 is an SFC specific error code.
W#16#823A is a general error code; the error was caused by
Parameter No. 2.
Error Information A processed SFC shows you in the user program, whether the CPU could
successfully execute the SFC function or not. You receive corresponding error
information in two ways:
• in the BR bit of the status word and
• in the output parameter RET_VAL (return value).
Note You should always proceed as follows before evaluating the SFC specific output
parameter:
• first of all evaluate the BR bit of the status word.
• subsequently check the output parameter RET_VAL.
If a faulty processing of the SFC is signalized through the BR bit or a general
error code is found in RET_VAL, you may not analyze the SFC specific output
parameter.
General Errors The general error code indicates errors that can occur with all system functions.
A general error code consists of the following two numbers:
• a parameter number between 1 and 127, whereby 1 indicates the first
parameter, 2 the second parameter etc., of the SFC called.
• an event number between 0 and 127. The event number indicates a
synchronous error.
An extensive description of the general error codes can be found in the manual:
"System Functions and Standard Functions" or in the Online Help.
Specific Errors Several system functions (SFCs) have a return value that provides a specific
error code. This error code indicates that an error that belongs to a specific
system function occurred during the processing of the function.
A description of the specific error code can be found in the Online Help for the
associated system function (keyword "Error Information").
Year/Month
Day
Hours/Minutes
Seconds
ms/weekday
Function (FB 18) The parts transported while in AUTO mode are counted for each bay. The total
Count Parts/Statistic quantity and the quantities of the individual bays as well as their percental
utilization are stored in the statistic variable "Statistic_Values" (declared
according to UDT18, see slide).
Task In the next exercise a data backup of the variable #Statistic_Values is carried
out.
But first, the time stamp for the data backup is to be entered in the variable
"DB_DataBackup".DateTime.
What to Do 1. Create the new data block "DB_DataBackup" (DB 10) with the variable
shown in the slide.
2. In FB 18, call the system function SFC 1 for reading out the system time and
pass the variable "DB_DataBackup".DateTime onto its OUT parameter CDT
(see slide).
3. Select the screen "Conv" and switch off the AUTO mode (Q 4.3) and then
switch it back on again.
4. With the test function "Monitor/Modify Variables" monitor the data block
operands or components of the variable "DB_DataBackup".DateTime
shown in the slide.
Note Monitoring data block variables of the data type Date_and_Time (DT) is not
possible with the test function "Monitor Data Block". The test function "Monitor
Variable" provides help because you can monitor the individual components of
the DT variable (see slide).
Function (FB 18) The parts transported while in AUTO mode are counted for each bay. The total
Count Parts/Statistic quantity and the quantities of the individual bays as well as their percental
utilization are stored in the statistic variable "Statistic_Values" (declared
according to UDT18, see slide).
Task For purposes of data backup, all values of the static variable "Statistic_Values"
are to be stored in the data block "DB_DataBackup" (DB 10) every time
"L_AUTO" (rising edge of Q 4.3 = #ON_Edge) is turned on, before the values
are overwritten with 0. That way, the old statistic values are still available even
after the system has been turned on.
What to Do 1. In FB 18, call the SFC 20 block and check the program function as follows:
2. Open "DB_DataBackup" (DB 10) in the data view and activate the "Monitor"
test function.
3. On the touchpanel select the "Statistic" screen and make note of the current
quantities and utilization of the individual bays.
4. Select the "Conv" screen, switch the AUTO mode off and then switch it on
again and in the process observe whether the statistic values are
transferred into the data block.
5. Select the "Statistic" screen once more and check whether the current values
shown have been reset to 0.
Note The following pages contain either further information or are for reference to
complete a topic.
General With the IEC Function Blocks, the Standard Library provides very useful
complex functions, such as how a specified time relay can be used for a system
expansion.
Task In a new FC119, create a specified time relay with the help of the IEC Function
Blocks from the Standard Library. The relay is to be used to switch an oil heater
on at 8:00 o‘clock in the morning and switch it off at 16:00 o‘clock. The heater is
energized through the output Q 5.3.
In the Standard Library S7 program "System Function Blocks", use the SFC 1 to
read the current time from the real-time clock in the CPU. With the FC8 function
from the S7 program "IEC Function Blocks", the current time can be extracted
from the time stamp of SFC1. Then the times 8:00 o‘clock and 16:00 o‘clock can
then be compared using 2 comparison functions.
To simulate these times, the desired time in the CPU is adjusted in each case
using the menu options PLC Æ Set Date and Time.
FC 80 The FC80 function starts the "timer function as storing ON Delay (TONR)". The
FC80 accumulates time until the current value of elapsed time (#ET) equals or
exceeds the preset value (#PV).
FC 81 With the indirect move of a data area function (IBLKMOV), you can move a
block of data consisting of either bytes, words, integers (16 bits), double words
or double integers (32 bits) from a source block to a destination block.
The #S_DATA and #D_DATA POINTERS point to structures of the POINTER
data type which identify the starting locations of the source and destination data.
The area length to be copied is determined through special parameters.
FC 82/83 Sets the signal state of each bit in a specified range to "1" (FC83), or to "0" (FC
82), if the MCR bit is "1". If the MCR bit is "0", the signal state of each bit in the
range remains unchanged.
FC 84-FC 92 These functions are table functions to implement FIFO functions, for example.
The values are to be entered in the word format; the length can be set.
FC 105 Converts the digitalized value of an analog channel into a physical quantity
(such as weight).
FC 3 The FC 3 function combines the data formats DATE and TIME_OF_DAY (TOD)
and converts these formats into the data format DATE_AND_TIME (DT).
FC 6 The FC 6 function extracts the data format DATE from the format
DATE_AND_TIME.
FC 7 The FC 7 function extracts the day of the week from the format
DATE_AND_TIME. The weekday exists in the data format INTEGER and begins
with 1 = Sunday to 7 = Saturday.
FC 8 The FC 8 function extracts the data format TIME_OF_DAY from the format
DATE_AND_TIME. The input value can only be assigned with a symbolically
defined variable.
Overview The library functions FC1, FC2, FC3 and FC4 are used exclusively in the
following configuration:
• S7-300 CPU with external PROFIBUS CP 342-5
In all other cases, that is, for S7-300 with integrated PROFIBUS-DP interface
and for the entire S7-400 system, the corresponding functions are implemented
with the standard load and transfer commands (L ... , T...) or through SFC14
(DPRD_DAT), SFC15 (DPWR_DAT), SFC11 (DPSYC_FR) and SFC13 (
DPNRM_DG).
FC1 The DP_SEND block transfers the data of a specified DP output area to the
PROFIBUSCP for output to the distributed peripherals.
FC2 The DP_RECV block receives the process data of the distributed peripherals as
well as status information in a specified DP input area.
FC3 The DP_DIAG FC block is used to request diagnostic information. The following
types of job are possible:
• Request DP station list;
• Request DP diagnostic list;
• Request DP single diagnosis (status);
• Read input / output data of a DP slave acyclically;
• Read DP mode.
FC4 The DP_CTRL FC block transfers control jobs to the PROFIBUS CP. The
following types of job are possible:
• Global control acyclic / cyclic;
• Delete older diagnostic data;
• Set current DP mode;
• Set DP mode for PLC/CP stop;
• Read input/output data cyclically;
• Set the operating mode of the DP slave.
FB43 The SFB "PULSEGEN" (pulse generator) is used to structure a PID controller
with pulse output for proportional actuators.
Using SFB "PULSEGEN", PID two or three step controllers with pulse duration
modulation can be configured. The function is normally used in conjunction with
the continuous controller "CONT_C".
FC 60 The FC reads the time-of-day status and the time of the CPU and calculates the
local time from it.
This function is not available for all CPUs. If it is not, the FC 60 gives out an
error message.
Time-of-Day Status You can determine the current time-of-day status of your CPU with the SFC 51
"RDSYSST". The time-of-day status contains the following information:
• correction factor for the clock
• Standard/Daylight-saving Time identification
• Announced hour of transition (the next time the hour changes, the clock is
adjusted from Standard to Daylight-saving or vice versa).
Contents Page
Objectives ........................................................................................................................................ 2
Overview of the S7 Diagnostic Functions ..................................................................................... 3
Writing User Messages in the Diagnostic Buffer ............................................................................. 4
System Function SFC 52 .................................................................................................................... 5
Calling the SFC 52 Block ................................................................................................................ 6
Structure of the EVENTN Parameter of the SFC 52 Block ................................................................ 7
Configuring Your Own Message Texts ............................................................................................. 8
Exercise 1: Interpreting the Error Code of the SFC 52 ……………………………………………….. 9
Exercise 2: Writing a User Message in the Diagnostic Buffer ......................................................... 10
If You Want to Know More ................................................................................................................ 11
SFC 51 System Function - Reading System Status Lists (SZL) ....................................................... 12
SZL Header and UDT Structure ........................................................................................................ 13
Additional Exercise: Reading Out the SZL Sublist "Status of LEDs" ............................................... 14
Diagnostics-capable
CPU
module
Introduction You can enter your own messages in the diagnostic buffer using the SFC 52
system function.
Diagnostics-capable modules, such as analog modules, trigger a diagnostic
interrupt when there is a hardware fault. To obtain additional diagnostic data,
you can call the SFC 59 system function in OB 82.
Another system function (SFC51) lets you read out the System Status Lists.
These lists contain the status of the LEDs on the CPU module, for example.
Send buffer
SEND = TRUE
Diagnostic
buffer
…
SFC 52
“Write User Message“
Introduction The FC 52 system function permits you to write your own messages, for
example, lower limit for hydraulic pressure violated, in the diagnostic buffer.
Parallel to this, the message can also be displayed on the programming device
or OP. The diagnostic messages must be enabled for this purpose.
Program The SFC 52 system function is called and assigned parameters in the user
program. Certain standard texts are stored in the CPU. A parameter of the SFC
selects these texts. You will find more information in the Standard and System
Functions manual, or in the Online Help.
Example SFC 52 is called in the program example, if the analog value of peripheral input
word 304 exceeds the value of 2000 units. The message is output only once as
a result of logic edge detection. The block is assigned parameters in such a way
that a diagnostic message is also output on the PG (SEND = TRUE). The
EVENTN parameter determines the text to be output.
Parameter "SEND" With signal state "1" at the input "SEND" a message is sent to a PG or OP
parallel to the entry in the diagnostic buffer. On the PG, the tool "CPU
Messages" must be activated for this. On the OP (HMI system), a message
window has to be set up in the screen.
Parameter "EVENTN" Fixed texts are assigned to the message numbers in the range W#16#8xxx and
W#16#9yyy. You will find the assignment of the texts to the message numbers
in the "System and Standard Functions" manual in Chapter 29 - Events.
Thus, the text "Manual Mode" is assigned to the message number W#16#9101,
for example.
You can also configure your own message texts. The number range
W#16#Axxx and W#16#Byyy is provided for this.
Parameter "INFO1" With this you can show an accompanying value (wildcard) that is 1 word long in
the message text. Permitted data types are Word, Int and Array [0..1] of Char.
Parameter "INFO2" With this you can show an accompanying value (wildcard) that is 2 words long in
the message text. Permitted data types are DWord, Dint, Real, Time and Array
[0..3] of Char.
Parameter The output parameter "RET_Val“ returns the following error messages:
"RET_VAL"
W#16#0000 no error
W#16#0091 no station (PG/OP) logged on
W#16#8083 data type of INFO1 not permitted
W#16#8084 data type of INFO2 not permitted
W#16#8085 EVENTN not permitted
W#16#8086 length of INFO1 not permitted
W#16#8087 length of INFO2 not permitted
W#16#8091 no station (PG/OP) logged on. This error code only appears for
specific CPU versions.
W#16#8092 Sending is momentarily not possible since the send buffer is
full.
CMP>R
M 0.1 SEND
W#16#A901 EVENTN
RET_VAL #error_sfc52
#dummy INFO 1
Introduction In the slide you can see a program example, in which a user message is
entered in the diagnostic buffer and is displayed through the CPU messages.
Description The SFC 52 block is called conditionally through the input "EN" if the analog
value (MD 120) exceeds the limit of 5000.
The "SEND" input has the signal state "1" and as a result, the message is sent
to a PG logged-in with CPU Messages.
At input "EVENTN" it was specified that the first message of group A is to be
displayed as an incoming event.
You can enter wildcards in the message text through the inputs "INFO1/INFO2".
In the example, the analog value is to be displayed as well.
The "RET_VAL" output delivers an error message if:
• the message cannot be sent because no node is logged-in or the buffer is
full, or
• the SFC52 was assigned parameters with invalid values or formats in the
call.
EVENTN 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
General You can see the structure of the EVENTN parameter in the slide with which you
specify which message text is to be entered in the diagnostic buffer.
Call With the right mouse button, click on an S7 program and select the menu
options Special Object Properties Æ Message... .
Configuring Message Start with the "New message" button. The next free message number, such as
A0003 is suggested.
In the "Default texts" tab you can enter the message text for incoming and
outgoing messages.
In the "Message number" tab, you can change the message number.
Wildcards Up to two wildcards can be inserted in the message text. These values are
passed via the parameter "INFO1/INFO2" of the SFC 52.
In the example, the value of INFO 2 is output as a real number.
To insert a wildcard, you begin and end with the @ character. This is followed
by 1 or 2, depending on whether you want to display the value from INFO1 or
INFO2. The format declaration then follows.
The following format declarations are possible:
• %ix hexadecimal number with i places
• %iu unsigned decimal number with i places
• %id signed decimal number with i places
• %e scaled real number, the exponent is preceeded by e
• %E scaled real number, the exponent is preceeded by E
Example: @1%4u@
inserts the value passed at the parameter INFO1 as a 4-digit
unsigned decimal number into the message
Task Always, at the moment the MANUAL or AUTO mode is switched on (edge
detection required), a corresponding standard message is to be entered in the
diagnostic buffer.
Task If all bays are occupied while in AUTO mode, the message "all bays occupied,
current weight: xxxx" is to be entered in the diagnostic buffer. As a wildcard, the
current weight is to be inserted in the message as a 4-digit unsigned decimal
number (see slide).
What to Do 1. Write a program for the required function in the FC 14 block by calling the
SFC 52 in a new network.
2. Switch on the AUTO mode and let one part be transported to each bay so
that all bays are occupied (all bay indicator lights show a continuous light)
3. Check whether the corresponding message was entered in the diagnostic
buffer.
Solution Hints:
• The current weight is recorded in OB 35 and stored in memory word
"MW_Weight" (MW 36, data type INT).
• The required format declaration is: @1%4u@
Note The following pages contain either further information or are for reference to
complete a topic.
Area of Use Data about the status of modules is stored in the CPU or in diagnostics-capable
modules. This data is stored in system status lists (SZL).
These divide themselves into SZL sublists that are addressed through an
identifier SZL_ID. Every SZL_ID has specific data records assigned to it that are
differentiated by an index.
By reading out a sublist you can obtain additional information for further error
analysis.
Unlike the SFC 59, you can also query performance data (for example, number
of DBs) and status data (for example, key switch position) of the CPU.
SFC 51 Call You will need additional information on the SZL sublists in order to correctly
assign parameters.This can be found in the "System and Standard Functions"
manual. In the following table you will find an excerpt.
ARRAY assignment
UDT 51
“Data record“
SZL_Header For the parameter "SZL_Header" of the SFC 51 block, you need a structure
declaration with the following arrangement: elements "LENGTHDR" and "N_DR"
(both WORD types), that contain information about the number and length of the
data records that are read. You create this structure in a data block or as a local
variable in a logic block.
UDT User-defined / universal data types (UDT) are used as "templates", to
Data Record When you read out the SZL sublist ‘Block Types‘ ( SZL_ID 0019H), you receive
back 5 data records with a length of 4 bytes each. At the output parameter "DR"
of the SFC 51 you are to specify a memory area (data type ANY) which can
accept the 5 data records with 4 bytes each.
Task The system status sublist (ID 0019 (Hex)) is to be read out with the SFC 51 and
stored in DB 51. If the LED "FRCE" is illuminated, the signal "Force_active"
is to be assigned in DB 51.
In the following chapter, this signal triggers an event message on the HMI
system to signal a running force job.
Note If data block DB 51 was assigned the symbol name "DB_LED_Status" in the
symbol table, a symbolic access from the user program could appear as follows:
L "DB_LED_Status ".CPU_LEDs[1].Data_record.led_on
PROFIBUS-DP
Contents Page
Objectives .......................................................................................................................................... 2
Error Analysis when an ET200S Slave Fails .................................................................................... 3
Diagnosis through LED Display (ET 200S) ....................................................................................... 4
BT 200 PROFIBUS Test Device ....................................................................................................... 5
Diagnosis Repeater .......................................................................................................................... 6
Diagnostic Buffer and Hardware Diagnosis when a Slave Fails ...................................................... 7
Error Analysis in OB 86 when a Slave Fails .................................................................................... 8
Principle of Slave Diagnosis ............................................................................................................ 9
Slave Diagnosis with SFC 13 (DPNRM_DG) ................................................................................ 10
Structure of the Diagnostic Data ....................................................................................................... 11
Task: PROFIBUS Diagnostic Package .......................................................................................... 12
Exercise 1: Integrating the WinCC flexible – Station "PC RT" ......................................................... 13
Exercise 2: Parameterizing the Runtime Interface of "PC RT" ......................................................... 14
Exercise 3: Parameterizing the Connection of "PC RT" ................................................................... 15
Exercise 4: Integrating FB125 into the S7 Program ......................................................................... 16
Exercise 5: Testing the PROFIBUS Diagnostic Package with WinCC flexible - Runtime ................ 17
Alarm_S / SQ Procedure ................................................................................................................. 18
Report System Error (1) .................................................................................................................. 19
Report System Error (2) .................................................................................................................. 20
Exercise 6: Integrating "Report System Error" in the S7 Program .................................................. 21
Exercise 7: Displaying Alarm_S Alarm Messages ........................................................................... 22
If You Want to Know More ............................................................................................................... 23
Installing PROFIBUS-DP Slaves Later On ..................................................................................... 24
Diagnostic possibilities
LED There are three LEDs on the IM 151 interface module for error display. For more
information, see the next page.
On the CPU with the integrated DP interface, there are two LEDs (SF DP and
BUSF).
STEP 7 Software When an error occurs, read out the diagnostic buffer or start the "Hardware
Diagnostics" tool (see next page).
User Program When a slave fails and recovers, the error OB 86 is called. The diagnostic
address of the failed slaves is then stored in the start information.
Through the call of system function SFC 13, you get additional diagnostic data
on the slave, as defined in the standard EN 50 170.
The standard block FB 125 provides detailed information right up to the
individual channel. This block is offered on the Internet as a diagnostic package
along with the standard screens for HMI.
LEDs
SF BF ON Meaning
LED off
LED flashes
General There are three LEDs for error analysis on the IM 151 interface module:
• SF Group error (red)
• BF Bus error (red)
• ON Power supply (green).
For a first error analysis use the LED display on the interface module, as
described above.
Area of Application During the installation phase, you can check the PROFIBUS cable with the BT
200 test device. You can check the wiring even with installed nodes. Installation
errors are found quickly and easily; no special PROFIBUS knowledge is
required.
Even before commissioning of the system, it is possible to test the RS 485
interfaces of the PROFIBUS-DP nodes with the BT 200. A listing of accessible
slaves on the wired bus is also possible and that without a master on the
PROFIBUS-DP.
Individual bus segments can be checked for their functionality ahead of time,
which shortens the commissioning times. In case of an error, these last two test
functions are helpful in localizing the error and so minimizing the system
downtimes.
With the help of the optional reporting kit, you can store the individual tests in
the BT 200 and transfer them to a PC. The test results can then be printed out in
the form of a report. The simple and fast creation of an inspection report is thus
possible, for example.
Mode of Operation The Diagnostic Repeater is integrated in the bus system as a standard RS 485
repeater, but it has its own PROFIBUS-DP address:
The Diagnostic Repeater, initiated through STEP 7 or COM PROFIBUS,
determines the topology of the connected segments and stores this in the
internal diagnostic memory.
When there is a fault, the Repeater automatically transmits a standard
diagnostic message to the bus master that contains information on the affected
segment, the location of the fault, the distance of the location and the type of
error.
The error messages are graphically displayed in STEP 7 and COM PROFIBUS.
They are completely integrated into the SIMATIC® System Diagnosis (such as
the function "Report System Error").
Hardware Diagnosis
Diagnostic Buffer In the slide you can see an error message for a DP slave that has failed. In this
case, the slave with the PROFIBUS address 6 has failed.
The "Logical base address of the DP-Slave/Master" corresponds to the
diagnostic address that was entered with the Hardware Configure tool during
parameter assignment. Through this diagnostic address, the master is informed
of the failure and/or the recovery of a DP slave. The CPU then starts OB 86
"Rack_Fault_DP".
As well, you can fetch the entire diagnosis of the DP slave with SFC 13
"DPNRM_DG" at this address and integrate it in the CPU program.
Hardware Diagnosis If you use the "Hardware Diagnostics" tool for troubleshooting, you can
recognize the station that has failed by the red line through the slave icon.
Slave address
e.g. 4 for ET 200S
OB 86 The CPU operating system (CPU 315-2DP or S7-400) calls OB86 when the
failure of a rack, a subnet or a station in the distributed peripherals is detected in
an incoming as well as outgoing event.
If you have not programmed the OB86 and such an error occurs, the CPU goes
into STOP.
Example In the example, the PROFIBUS address of the slave that has failed is identified.
It is located in the right byte of the variable OB86_RACKS_FLTD.
Slave error
OB86
SFC13
EN ENO
??.? REQ RET_VAL ??.?
??.? LADDR RECORD ??.?
BUSY ??.?
Start Info OB 86 In the start information of the OB 86, the CPU operating system stores additional
information as to the cause of the failure.
SFC 13 Every DP slave has slave diagnostic data that are structured according to
EN 50 170 Volume 2, PROFIBUS. You need the SFC 13 "DPNRM_DG" to read
out this diagnostic data.
"DPNRM_DG"
EN ENO
Slave Diagnosis With the SFC 13 "DPNRM_DG" (read diagnostic data of a DP slave), you read
the diagnostic data of a DP slave in the format as defined in the EN 50 170.
After an error-free data transmission, the read data are entered in the target
area that is created by RECORD (OUT 2).
You start the reading process by assigning signal 1 to the input parameter REQ
(IN0) when calling SFC 13.
Structure of the You will find the principle structure of the slave diagnostic data in the following
Slave Diagnosis table. Further information can be found in the manuals on DP Slaves
.
Principle structure of the slave diagnostic data
Byte: Meaning:
0 Station status 1
1 Station status 2
2 Station status 3
3 Master station number
5 Vendor I/O (low byte)
6... Further slave-specific diagnostic information
Diagnostic Data The system function SFC 13 supplies the diagnostic data as can be seen on the
left side in the slide. For this, you create an array of 64 bytes in a data block.
This data area is specified at Parameter "RECORD" of the SFC 13.
Station Status The Station status 1 to 3 provides an overview of the status of a DP slave. The
assignment of Station status 1-2 can be seen on the right of the slide.
In Station status 3, only the bit 7 is relevant. When Bit 7 ="1", there are more
diagnostic messages than the DP slave can store.
Master PROFIBUS The PROFIBUS address of the DP master that parameterized the DP slave
Address and that has reading and writing access to the DP slave is stored in the
diagnostic byte Master PROFIBUS Address,.
Manufacturer ID A code is stored in the manuafacturer identification that describes the type of DP
slave, for example, Hexa 806A for ET 200S with IM 151.
Identification-related The identification-related diagnosis states whether modules of the ET 200S are
Diagnosis faulty or not. The identification-related diagnosis begins from Byte 6 and
includes 9 bytes. From byte 7 onwards, a bit is set for every faulty module. Bit 0
="1" of byte 7 is assigned to module 1, etc.
Module Status The module status outputs the status of the configured modules and represents
the identification-related diagnosis in detail. Stored in the module status is
whether a module is missing or whether it is an incorrect module, for example.
Channel-related The channel-related diagnosis gives you information about channel errors of
Diagnosis modules and represents the identication-related diagnosis in detail. The
channel-related diagnosis signals a channel cable break, for example. The
maximum length is limited by the maximum total length of the slave diagnosis of
64 bytes.
Notes • The diagnostic screens can be used on the HMI devices OP 7, OP 12,
OP 17, OP 27, OP 270, OP 35, OP 37,TP 170B/C, TP 27, TP 270, TP 37,
MP 170, MP 270, MP 370 and ProTool Runtime.
• The FB 125 is called in OB 1, OB 82 and OB 86.
• You can use them in the CPUs with integrated DP interfaces, in the CP 443,
C7, SINUMERIK 840D and WinAC.
Task You are to copy the WinCC flexible station "PC RT" and the required S7 blocks
that are included in the PROFIBUS Diagnostic Package into your project. This
package is provided by Siemens Customer Support.
Task So that the symbols of the S7 program are available in the WinCC flexible
project, the runtime interface must be configured and assigned parameters with
the "HW-Config" tool.
What to Do 1. Open the Hardware Configuration of the WinCC flexible station "RT PC".
2. Configure and assign parameters to the CP5611 module as shown in the
slide.
3. Save and compile the station‘s HW-Config.
Task So that the symbols of the S7 program are available in the WinCC flexible
project, the runtime interface must be configured and assigned parameters with
the "HW-Config" tool.
What to Do 1. Open the Hardware Configuration of the WinCC flexible station "RT PC".
2. Configure and assign parameters to the CP5611 module as shown in the
slide.
3. Save and compile the station‘s HW-Config.
Task So that the diagnostic data of a failed slave is stored in the DB 125 instance
data block, the FB 125 must be called in the organization blocks OB 1, OB 82
and OB 86 with the instance data block DB 125.
A parameterization, that is, the passing of actual operands to the formal
operands of the FB 125 is thereby not necessary.
Task You are to check the function of the PROFIBUS diagnostic package.
Alarm_S The Alarm_S procedure is organized through message numbers which are
automatically assigned during configuration in STEP 7. The unique assignment
of the message texts takes place by means of the numbers. When a fault
occurs, the HMI system receives a message via the message number with an
associated message text.
When a fault occurs, the CPU also stores, along with the status of the message
(activated, deactivated, acknowledged), the time of day and possible process
parameters. This makes an exact diagnosis of the cause of the fault possible.
The message information is stored in the controller and is not immediately
discarded after the message is sent. That way, individual network components
(such as, HMI systems) can still log on and update after the fact.
Benefits Compared to the discrete alarm procedure, ALARM_S offers the following
benefits:
• ALARM_S is an active message procedure. If a message occurs, the CPU
actively sends an appropriate message to all logged on network participants
(no polling).
• The process values always coincide exactly with the values at the time of the
message. This is not guaranteed with the discrete alarm procedure.
• The time stamp states exactly when an event occurred, even if the HMI
system is only connected at a later point in time.
Types of Messages With the message configuration in STEP 7, there are two types of ALARM_S
messages. They differ in the mode of acknowledgement:
• Messages for which there must be an acknowledgement. These messages
are always treated as fault messages.
• Messages for which no acknowledgement is necessary. These messages
can be fault messages as well as operating messages.
Report System Error S7 components and "DP-Normslaves" (slaves whose properties are determined
by their GSD file) can trigger the calls of organization blocks when a system
error occurs (for example, OB 82 is called when there is a diagnostic interrupt of
an analog input module).
The diagnostics-capable S7 components provide information on the system
error that occurred. The start information, that is,the local data of the associated
OB gives out general information about the location (such as logical address of
the module) and type (such as channel error or backup failure) of error.
Beyond that, the error can be specified more exactly (such as Channel 0,
wirebreak) by reading out additional diagnostic information (with SFC 13).
Alarm_S With the "Report System Error..." function, STEP 7 offers a user-friendly way to
display the diagnostic information provided by the component in the form of
messages.
The blocks necessary for this (in the slide FB 49) work internally with the
Alarm_S or Alarm_SQ procedure and are automatically generated or modified
by STEP7. The user simply has to download the generated or modified blocks
into the CPU and transfer the standard texts into the connected HMI devices.
General In the "General" (Report System Error) tab, you specify which function block is
to be used as the diagnostic block (in the slide FB 49). Furthermore, you can
specifiy the behavior of "Report System Error" during the generation process.
OB Configuration In the "OB Configuration" (Report System Error) tab, you define which OBs are
to be supported or which OBs are to be created or are to be expanded by the
call of the block for reporting system errors (FB 49).
CPU in STOP In the "CPU in Stop" tab, you specify for which errors the CPU is to remain in
the RUN state and for which they are to go into STOP.
Messages In the "Messages" (Report System Error) tab, you define which information is to
be output as message texts and in which sequence.
User Block In the "User Block" tab, you define whether one of your own user blocks is to be
called from the diagnostic block (FB 49) and you configure its interface.
Task With the "Report System Error" function, the message block FB 49 and its calls
in various OBs was generated. So that the Alarm_S messages deposited by this
message block are also brought to display on the touchpanel while the program
is running, the display of "S7 Alarms" must still be activated in the Alarm View of
the screens "Template" and "Messages".
Note The following pages contain either further information or are for reference to
complete a topic.
Type Files STEP 7 requires a GSD or a type file for every DP slave, so that you can select
the DP slave from the Hardware Catalog in the HW-Configuration tool.
All properties of a DP slave are stored in a GSD file and they conform to the
PROFIBUS standard. Type files conform to the Siemens specification.
For SIEMENS AG DP slaves, there is a type file for every DP slave type.
DP slaves from other manufacters are supplied with a GSD or a type file.
Integrating DP Slaves A new DP slave can be integrated into the Hardware Catalog as follows:
1. Select the menu options Options Æ Install New GSD ....
2. In the dialog field that then appears open the drive/directory with the
appropriate GSD file.
The slave is entered in the window "Hardware Catalog" (only in the catalog
profile "Standard"!) under "Additonal Field Devices" and is then available for
the configuration.
Contents Page
Objectives .......................................................................................................................................... 2
Communication: PROFIBUS - DP .................................................................................................... 3
Integrating a Drive in the HW Config ............................................................................................... 4
Drive ES (= Engineering System) ..................................................................................................... 5
Overview of the Starter Commissioning Tool .................................................................................. 6
Configuration of a Drive with the Wizard ........................................................................................ 7
Online Operation .............................................................................................................................. 8
Diagnostics Function ........................................................................................................................ 9
Control Panel Function ..................................................................................................................... 10
Exercise 1: Integrating a Drive in the HW Config ............................................................................. 11
Exercise 2: Online Configuration of the Drive with the Wizard ........................................................ 12
Exercise 3: Changing Parameter Ramp-up and Ramp-down Times Online .................................... 13
Exercise 4: Using the Control Panel ................................................................................................. 14
Exercise 5: Controlling the Drive via the TP170B (FC 42) ............................................................... 15
PROFIBUS module
Field Bus A field bus connects distributed sensors and actuators (such as, valves, light
barriers, measuring devices, drives, operator control panels) with the central
PLC. PROFIBUS DP is a manufacturer-independent, open field bus. PROFIBUS
has been standardized and continuously further developed by the PNO
(Profibus User Organization) since 1990.
Master-Slave The master (usually a PLC with a PROFIBUS interface module, such as,
S7-315-2 DP) controls the data communication on the bus. Slaves only send
data when they are prompted by the master. That way, no collision results
between two senders.
Cyclical Range The slaves are cyclically (= one after the other) supplied with process data by
the master and their process data is scanned. In Drives, process data are, for
example,
• speed setpoint, switch-on signals from the master or
• actual speeds, error signals from the drive.
The data telegrams consist of 2 to 16 words (á 16 bit).
Cycle times lie between about 2 to 20 ms.
Event-driven Range As well, there is often the need to read or change the parameters of a drive. This
occurs (in today‘s applications) only when prompted. The cyclic operation is
then briefly interrupted and a longer data telegram with up to 117 words is sent.
Master Class 2 The "normal" master is called Master Class 1. For commissioning, you can also
connect a PC or PG (= SIMATIC programming device) as a Master Class 2.
Independent of the actual data communication, the Master Class 2 can access
the drives.
PROFIBUS Address The minimum requirement for commissioning the PROFIBUS option module is
the setting of the PROFIBUS address.
General The cyclic data exchange between CPU and MM4420 via PROFIBUS must be
configured in HW Config.
Properties
Dialogs The following properties are defined in the dialogs:
PROFIBUS interface: PROFIBUS address and subnet
SINAMICS: Firmware version of the Micromaster (to be found on the nameplate
of the MM420 such as, "Issue: A06/1.17")
DP Slave: In addition to the I/O addresses for data exchange between CPU and
Micromaster, the type of communication must be defined here:
Drive ES Basic Enables you to integrate the drives as objects in the SIMATIC Manager. They
then appear in the project tree, like for example, SIMATIC CPUs.
In this manner, the commissioning software of the drives is then also started.
Drive ES SIMATIC This package contains STEP 7 Block Libraries (= Data and function blocks) for
user-friendly configuration of communication using PROFIBUS DP.
Drive ES PCS7 This package contains faceplates for user-friendly configuration of the process
control system PCS7.
Starter The "STARTER" commissioning software for drives supports the user in:
• parameter assignment
• commissioning
• diagnosis
• the service of MICROMASTER 4.
STARTER can be executed as stand alone. The tool is, however, also
integrated in the Drive ES configuration program from Totally Integrated
Automation.
Wizard For standard applications of the drive, the parameter assignment with the help of
the Wizard is sufficient. Comparable to the quick commissioning via Parameter
P3900, only the most important parameters are queried here in the dialogs.
Online Configuration Usually, the reconfiguration of the drive is done online with the Starter Wizard
since a reset to factory default is carried out at the conclusion of a
reconfiguration, similar to a quick commissioning via Parameter P3900 and
further parameters are overwritten with newly calculated values. After a
successful online configuration, the values of all parameters can then also be
stored offline.
Online/Offline With the "Starter" software, you can work in the OFFLINE and ONLINE mode.
Depending on the mode, you can use various functions. You can see whether
the system is in the ONLINE or the OFFLINE mode at the bottom of the work
window.
Online Mode In the ONLINE mode, you have a communication connection from the "Starter"
to the drive. You can configure the drive, carry out the drive diagnosis, control
the drive through the PC/PG and load the new parameter data into the drive.
During the switch into the ONLINE mode, the project is checked for consistency.
A check is made as to whether the drives configured in the project exist and are
connected. If the consistency check is successful, the icons of the drives have a
green background in the project navigator. If there is an error, the icons have a
red background.
You establish an ONLINE connection to the drive either with the icon or
with Project Æ Connect to target system.
Note For the ONLINE mode, the drive must be connected to the PC/PG through a
PROFIBUS cable and the interface has to be configured on the PC/PG.
Changing Parameters A parameter that is changed, first appears in the "Starter" as yellow. After
pressing the "Enter" key, the modified parameter becomes effective. Since the
parameters are first stored in the RAM memory of the Micromaster, they are lost
when you have Power OFF. To permanently store the parameters either use the
menu option Target System Æ Copy RAM to ROM or load the configuration with
Target System Æ Download Æ to target device and confirm the prompt "Do you
really want to copy RAM to ROM? ".
Activate In the ONLINE mode, you start the function with a double-click in the left window
on "Diagnostics".
Control/Status Word In this tab you can follow how the control word is output from the CPU, for
example. The bits displayed in green have signal state "1".
Status Parameter In this tab, the most important parameters, such as, frequency setpoint or output
current are displayed.
Usage For diagnostics and maintenance, you can issue control commands to the
Micromaster from the PC/PG. As well, the most important parameters can be
monitored online.
What to Do 1. Double-click on the object "Control Panel" in the left window (Project
navigator).
2. You may have to enlarge the lower window containing the control panel.
3. Click the "Assume control priority" button.
4. Read the message "Transfer control priority to the PC? " and continue with
"Yes".
5. Take note of the messages in the follow-up screen and accept with "OK" .
6. Activate the option "Enables (bit 1 to bit 6)".
7. In the field "Setpoint", enter the setpoint frequency, for example, 10 Hz.
8. With the "I" button switch on the drive and with the "0" or the space bar
switch off the drive. The "I/0" button is for jog operation.
9. Give back the Control priority by clicking on the " Return... " button and
acknowledge the message that follows.
General The cyclic data exchange between CPU and MM4420 via PROFIBUS must be
configured in HW Config. Proceed as follows:
Result When the MM420 has been successfully parameterized and integrated in the
hardware configuration of the S7 Station, the LED of the MM420 PROFIBUS
interface shows a green flashing or constant light.
online
Store
configuration offline
Task The MM420 of your training station is to be reconfigured according to the motor
data using the "Starter" tool.
What to Do 1. Open the "Micromaster_420" of the S7 station with the "Starter" tool by
double-clicking on "Micromaster_420" in the right window.
2. In Starter, open the entire project structure of the "S7_300_Station" by
clicking on the small x‘s.
3. Establish an online connection to the MM420
Project Æ Connect to target system
4. Double-click on "Configuration" and then on "Reconfigure drive ..."
5. In the follow-up screens, enter the motor rating plate data and confirm the
standard settings in the following.
In the "Command Source/Setpoint Source" tab, enter the following
parameters:
• Source of control signals? CB at COM Link (6)
(CB at COM Link (6) means P0700 = 6 means PROFIBUS)
• Source of speed setpoints?: CB at COM Link (6)
(CB at COM Link (6) means P1000 = 6 means PROFIBUS)
In the "Main Parameters" tab, enter the following parameters:
• Ramp-up time: 4.0s (means P1120 = 4.0s)
• Ramp-down time: 3.0s (means P1121 = 3.0s)
6. Save the project
Project Æ Save
7. Establish an online connection to the MM420
Project Æ Connect to target system
8. On the BOP, check whether the values specified by you were assigned to
the parameters.
Task In order to become familiar with the possibility of also changing individual
parameters later on, you are to reparameterize the ramp-up and ramp-down
times of the ramp-function generator.
Notes It is only possible to save offline; downloading the configuration is only possible
online.
Task Control the drive using the "Control Panel" of the "Starter" software.
AI2
AI1 AO1 -15V...+15V
AO2
0
10
V
AI1 AI2
Task The drive is now to be controlled via the program or via the touchpanel screen
"MM 420". The motor can be jogged via the buttons "Jog Left" and "Jog Right"
and can be switched on and off with the speed to be set on the simulator
potentiometer AI2 using the buttons "On" and "Off".
Controlling the drive is already programmed in the FC42 block that is now to be
commissioned and then expanded by you.
Task #2 In addition to the control of the MM420 via touchpanel operation, the MM420 is
now also to be controlled parallel to the conveyor model motor:
- if the conveyor model motor is jogged to the left or right via the screen
"Conv", the MM 420 is also to be controlled accordingly in parallel
- with the transport functions while in AUTO mode, the MM 420 is also to be
switched on and off automatically
PROFINET IO
Contents Page
Objectives .................................................................................................................................... 2
Objectives of PROFINET ............................................................................................................. 3
Components of the PROFINET Standard .................................................................................. 4
Real-time Data Exchange via Ethernet ….................................................................................... 5
PROFINET Real-time Communication ....................................................................................... 7
Controlling the Network Access ................................................................................................. 8
Definition of Terms ..................................................................................................................... 9
PROFINET IO Distributed Field Devices .................................................................................... 10
The Current PROFINET IO Product Line .................................................................................... 11
PROFINET Network Structures ................................................................................................. 12
Network Topologies ................................................................................................................... 13
Definition of Terms ................................................................................................................... 14
Structure of the IP Address (Internet Address) ........................................................................... 15
Switching the PG / PC Interface to Industrial Ethernet ............................................................. 16
Verifying the Required Protocols ................................................................................................. 17
Node Initialization: Assigning an Ethernet Address …................................................................. 18
Exercise 1: Assigning the IP Address for a PG ............................................................................ 20
Exercise 2: Configuring a PROFINET- IO Basic System ............................................................ 21
Exercise 3: Configuring an ET 200S as IO Device .......................................................................... 22
Exercise 4: Assigning a Device Name for the ET200S Online .................................................... 23
Exercise 5: Assigning a Device Name for the ET200S Offline .................................................... 24
Exercise 6: Downloading a Configuration in the IO Controller ..................................................... 25
Exercise 7: Total Check of the Network ...................................................................................... 26
Exercise 8: Connecting the Conveyor Model, TP170 and MM420 to the PROFINET Case ........ 27
Exercise 9: Commissioning the PROFINET Case ...................................................................... 28
Introduction to PROFINET
Interface definition for Industrial Ethernet
Basic configuration of a PROFINET IO system
Assigning device names and IP addresses
Process
Real-Time
Safety Communi-
cation
IT-Standards Distributed
& Security PROFINET Field Devices
Network Motion
Installation Control
Distributed
Intelligence
Automation devices that conform to the PROFINET standard must provide the
user with certain communications interfaces that are based on the Microsoft
Standard "DCOM" (Distributed Component Object Model).
Process
Real-Time
Safety Communi-
cation
IT-Standards Distributed
& Security PROFINET Field Devices
Network Motion
Installation Control
Distribued
Intelligence
PROFINET CBA enables you to break down system parts into technological modules
(components). The representative of a technological module in system
engineering is the so-called PROFINET component. Each PROFINET
component has one interface that contains the technological variables that are
exchanged with other components. The PROFINET components are modelled
using the standardized COM technology. COM is an advancement in object-
orientation and enables the development of applications based on prefabricated
components. The components are characterized by the fact that they form self-
contained units and can be related to other components. The components can
be flexibly combined like blocks and independent of the internal implementation
can easily be reused. The access mechanisms to the component interfaces are
uniformly defined in PROFINET.
PROFINET IO With PROFINET IO, the integration of distributed field devices takes place
directly on the Ethernet. For that, the Master-Slave procedure from PROFIBUS
DP is carried over into a Provider-Consumer model. From the communication
point of view, all devices on the Ethernet have equal rights. Through the
configuration, however, the field devices are assigned to a central controller. As
a result, the familiar user view in PROFIBUS is transferred to the PROFINET
peripherals: The distributed peripheral device reads in the peripheral signals
and transfers them to the controller. The controller processes them and
transfers the outputs back to the distributed peripheral device.
Mit PROFIDrive With PROFIDrive, very fast, clocked drive controls for high performance Motion
Control applications will be implemented in the future.
Net Data
Nutzdaten
Ethernet- Ethernet-
Layer -1 Frame Frame
Layer 4alsasApplikationsschnittstelle
Layer-4 application interface Optimized Layer
Optimierter 2 access
Layer-2 -Zugri ff
Prerequisite The analysis of different TCP/IP implementations has shown that with standard
communications stacks considerable run times are required for processing data
packets. These run times can be optimized but the TCP/IP stack necessary for
this is then no longer a standard product, rather a proprietary implementation.
With the use of UDP/IP implementations you have much the same situation.
Speed According to experience, the transmission speed on the line at 100 MBit
Ethernet or above can be neglected compared with the processing in the
devices.
The time it takes for the preparation of data in the application of the provider is
not influenced by the communication. This is also true for the processing of
data received in the consumer.
Hence it follows that primarily through suitable optimization of the
communication stack or removal of individual layers as of Layer 2 could result
in considerable improvements in the update rates and thus the real-time
behavior in the provider and the consumer.
Net Data
Nutzdaten
Ethernet- Ethernet-
Layer -1 Frame Frame
Layer 4alsasApplikationsschnittstelle
Layer-4 application interface Optimized Layer
Optimierter 2 access
Layer-2 -Zugri ff
Real-time
TCP/UDP channel for user data
IP
2 RT 2 Real-time channel
z High performance
Ethernet transmission
z Cyclic data
z Event-driven
Messages
IRT Channel Isochronous Real-time (IRT) as a further development with the following
features:
• Clocked data transmission
• Cycle times <1ms with jitter accuracy <1µs
• Typical field of application is motion control
Priority Assignment The network components control the data flow between the devices via a
priority assignment according to IEEE 802.1q. Priority 7 (Network Control) is
used as the standard priority for real-time data. A priority handling vis-à-vis
other applications, such as, Internet telephony with Priority 5 and video
transmissions with Priority 6 is thus ensured.
For real-time communication, network components and controllers available in
the market can be used. While the optimized communication channel is
negotiated, the switch modules automatically learn the Ethernet addresses of
the devices. With that, the basis for the following data exchange via the real-
time channel is created.
Controller Controller
Network Components Network components suitable for PROFINET must be designed for Fast
Ethernet (100 MBit/S) and full-duplex transmission. In full-duplex operation, a
network component receives and sends data simultaneously on the same port.
The collision detection is deactivated with full-duplex. No bandwidth is lost
through the Ethernet collision procedure.
Network configuration is significantly simplified since the check on the length of
the distance within a collision domain is not required.
Switch A switch receives data packets at its network interfaces and forwards these
with the help of the address information in the data packet. Data are only output
to the interface through which they reach their receiver. A switch can
simultaneously send and receive different data at all interfaces. PROFINET
requires a switch as "application-specific device" in the signal dispatcher.
For use in PROFINET, a switch must fulfill the following functions:
• 100 MBit/s Fast Ethernet interfaces (100BASE-TX or 100BASE-FX)
• Full-duplex operation
PROFINET IO - Controller:
Exchange of peripheral signals with associated field devices
Access to the peripheral signals via process image
PROFINET IO - Device:
Field device assigned to the IO Controller
PROFINET IO - Supervisor:
Engineering and Diagnostic Station
Configuration
Configuration
Peripheral
Peripheral Signals
Signals
Field Device Interrupts
Interrupts
IO Device
General With PROFINET IO, the integration of distributed field devices takes place
directly on the Ethernet. For that, the Master-Slave procedure from PROFIBUS
DP is carried over into a Provider-Consumer model. From the communication
point of view, all devices on the Ethernet have equal rights.
Through the configuration, however, the field devices are assigned to a central
controller. As a result, the familiar user view in PROFIBUS is transferred to the
PROFINET peripherals:
The distributed peripheral device reads in the peripheral signals and transfers
them to the controller. The controller processes them and transfers the outputs
back to the distributed peripheral device.
Device Types PROFINET IO makes a distinction between the three device types IO
Controller, IO Device and IO Supervisor:
z IO - Controller: Controller in which the automation program is
executed
z IO - Device: Remotely assigned field device assigned to an IO
Controller
z IO - Supervisor: Programming device / PC with commissioning and
diagnostic functions
Device configuration
as usual
General Distributed field devices are integrated through PROFINET IO. The familiar IO
look of PROFIBUS DP is used, in which the field devices' user data are
cyclically transferred into the controller's process image.
CPU 31x-2 P/DP The new CPU 315 / 317-2 PN/DP augments the line of PROFINET devices by
an SIMATIC S7-300 CPU in the highend range. With the two connectors for
Industrial Ethernet and PROFIBUS, it can be used as a transition between
these two networks. The CPU31x-2 PN/DP works as IO Controller, to which
various IO Devices can be connected.
ET 200S PN The ET200S distributed I/O system is a highly modular, extremely flexible DP
slave and/or IO device with IP20 degree of protection.
The ET 200S I/O system is integrated in the PROFINET IO communication as
IO device via the IM151-3 PN interface module. Directly next to the interface
module which transfers the data to the IO controller, you can slot up to 63
modules, such as, power modules, peripheral modules and motor starters in
just about any combination and number that you like.
IE/PB Link As an independent module, the IE/PB Link PN IO forms the seamless transition
between Industrial Ethernet and PROFIBUS.
By means of the IE/PB Link PN IO as proxy, existing PROFIBUS DP devices
can continue to be used and integrated into a PROFINET IO real-time
communication. In addition, it supports S7 Routing so that the connected
PROFIBUS slaves can be addressed and diagnosed across the networks via
PG/OP communication.
As a PROFIBUS master, the proxy coordinates the data exchange between the
PROFIBUS nodes. At the same time, it is an Ethernet node with PROFINET
communication. Proxies can be implemented as controllers or as pure
gateways.
CPU41x
CPU317-2 PN/DP + CP443-1 Advanced STEP7 V5.3 SP2
CPU315-2 PN/DP Softnet PN IO
CP 343-1 PN
SCALANCE Switch
IE/PB Link IO
TP / OP with
WinCC Flexible
ET200S PN
Vision Sensor
PROFIBUS Devices
(DPV0 Slaves)
SCALANCE X The Ethernet Switch modules of the SCALANCE series are available in three
different versions: X100, X200, X400.
Provided that they are configured in HW Config, they can be diagnosed like a
field device so that they themselves can make a detailed diagnoses directly
available when, for example, a connected IO device fails. The X200 and the X400
Switch modules also offer the possibility of web-based diagnosis by means of
SNMP (Simple Network Management Protocol).
CP 443-1 Advanced The CP443-1 Advanced makes the system connection of S7-400 to PROFINET
possible. It has an integrated 4-port switch, a web-server and enables PROFINET
as well as standard communication. The CP443 works as IO Controller, to which
various IO Devices can be connected.
SIMATIC VS 130 SIMATIC VS 130 is a very powerful Vision Sensor for application-specific picture
processing. It adapts itself flexibly to different object interfaces and coding
procedures. Four sensor-head versions for different data-matrix code sizes are
available. With the Vision Sensor VS 130, a reliable parts identification in
production is possible (such as, type designation, serial number, batch number).
SOFTNET PN IO Using SOFTNET PN IO, PCs can be connected to field devices via Industrial
Ethernet. Here, the PC acts as IO controller.
SOFTNET PN IO is available for the interface modules CP 1612 (PCI) and CP
1512 (PC Card). It also provides the interfaces for the OPC access to IO devices
as well as a programming interface via a C-Library.
Campus CD CD
Distributor
Building Building
Office Building BD BD Production
Distributor
Machine
Floor MD MD Distributor
Distributor
FD
Floor 1
FD
Guidelines The PROFINET Installation Guidelines describe the various network structures
in PROFINET networks.
It is common practice to segment individual control systems with their
networks. PROFINET connects these systems with higher-level switch
modules.
The attention should be given to the cascading depth of the switch modules
and to the "not real-time" traffic.
Note The basic guidelines are described in the PROFINET Installation Guidelines.
The most current version of the particular document can be downloaded from
the PROFIBUS User Organization.
• http://www.profibus.com/downloads/frameset.html
Ring
Line
Tree
Star
Star Structure Through the structuring with switch modules, a star-shaped network topology
automatically results.
With this structure, unlike other structures, when a single PROFINET device
fails it does not automatically lead to the failure of the entire network. The
failure of a switch merely leads to the failure of a part of the communication
network.
Through the star structure with switch modules you achieve a high degree of
availability of the communication network right from the beginning. If you would
like to increase the availability then you configure the central switch modules as
redundant.
Applications for star structures include areas with a high device density and
short distances, such as, small production cells or a single production machine.
Tree Structure If you interconnect several switches with one another, a tree-shaped network
topology results.
It is used in the division of complex systems into smaller partial systems.
Line Structure All communication nodes are interconnected one after the other in a line. If a
coupling element (such as a switch) fails, then communication beyond the
failed coupling element is no longer possible.
The line structure is used mainly in systems with extensive structures, for
example, conveyor systems and for connecting production cells.
IP = 192.168.111.99 IP = 192.168.111.100
1 MAC = 08-00-06-01-CA-FE 2 MAC = 08-00-06-01-AD-AC
ARP To determine the Ethernet address of the recipient, the IP driver makes use of
the ARP – protocol structure (Address Resolution Protocol).
In each TCP/IP-capable computer, there is such an ARP table which lists the
assignment of IP address to Ethernet address.
MAC Address Since all stations are connected to one common bus cable, it is necessary for
targeted addressing that each participant has its own address under which it is
then accessible on the network.
For this, each Ethernet Interface has been assigned a fixed and world-wide
unique address from its manufacturer. This address is termed hardware - or
MAC address (Media Access Control). It is stored on the network card and
serves as the unique identification in the local network. Cooperation between
the manuafactures guarantees that the address is unique world-wide.
DNS DNS ("Domain Name Service") administers the computer names and the IP
address assignments.
Note The network with the number 127 cannot be used (Loopback Interface of the
IP implementation: 127.0.0.1 = localhost).
Host IDs whose bits are all set to 0 or 1 are reserved for special functions,
such as, broadcasting, and may not be assigned as a result.
Carefully check the assignment of the IP addresses, if nececessary, with the
support of the DV Administration.
Properties Via the "Properties" button of the Interface parameter assignment used and
"Network Properties", you get to the Network and Internet Connections
properties (Windows – Control Panel, see next page).
UDP The User Datagram Protocol (UDP) guarantees an error-free and complete
data transmission, just like TCP. Unlike TCP, however, UDP is connectionless.
That is, each data packet is treated like an individual packet and there is no
transport acknowledgement. Because time-out monitoring and connection build
up and disconnection does not take place, UDP is better suited for time-critical
applications than TCP.
Checking You should make sure that the protocols "PROFINET IO RT-Protocols" and
"DLC" are installed on the computer so that a smooth engineering and a
successful commissioning of the PROFINET - IO system can take place.
Via the Properties of the TCP/IP Protocol, an IP address is assigned to the PG
/ PC in the following.
1
Look for MAC address or
enter directly
IP Configuration 1. First of all, use the "Browse..." button to determine the devices accessible
via the MAC addresses or enter the MAC address that you know.
2. Then, select, if necessary, from the list in the dialog which pops up after the
network search, the module with the MAC address that you know.
If the module was already assigned an IP address, it is also displayed here.
The MAC address of the component you selected is shown once more
underneath the list for verification.
3. Set up the IP configuration according to your specifications.
4. Click the button "Assign IP Configuration".
Notes If you have selected the dialog in the context of a selected module, then the IP
address is already preassigned with the values configured for the module.
Otherwise, you have to enter IP address, Subnet mask and, if necessary,
Gateway here.
DHCP Server If the IP address is to be obtained from a DHCP server, the DHCP server is
provided with the MAC address of the CP, the device name or the Client ID that
is entered here, depending on the selected option.
The Client ID is a (character) string with a maximum of 63 characters. Only the
following characters may be used: a-z, A-Z, 0-9 and - (hyphen).
If you want to specify that the DHCP server is to determine the IP address via a
device name, you must assign the device name for the device first.
Flashing On Test This function is used to check the correct assignment of a module and its
interface. When you click on this button, the transmission of a flash telegram is
triggered for the selected module. The module indicates this signal (for
example, on the Link LED).
New IP address
Prerequisites So that the addressing described here can be done, the module must be
accessible online. That means:
• The connection to the Ethernet LAN must be established;
• The Ethernet interface of the PG / PC must be accessible for STEP 7
• The node must be located on the same Ethernet subnet as the computer.
• The node must support the functions "IP Configuration" and "Assign device
name". If the S7 CPU doesn‘t support this possibility, then the IP address
and the device name must be downloaded to the system via the S7
Hardware Configuration Tool.
What to Do 1. Use the "Browse..." button, to determine the devices accessible via the
MAC addresses.
2. After the network search, the module with the appropriate MAC address
can now be selected from the list that pops up.
3. Press the "Assign address" button to store the settings in the respective
device.
4. On the Ethernet subnet (PROFINET IO system), the device name must be
unique. Press the "Assign Name" button to transfer the edited device name
to the device.
Device Names If you configure a device as PROFINET IO device, you must assign a
PROFINET IO device name. Make sure, however, that the device name is
preferably setup in the Properties dialog and thereby is stored in the
configuration data.
The device name is also required if the IP address is to be determined by a
DHCP server via a device name. The device name is to be structured
according to DNS conventions.
Example: [Name from short designation].[Name of the IO system]
OK Cancel Help
Network Properties Through the "Network Properties..." button, you get to the Control Panel of
Windows; dialog box "Network" (taskbar Start Æ Settings Æ Control Panel Æ
Network and Internet Connections). From here, you can access the settings of
your PC‘s network components.
IP Address The following example describes how you can set the IP address. The setting
in the field "Primary Network Registration" has no effect on the intended
change of the IP address. Proceed as follows in order to change the IP
address:
1. From the list "The following network components are installed" select the
network protocol "TCP/IP".
2. Click on the "Properties" button. Reaction: The dialog field "Properties for
TCP/IP" appears.
3. Select the "General" tab and choose the option "Define following IP
address".
4. In the "IP address" field enter the desired address and the subnet.
Access Control If the CPU 31x-2 PN/DP is connected to the PG / PC by means of "cross-over
cables" or via the SCALANCE X208 switch, you can access the CPU via the IE
interface. Use the "Accessible Nodes" function in the SIMATIC Manager to do
so and check the contents of the Blocks folder.
Load PLC
Control
Task You are to configure a PROFINET basic system with a CPU 31x-2 PN/DP as
PROFINET controller.
What to Do 1. Create an S7 project with the name PROFINET. Make the S7 online access
to the CPU 31x PN /DP possible via Industrial Ethernet / TCP / IP and
check this with the Ping function.
2. In the SIMATIC Manager, carry out a CPU memory reset via the menu
option PLC… . Don‘t forget to also erase the MMC memory module. If the
CPU is not accessible, then assign it an IP address as described in Point 3.
3. Provide the CPU module with an IP address. Use 192.168.111.X0 as the IP
address. X symbolizes the number of your training unit. This IP address
belongs to a Class C network with the subnet mask 255.255.255.0. Assign
the created IP configuration!
4. Read out the actual configuration using the menu options PLC Æ Upload... .
To do so, you must browse the network for accessible nodes. Complete and
specify the hardware configuration. Parameterize a clock memory byte.
5. Insert a PROFINET IO system. To do this, you must double-click on the X2
interface of the CPU. After that, you must assign a device name.
After you press "OK" to confirm this, you can insert the PROFINET IO
system with the help of the right mouse button. Load you CPU with the
modified configuration data.
6. Via the menu options PLC Æ Ethernet check the IO Controller’s device
name and, if necessary, assign it a name.
7. If necessary, create the organization blocks OB82, OB83, OB85 and OB86
and download these into your PLC.
Task You are to configure a PROFINET basic system with a CPU 31x-2 PN/DP as
IO controller and an intelligent terminal ET 200S as PROFINET IO device.
What to Do 1. Start the SIMATIC Manager and open your project called "PROFINET".
2. From the Hardware Catalog, using drag & drop, insert the IM 151-3 PN
interface module from the Catalog PROFINET IO Æ I/O Æ ET 200S.
3. From the Hardware Catalog, extract the individual ET 200S modules
according to the actual design of the PROFINET IO device in the
configuration table.
4. Save and compile the hardware configuration with the menu option Station
Æ Save and compile.
5. Insert the MMC. The MMC is absolutely necessary for the operation of the
ET 200S PN !
If you want to use an MMC with unknown contents, you should first erase it
on the PG.
6. Interconnect the components (star structure with SCALANCE)
7. Switch on the power supply for the Switch module (SCALANCE X-208) and
the CPU 31x-2 PN/DP.
The Status LEDs of the CPU 31x-2 PN/DP show the following response:
DC 5V Æ lights up and SF Æ is off.
8. Switch on the power supply for the IM 151-3 PN (ET200S). You can expect
the following response: BF Æ flashes, the LEDs ON and LINK light up. In
addition, the SF LEDs of all electronic modules light up.
9. Observe the startup of all involved network components.
Note The over-all system is not yet ready for operation at this point in time.
Task Assignment and control of IP address and device name for the intelligent
terminal ET 200S.
Prerequisite In order to assign a name for the interface module ET 200S PN, an online
connection from the PG to the IO device via a switch module is necessary.
What to Do 1. Assign a device name for the IM 151-3 PN via the menu options PLC Æ
Ethernet Æ Assign Device Name... .
2. If you are using several IO devices, then several IO devices will also be
displayed in the dialog box "Assign Device Name". In this case, compare
the MAC address of the device with the displayed MAC address, and then
select the correct IO device.
3. In the dialog box "Assign Device Name", click on the button "Assign Name"
so that the name on the inserted MMC in the interface module can be
stored.
After the name has been assigned, the device name that you assigned is
displayed in the dialog box.
4. As a check, carry out a node flashing test and observe the response of the
ET 200S. To do so, click on the "Flashing On" button.
The PING command is not possible in this case, since the IM 151-3 PN
has not yet been assigned an IP address (takes place in the next exercise).
Note If you would like to store the device name directly on the MMC, insert it in the
appropriate slot in the PG and execute the menu command PLC Æ Save
Device Name to Memory Card.
In addition to the device name, STEP 7 also assigns a device number when an
IO device is inserted. This device number begins at "1" and you can use it to
identify an IO device in the user program (for example, SFC71 "LOG_GEO").
Unlike the device number, the device name is not visible in the user program.
Task You are to assign a device name for the IO device ET 200S PN.
What to Do 1. In the Hardware Configuration, open the dialog “Properties - IM 151-3 PN“
and enter the device name for the IO device.
2. Via the dialog “Edit IP Addresses“, you can, if necessary, change the IP
address in the permitted range.
By default, the CPU 31x-2 PN /DP assigns additional IP addresses as of the
configured basic IP address (IO controller) numerically in ascending order,
if this option has not been switched off.
3. Save and compile the hardware configuration with the menu option Station
Æ Save and compile.
Result With that, the hardware is completely configured and can be loaded into the IO
controller and commissioned in the exercise after next.
Note Device name, IP address and MAC address are absolutely necessary so that
an IO device can be uniquely assigned to an IO controller.
Task 1 Download the over-all system via Industrial Ethernet and check the startup
activities of the IO controller.
What to Do 1. Download the compiled hardware configuration into the CPU 31x-2 PN/DP.
To do so, select the menu option PLC Æ Download... .
2. After the configuration has been downloaded, the CPU automatically
assigns the configured IP address to the IO device during the startup. If the
subnet has been correctly set up and the configuration matches the actual
set up of the IO device, then the IO device is ready for cyclic data
exchange.
3. Observe the LEDs on the various devices:
The BF2 - LED on the CPU begins to flash after the hardware configuration
is loaded. If the CPU can correctly configure and assign parameters to the
IO device on the network, the BF2 - LED on the CPU as well as the still
flashing BF - LED on the ET 200S goes out.
4. Check the accessibility with the PING command.
5. Transfer the configured clock memory byte to the output modules of the
ET 200S PN.
Task 2 If, in the course of this course, you have developed an executable program,
download it into the IO controller:
• if necessary, the hardware addresses for the conveyor have to be adapted
(rewiring or reconfiguring the hardware).
Task Control and analyze the network design you have in front of you:
• Browse through your network for the configured nodes
• Further network nodes such as the IE/PB Link and the SCALANCE X-208
switch module will be configured in the next exercises
• Get an overview of your network with the "NETPRO" Tool.
PROFIBUS DP
Task The conveyor model is now to be operated through the ET200S of the
PROFIBUS case with unchanged functionality and controlled via PROFINET.
Since the TP170B and the MM420 do not have a PROFINET interface, they
are networked with the CPU-2PN/DP via PROFIBUS DP.
What to Do 1. Connect the conveyor model to the PROFINET case (the SUB-D connector
is located on the back of the case) and turn on the conveyor model once
more using the "ON" pushbutton.
2. Connect the touchpanel and the MM420 with a PROFIBUS cable with the
CPU‘s DP interface.
3. Connect the Ethernet interface of the PG with any slot of the SCALANCE.
What to Do 1. Copy the complete S7 program of the old "S7_300_2DP-Station" onto the
CPU of the new "S7_300_PN-Station" (the system data that is also copied
but does not fit will be overwritten when "Save and compile" is done on the
new station).
2. Create the hardware configuration of the new "S7_300_PN-Station" as
shown in the slide (the IE/PB Link and the SCALANCE do not have to be
configured).
3. Give the I/O modules of the ET200S the I/O addresses shown in the slide -
8 and 9 - or – if possible – via "Pack addresses" only the I/O address 8.
4. Create the DP master system "PROFIBUS (2)" and on it configure the
MM420 (since you are working with the new "DP-Mastersystem(2)", you
can adopt the address 6 of the MM420 unchanged).
5. Open the Hardware Configuration of the TP170B and logically network it
with the newly created "PROFIBUS(2)".
6. In the configuration of the TP170B, exchange in the connections the old
"S7_300_2DP-Station" for the new "S7_300_PN-Station".
7. Adapt – if necessary – the I/O conveyor addresses used in the S7 program
to the ET200S addresses using "Rewire".
8. Check all the functions of your system.
Result The system works with the new "S7_300_PN-Station" just like it did with the old
"S7_300_2DP-Station".
Contents Page
Objectives .......................................................................................................................................... 2
TeleService ...................................................................................................................................... 3
Product Support ................................................................................................................................. 4
Updating the CPU‘s Operating System (1) ........................................................................................ 5
Updating the CPU‘s Operating System (2) ........................................................................................ 6
STEP 7 goes Internet (1) .................................................................................................................. 7
STEP 7 goes Internet (2) .................................................................................................................. 8
Introducing the ServiceLab Software Package ................................................................................ 9
The Concept of ServiceLab .............................................................................................................. 10
Recording and Displaying Analog Signals with ServiceLab ............................................................ 11
PG 740
Modem Modem
Area of Use By using SIMATIC TeleService, you can connect automation systems (S7/M7-
300/400 and C7-600) to the PG/PC using the telephone network.
By integrating the TeleService software (option package), you can have the
same STEP 7 functionality remotely as locally using the MPI connection. The
"extension of the MPI interface through the telephone network" enables you to
make error analysis, troubleshooting, startup and update/upgrade measures.
With TeleService it is possible to access a geographically distributed system.
General Customer Support is there to support you in all your questions on automation
technology, SIMATIC for example.
Either call the Technical Support, or find current product information on the
Internet.
Internet The Internet contains information that is divided into the following categories:
• Frequently Asked Questions (FAQs) - with the most frequently asked
questions and their answers,
• Tips and Tricks - with program examples, for example,
• Downloads - for downloading operating system updates, manuals etc., for
example,
• User information - with information on new products, module version states
etc.,
• Manuals - with a listing of the relevant manuals.
General The firmware (operating system) of the CPU can be upgraded when an update
is offered on the Internet.
1 2
Memory Card • in the SIMATIC Manager, use the menu options PLC Æ Update Operating
System, (see 1)
• choose the directory in which the extracted files are to be stored (see 2),
• start the programming of the memory card by clicking the button "Öffnen"
(Open),
• wait for the message that states that the firmware update was transferred
successfully (see 3).
Carrying Out Update • switch off the rack‘s power supply in which the CPU is slotted,
• insert the memory card with the update,
• switch the power supply back on, the operating system is then transferred
from the memory card to the CPU (all LEDs on the CPU are illuminated),
• wait till the STOP LED flashes slowly,
• switch the power supply off and remove the memory card with the update
and insert (possibly) a memory card with the user program,
• switch the power supply on, carry out a memory reset and download the user
program, if no memory card exists,
• check to see whether the update was carried out by calling the "Module
Information" tool and checking the version in the "General" tab.
Product Support You can display information on modules or components in the HW Config
Information directly through the Internet.
Requirements Your PG has an Internet connection and a browser to display Internet pages.
Information about the module is available (extent of information can vary
depending on the module or the time of the information search).
You have enabled the function in the settings of HW Config (menu options
Options Æ Customize) and have chosen a valid Internet page.
What to Do 1. Select the components in the Hardware Catalog or in the rack for which you
wish information.
2. Choose the menu options Help Æ Product Support Information
The Internet page you called up offers links to topics such as FAQs,
product information or manuals that are connected to the components you
selected.
STEP 7 Hardware
Configuration
Internet
Symbolik
DB Parametrieren
Hardware Update From STEP 7 V5.2 onward, you can install components for the Hardware
Catalog after the fact.
That way you have the opportunity to bring in individual components such as
new CPUs or new distributed peripheral devices in the current version of
STEP 7, without having to install a new service pack.
Requirements A valid Internet address and a valid path for the local folder "HW Updates" has
to be set up. The settings can be installed in the dialog for the HW Update using
the "Settings" button.
To download HW Updates, you must have an Internet connection.
What to Do 1. Select the menu options Options Æ Install HW Updates.
2. In the follow-up dialog, you determine whether you want to download a HW
Update from the Internet or whether you want to copy a HW Update from a
CD or whether you want to install already downloaded updates (selection
possible).
3. Choose the components that are to be installed and click on the "Install"
button.
Module
list
Area of Application ServiceLab is a specially developed software for all users of SIMATIC S7(-300/-
400)/S5 PLCs. Through its direct connection to SIMATIC S7/S5 you have the
possibility of capturing, displaying and evaluating process data on your
programming device (PG), PC, or Notebook.
With ServiceLab, you can easily access all data that is stored in the process
images of the PLC and process, visualize and archive it.
In conjunction with TELESERVICE, ServiceLab is a powerful tool for remotely
monitoring a system and troubleshooting via modem.
z Data logging
Concept ServiceLab has been designed for application in the following areas:
• Checking the operating patterns of systems and machines
• Capturing, checking, and evaluating process data from the
system/machine(trouble shooting)
• Preparing measurement records for quality control
• Permanent monitoring of system data
Additional Advantages:
• Recording, monitoring, and saving in real-time
• Various possibilities of monitoring
• Action-controlled measuring
• Quick and simple measuring arrangement with intuitive user guidance
• Various possibilities of evaluation
• Simple data exchange with EXCEL and other Windows programs
• Various archiving possibilities of process data, such as, in a ring buffer
Contents Page
Symbols .......................................................................................................................................... 2
Symbols (continuation) .................................................................................................................... 3
C3 E1: STOP Troubleshooting ....................................................................................................... 4
C3 E1-8: Commissioning user programm (OB1) ............................................................................ 5
C3 E1-8: Commissioning user programm (OB 86) ......................................................................... 6
C3 E2: Commissioning - Startup Program and Operating Mode Section (OB100) ........................ 7
C3 E2: Commissioning - Startup Program and Operating Mode Section (FC 15) .......................... 8
C3 E2: Commissioning - Startup Program and Operating Mode Section(TP-Programm) .............. 9
C3 E3: Commissioning - Checking the Weight (OB35).................................................................... 10
C3 E3: Commissioning - Checking the Weight (OB35).................................................................... 11
C3 E3: Commissioning - Checking the Weight (TP-Programm) ..................................................... 12
C3 E4: Commissioning - Controlling the Conveyor Motor (FC 16) ................................................. 13
C3 E4: Commissioning - Controlling the Conveyor Motor (TP-Programm) ..................................... 14
C3 E4: Commissioning - Controlling the Conveyor Motor (FC 16) ................................................. 15
C3 E5: Commissioning - Monitoring the Transport Functions (FC 17) ............................................ 16
C3 E5: Commissioning - Monitoring the Transport Functions (FC 17) ............................................ 17
C3 E6: Commissioning - Conveyor Model – Indicator Lights(FC 14)............................................... 18
C3 E6: Commissioning - Conveyor Model – Indicator Lights(FC 14) ............................................. 19
C3 E6: Commissioning - Conveyor Model – Indicator Lights(FC 14) .............................................. 20
C3 E7: Commissioning - Counting Parts and Statistics(FB 18) ...................................................... 21
C3 E7: Commissioning - Counting Parts and Statistics(FB 18) ....................................................... 22
C3 E7: Commissioning - Counting Parts and Statistics(FB 18) ....................................................... 23
C3 E7: Commissioning - Counting Parts and Statistics(FC 28) ....................................................... 24
C3 E7: Commissioning - Counting Parts and Statistics(FC 28) ...................................................... 25
C3 E7: Commissioning - Counting Parts and Statistics(FC 28) ...................................................... 26
C4 E1, 3: Replacing Traditional Counters with IEC Counters (FB 18) ............................................ 27
C4 E1, 3: Replacing Traditional Counters with IEC Counters (FB 18) ............................................ 28
C4 E1, 3: Replacing Traditional Counters with IEC Counters (FB 18) ............................................ 29
C4 E2, 4: Replacing Traditional Counters with IEC Counters (FB 17) ............................................ 30
C5 E1: Part 1 - Storing Part Weight Values (FC 35) ........................................................................ 31
C7 E1: Part 2: Writing a User Message in the Diagnostic Buffer (FC 15)........................................ 32
C9 E5: Controlling the Drive via the TP170B (FC 42) ..................................................................... 33
C9 E5: Controlling the Drive via the TP170B (FC 42) .................................................................... 34
Trainings-Center ST-SERV3
for Automation and Drives Page 1 Solutions
Symbols
Trainings-Center ST-SERV3
for Automation and Drives Page 2 Solutions
Symbols (continuation)
Trainings-Center ST-SERV3
for Automation and Drives Page 3 Solutions
C3 E1: STOP Troubleshooting
STOP - Errors:
Error Break location Error location Correction
CALL FC 28 CALL FC 28
2 FB 18, Network 10 FB 18, Network 10
Thumbw: DBW 2 Thumbw: IW 2
Trainings-Center ST-SERV3
for Automation and Drives Page 4 Solutions
C3 E1-8: Commissioning user programm (OB1)
STOP-Error
CALL FC150 -> CALL FC 15
Trainings-Center ST-SERV3
for Automation and Drives Page 5 Solutions
C3 E1-8: Commissioning user programm (OB 86)
Trainings-Center ST-SERV3
for Automation and Drives Page 6 Solutions
C3 E2: Commissioning - Startup Program and Operating Mode Section
(OB100)
Logic- error
B#16#81 -> B#16#82
Trainings-Center ST-SERV3
for Automation and Drives Page 7 Solutions
C3 E2: Commissioning - Startup Program and Operating Mode Section
(FC 15)
Logic- error:
M 30.5 is always = 0,
Because of an error in the
TP-Progr.
Trainings-Center ST-SERV3
for Automation and Drives Page 8 Solutions
C3 E2: Commissioning - Startup Program and Operating Mode Section
(TP-Programm)
Logic-error:
Reset Bit -> set Bit
Trainings-Center ST-SERV3
for Automation and Drives Page 9 Solutions
C3 E3: Commissioning - Checking the Weight (OB35)
STOP-Error
PIW 340 -> PIW 304
Trainings-Center ST-SERV3
for Automation and Drives Page 10 Solutions
C3 E3: Commissioning - Checking the Weight (OB35)
Logic error
<=R -> >=R
Trainings-Center ST-SERV3
for Automation and Drives Page 11 Solutions
C3 E3: Commissioning - Checking the Weight (TP-Programm)
Logic-error:
Total_Quant -> MW_Weight
Trainings-Center ST-SERV3
for Automation and Drives Page 12 Solutions
C3 E4: Commissioning - Controlling the Conveyor Motor (FC 16)
Logic- error:
M 30.2 is always = 0,
Caused by an error in the
TP- Programm
Trainings-Center ST-SERV3
for Automation and Drives Page 13 Solutions
C3 E4: Commissioning - Controlling the Conveyor Motor (TP-Programm)
Logical-error:
M_Conv_Jog_LEFT_HMI -> M_Conv_Jog_RIGHT_HMI
Trainings-Center ST-SERV3
for Automation and Drives Page 14 Solutions
C3 E4: Commissioning - Controlling the Conveyor Motor (FC 16)
Logic- error:
O Q 4.3 -> ON Q 4.3
Trainings-Center ST-SERV3
for Automation and Drives Page 15 Solutions
C3 E5: Commissioning - Monitoring the Transport Functions (FC 17)
Logic- error:
S5T#0MS -> S5T#6s
Logic- error:
M 33.3 -> M 33.1
(see the TP-Programm)
Trainings-Center ST-SERV3
for Automation and Drives Page 16 Solutions
C3 E5: Commissioning - Monitoring the Transport Functions (FC 17)
Trainings-Center ST-SERV3
for Automation and Drives Page 17 Solutions
C3 E6: Commissioning - Conveyor Model – Indicator Lights(FC 14)
Trainings-Center ST-SERV3
for Automation and Drives Page 18 Solutions
C3 E6: Commissioning - Conveyor Model – Indicator Lights(FC 14)
Logical- error:
O Q 4.3 -> ON Q 4.3
Trainings-Center ST-SERV3
for Automation and Drives Page 19 Solutions
C3 E6: Commissioning - Conveyor Model – Indicator Lights(FC 14)
Trainings-Center ST-SERV3
for Automation and Drives Page 20 Solutions
C3 E7: Commissioning - Counting Parts and Statistics(FB 18)
Logic- error:
>=1 -> &
Trainings-Center ST-SERV3
for Automation and Drives Page 21 Solutions
C3 E7: Commissioning - Counting Parts and Statistics(FB 18)
Trainings-Center ST-SERV3
for Automation and Drives Page 22 Solutions
C3 E7: Commissioning - Counting Parts and Statistics(FB 18)
STOP- error:
DBW 2 -> IW 2
Trainings-Center ST-SERV3
for Automation and Drives Page 23 Solutions
C3 E7: Commissioning - Counting Parts and Statistics(FC 28)
Trainings-Center ST-SERV3
for Automation and Drives Page 24 Solutions
C3 E7: Commissioning - Counting Parts and Statistics(FC 28)
Trainings-Center ST-SERV3
for Automation and Drives Page 25 Solutions
C3 E7: Commissioning - Counting Parts and Statistics(FC 28)
Trainings-Center ST-SERV3
for Automation and Drives Page 26 Solutions
C4 E1, 3: Replacing Traditional Counters with IEC Counters (FB 18)
Trainings-Center ST-SERV3
for Automation and Drives Page 27 Solutions
C4 E1, 3: Replacing Traditional Counters with IEC Counters (FB 18)
Trainings-Center ST-SERV3
for Automation and Drives Page 28 Solutions
C4 E1, 3: Replacing Traditional Counters with IEC Counters (FB 18)
Trainings-Center ST-SERV3
for Automation and Drives Page 29 Solutions
C4 E2, 4: Replacing Traditional Counters with IEC Counters (FB 17)
Trainings-Center ST-SERV3
for Automation and Drives Page 30 Solutions
C5 E1: Part 1 - Storing Part Weight Values (FC 35)
Logic- error:
+ 0 -> + 1
Trainings-Center ST-SERV3
for Automation and Drives Page 31 Solutions
C7 E1 Part 2: Writing a User Message in the Diagnostic Buffer (FC 15)
Logic- error:
Word -> DWord
Trainings-Center ST-SERV3
for Automation and Drives Page 32 Solutions
C9 E5: Controlling the Drive via the TP170B (FC 42)
Trainings-Center ST-SERV3
for Automation and Drives Page 33 Solutions
C9 E5: Controlling the Drive via the TP170B (FC 42)
Trainings-Center ST-SERV3
for Automation and Drives Page 34 Solutions
What´s Next?
Contents Page
Do You Still have Questions about Our Learning Offers? ............................................................. 2
... on the Internet under “www.siemens.com/sitrain“ .................................................................... 3
ST1 SIMATIC S7 Components for Totally Integrated Automation ............................................... 4
More Information on the Products ................................................................................................ 5
Product Support ........................................................................................................................... 6
Do you need service and support? .............................................................................................. 7
Access to expert know-how in the Service & Support portal ........................................................ 8
Communications in the Service & Support portal ......................................................................... 9
... just a few mouse clicks away from the required information 1/2 .............................................. 10
... just a few mouse clicks away from the required information 2/2 .............................................. 11
General We‘ll be glad to help with any questions you may have about our course
selections.
... with the Infoline You are connected with a Training Center in your vicinity.
Tel. 01805 23 56 11
Fax 01805 23 56 12
Learning Offers Through a simple Search or an extended Search, you will find the entire
spectrum of our current learning offers – from classroom courses, to distance
learning, to our online learning program.
Accessibe through the menu item "Training"
Partner Find your Training contact worldwide.
Accessible through the menu item "Partner"
Shop Ordering learning media and course registration worldwide with easy and fast
tools.
Accessible through the menu item "Shop"
Learning Paths Interactive learning paths simplify the search for the appropriate learning offer,
online tests determine your knowledge for a specific course.
Accessible through the menu item "Training" and "Learning Paths" in the left
Navigation
Learning The ordered Web-based Training are stored in the learning environment and
Environment are started from there.
Accessible through the menu item "Training" and "Learning Environment" in
the left Navigation
Simple Search Through the simple search and the expanded search, the entire spectrum of
Extended Search of our current learning offers unfolds – from classroom courses, to distance
learning, right up to the online learning program.
Learning Paths Interactive learning paths simplify the search for the appropriate learning offer,
online tests help to determine your knowledge for a particular course.
Learning In the learning environment, the web-based training you order is stored and it
Environment is started from there.
Demo Versions Here you can test selected demo versions of our WBTs and refresher courses.
ST-SERV1 5
ST-PRO1 5 Days ST-7TIA 4 Days
Days
You will find more information on the products on this page under "Our Offer"
Æ "Products".
General Information Customer Support is there to help you with all your questions on Automation,
such as, SIMATIC.
Either call the hotline, or get the current product information on the Internet.
Internet On the Internet you‘ll find all the information divided into the following
categories:
• Frequently Asked Questions (FAQs) with the most frequently asked
questions and their answers,
• Tips and Tricks with program examples, for example
• Downloads, such as operating system updates, manuals, etc.,
• User information with information on new products, module versions etc.,
• Manuals with listings of relevant manuals.
Communications - Forum:
Direct customer - customer communications in case of technical questions
Support request:
- Technical requests are answered by experts
Product support
Services and information
Technical information and
downloads for products Information on range of
services offered by A&D
Information on
automation solutions
General The online support with its comprehensive information system and many types
of services is available around the clock. From product support over service
information to interactive services, online support is always your first step you
need to take for obtaining a quick solution.
Product Support Profound expertise in our products and systems and up-to-date information are
the Product Support's support know-how basis in form of FAQs, downloads of,
for example, updates / upgrades, up-to-date product information from Marketing
& Sales, manuals in electronic form in PDF format, test certificates and
characteristics
Applications & Tools Applications & Tools is the new platform for solutions and system overviews in
the Service & Support portal. Applications & Tools help you solve your
automation tasks. This support is provided in the form of programming examples
and tools, background knowledge, functional descriptions, recommendations on
possible actions, performance data etc. The focus is not on the individual
product but rather on the individual products working together.
Services Here you can find our complete range of services and detailed information on
our Service & Support processes and a database containing the contact
persons.
Information Are you looking for the latest Service & Support brochures - or do you want to
know at which trade show you can meet us personally? All of this and much
more can be found under "Information".
Technical Forum
Discussion platform for
customers
Support Request
Online requests to the A&D
hotline
Technical Forum In addition to the comprehensive scope of services, we support the direct dialog
among experts with the help of modern web technology. The new Technical
Forum is an attractive discussion platform (English and German) where users
and experts can exchange information.
Support Request With the online Support Request you will always find direct answers to your
questions. In the online screens you can describe your requests. Through the
knowledge base you will immediately be informed about possible solutions. If
the suggested solution does not resolve your problem, you can send the web
form direct to your team of experts in Technical Support (Hotline).
An intelligent,
comprehensive
Search function
To find the required information, you can use the intelligent Search function and a
the user-friendly navigation:
Search An intelligent and comprehensive search function provides you with the relevant
results.
Navigation You can also do a targeted search in the product tree to obtain
the required information. Use the index for easy selection of the product.
Registration After registering with our service "mySupport", you can utilize our complete
range of online services after entering your data only once.
myTree Your personal product tree. As a mySupport user, you can adjust the product
tree so that it only shows those products and services from the comprehensive
A&D range that are important to you.
Thus you can always maintain an overview and find the required information
faster.
myForum Direct access to our Technical Forum. As mySupport user you also
automatically have direct access to our Technical Forum