Sie sind auf Seite 1von 24

Contents

Pag

Memory Concept of the S7-300


........................................................................................................................
Memory Concept of the S7-400
........................................................................................................................
Loading Blocks into /out of Flash EPROM Memory Card
..............................................................................
Hardware Configuration and Parameter-assignment
......................................................................................
Inserting a Station
............................................................................................................................................
Starting HW Config
...........................................................................................................................................
Generating a Hardware Preset Configuration
...............................................................................................
Module Address Overview
.............................................................................................................................
CPU Properties
..............................................................................................................................................
CPU Properties: General
............................................................................................................................
CPU Properties: Startup
................................................................................................................................
CPU Properties: Retentive Memory
..................................................................................................................
CPU Properties: Cycle / Clock Memory
..........................................................................................................
CPU Properties: Protection
..............................................................................................................................
CPU Properties: Diagnostics / Clock
................................................................................................................
Saving the HW Preset Configuration and Downloading in Module
...............................................................
Uploading the HW Actual Configuration to the PG
...........................................................................................
Displaying Hardware Diagnostics in the SIMATIC Manager ............................................................................. 19
Possible Problems with Configuration
............................................................................................................
Variable Addressing
.........................................................................................................................................
Accessing the Symbol Table
.............................................................................................................................
Exercise: Reading
g Out and Adapting
p g the Actual Configuration
g
........................................................................
Exercise: Assign Parameters to Clock Memory and Test It
.............................................................................

Training Center
for Automation and Drives

Page 1

2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
20
21
22
23
24

ST-7PRO1
HW Configuration and Memory Concept

Load Memory

The load memory is part of a programmable module. It contains load objects


created
t d on th
the programming
i device
d i ( logic
l i blocks,
bl k d
data
t bl
blocks,
k additional
dditi
l
information).
The load memory can either be a plug-in memory card or an integrated RAM.

Work Memory

The work memory contains only the data relevant at run time.
The RAM work memory is integrated in the CPU and is backed up through the
battery.

System Memory

The system memory contains the memory areas for:


Process image input and output tables (PII, PIQ)
Bit memories
(M)
Timers
(T)
Counters
(C)
L stack
(L).

Retentive Memory

The retentive memory is a non-volatile RAM used for backing up bit memories,
timers, counters and data blocks even if there is no backup battery. You specify the
areas to be backed up when assigning the CPU parameters
parameters.

Inserting a
Memory Card

When you insert a memory card, the operating system requests a memory
reset.(STOP LED flashes slowly). You perform the memory reset by turning the
mode selector to the "MRES" position. The sections of the program relevant for
execution are then transferred from the memory card (with load memory function) to
the work memory.
The memory card must remain inserted while the program is being executed.

Training Center
for Automation and Drives

Page 2

ST-7PRO1
HW Configuration and Memory Concept

Load Memory

The load memory can either be a plug-in memory card or an integrated RAM. In the
S7 400 the
S7-400,
th memory card
d (RAM or Fl
Flash
h EPROM) expands
d th
the iintegrated
t
t d lload
d
memory. A memory card is always required, since the integrated load memory only
has a limited size.

Work Memory

The work memory contains only the data relevant at run time.
The RAM work memory is integrated in the CPU and is backed up through the
battery.

System
y
Memory
y

The system
y
memory
y contains the memory
y areas for:
Process image input and output tables (PII, PIQ)
Bit memories
(M)
Timers
(T)
Counters
(C)
L stack
(L).

Memory Card

When a RAM memory card is used, the system must be operated with a battey.
This is so that the memory card data and those of the internal RAM are backed up if
there is a p
power failure.
When an FEPROM memory card is used, the user program is stored in the memory
card, power failure safe. The data found in the internal RAM are backed up through
the battery.
The "Restart" mode is only possible in a backed up system.

Inserting a
Memory Card

When you insert a memory card, the operating system requests a memory reset
(STOP LED flashes slowly). You perform the memory reset by turning the mode
selector to the "MRES" p
position. The sections of the p
program
g
relevant for execution
are then transferred from the memory card (load memory) to the work memory.
The memory card must remain inserted while the program is being executed.

Training Center
for Automation and Drives

Page 3

ST-7PRO1
HW Configuration and Memory Concept

Introduction

When you use an FEPROM card, it is possible to operate the CPU without battery
b k
backup.
Th
The program iis stored
t d iin th
the FEPROM,
FEPROM power ffailure
il
safe.
f
You can define retentive areas in the HW Configuration.
In the S7-300, the retentive data (timers, counters, bit memories, data areas) are
stored in a retentive memory area of the CPU (non-volatile RAM).

Insert / Remove

When you remove or insert a memory card, the CPU requests a memory reset. When
you insert a RAM card, the user program must be reloaded from the PG. When you
insert an FEPROM card, its contents are copied into the work memory.

Power Failure

After a Power Off without battery backup,


backup the blocks are copied from the memory card
into the work memory and with the S7-300, the retentive data are supplied from the
non-volatile RAM.
Data areas in DBs, that were defined as retentive (only with the S7-300), resume the
state they had before power failure. Non-retentive data areas are set to the original
values that are stored in the memory card.

Changing the
Program

When you make block corrections, the modified blocks are stored in the work
memory. When you upload the blocks into the PG, these are retrieved from the work
memory.
y
After a power failure (without battery), the work memory (RAM) is erased. So that the
corrected blocks are available once more after a Power On, they have to be:
1. saved on the hard disk when you operate without EPROM memory card,
2. saved on the hard disk or on a memory card when you operate with EPROM
memory card.

Loading the
Memory Card

You either transfer the blocks onto the memory card (inserted in the PG) through
the SIMATIC Manager per drag and drop or with some CPUs, you can write directly
into the CPU using the menu options PLC -> Download to EPROM Memory Card on
CPU The
CPU.
Th memory card
d mustt b
be erased
d fifirst.
t
Individual blocks can be reloaded but cannot be deleted or overwritten.

Training Center
for Automation and Drives

Page 4

ST-7PRO1
HW Configuration and Memory Concept

HW Configuration

The modules are supplied from the factory with preset parameters. If these default
settings
tti
are OK,
OK a h
hardware
d
configuration
fi
ti is
i nott necessary.
A configuration is necessary:
if you want to modify preset parameters or addresses of a module (e.g.
enable the hardware interrupt of a module)
if you want to configure communication connections
with stations with distributed peripherals (PROFIBUS-DP)
with S7-400 stations with several CPUs (multicomputing) or expansion racks
with fault-tolerant programmable logic controllers (option package).

Preset
Configuration

When you configure a system, a so-called preset configuration is created. It


contains a hardware station with the planned modules and the associated
parameters. The PLC system is assembled according to the preset configuration
and during commissioning, the preset configuration is downloaded into the CPU.

Actual Configuration In an assembled system, the actual existing configuration and parameter
assignment of the modules can be read out of the CPU. A new HW station is
thereby set up in the project.
This is necessary,
necessary for example,
example if the project structure does not exist locally at the
PG. After the actual configuration is read out, the set parameters can be checked
and then stored in a project.
Notes

Training Center
for Automation and Drives

With the S7-400, the CPU can be assigned parameters in such a way, that when
there are differences between the preset configuration and the actual configuration,
the startup of the CPU is interrupted.
To call the HW Config tool, a hardware station must exist in the SIMATIC Manager.

Page 5

ST-7PRO1
HW Configuration and Memory Concept

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.
The name automatically given to this station "SIMATIC 300 (1)" can then be
changed by you.

Training Center
for Automation and Drives

Page 6

ST-7PRO1
HW Configuration and Memory Concept

HW Config

This tool helps you to configure, assign parameters to and diagnose the hardware.

Starting HW Config

To start the HW Config tool:


select a hardware station in the SIMATIC Manager and choose the menu
options Edit --> Open Object or
double-click on the Hardware object.

"Hardware
Configuration"

This is a window of the "HW Config application which you use for inserting
components from the "Hardware Catalog" window.
The title bar of this window contains the name of the project and the station name.

"Hardware Catalog"

To open the catalog:


select the menu options View -> Catalog or
click on the
icon in the toolbar.
If Standard is selected as the catalog profile, all racks, modules and interface
modules are offered for selection in the "Hardware Catalog" window.
You can create your own catalog profiles containing frequently used elements by
selecting the menu options Options -> Edit Catalog Profiles.
Profibus Slaves, that do not exist in the catalog, can be added after the fact. To do
so, you use so-called GSE files that are supplied by the manufacturer of the slave
device. The GSE file contains a description of the device. To include the slave in the
hardware catalog, use the menu options Options -> Install New GSE Files and then
Options -> Update Catalog. You will find the new devices in the catalog under
Profibus additional field devices.

Training Center
for Automation and Drives

Page 7

ST-7PRO1
HW Configuration and Memory Concept

Generating a
P
Preset
t
Configuration

This means specifying how the modules are to be arranged in the rack. This
configuration
fi
ti specified
ifi d b
by you iis referred
f
d tto as th
the presett configuration.
fi
ti

Rack

For example, you open a SIMATIC 300 station in the Hardware Catalog.
Catalog "RACK-300" contains 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.
p

Power Supply

If a load current power supply is required, you insert, with a double click or per
drag&drop, the appropriate "PS-300" module from the catalog in slot no.1 in the list.

CPU

You select the CPU from the "CPU-300" catalog, 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).
fi
ti
)
If this position is also to be reserved in the actual configuration for the later
installation of an IM, you must insert a dummy module DM370 (DUMMY).

Signal 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).
You insert modules in the list by selecting the slot and then double-clicking on the
module you want in the catalog.
Y can iinsertt modules
You
d l anywhere
h
i th
in
the lilistt b
by using
i d
drag&drop.
&d

Training Center
for Automation and Drives

Page 8

ST-7PRO1
HW Configuration and Memory Concept

R
S
DP
IF

Rack number
Slot number of the relevant module
only relevant when using Distributed Peripherals (I/O)
Interface module ID when programming the M7 system (in C++).

Free Address
Assignment

When the CPU 315-2DP is used, you can assign addresses to the modules
independently of the slots in which they are installed:
1. Open HW Config
2 Double
2.
Double-click
click on the module whose address you want to change
change. The
"Properties" window opens.
3. Set the starting address you want on the "Addresses" tab page.
The end address is automatically updated by the system.

Training Center
for Automation and Drives

Page 9

ST-7PRO1
HW Configuration and Memory Concept

Assigning
P
Parameters
t

Training Center
for Automation and Drives

You assign parameters to the modules to adapt them to the requirements of the
process.
What to do:
1. Select a module in the station window.
2. Double-click the selected module to open the "Properties" dialog window.
3. This dialog window contains 9 tabs in which you can assign parameters
for the various CPU characteristics (see next pages).

Page 10

ST-7PRO1
HW Configuration and Memory Concept

"General" Tab

The "General" tab page provides information about the type of module, its location
and,
d iin th
the case off programmable
bl modules,
d l
th
the MPI address.
dd

MPI Address

If you want to network several PLCs via the MPI interface, you must assign a
different MPI address to each CPU.
Click the "Properties" button to open the "Properties - MPI Node" dialog window,
which contains the two tabs: "General" and "Parameters".

Training Center
for Automation and Drives

Page 11

ST-7PRO1
HW Configuration and Memory Concept

Startup
Ch
Characteristics
t i ti

The S7-300 and S7-400 CPUs have different startup characteristics.


F the
For
th moment,
t we shall
h ll only
l llook
k att th
the startup
t t characteristics
h
t i ti off the
th S7-300.
S7 300 Th
The
special features of the S7-400 will be discussed in a later chapter.

Complete Restart

The S7-300 only recognizes the "Complete restart" type of startup. Newer S7-CPUs
also have the "Cold restart" startup version .

Monitoring Times

"Ready message from modules (x100ms):"


Maximum time for all modules to issue a Ready message after power ON.
If the modules do not send a Readyy message
g to the CPU within this time, the
actual configuration is not equal to the preset configuration.
For example, in a multi-tier configuration, all power supplies can be switched
on within this time without paying attention to a particular sequence.

"Transfer of parameters to modules (x100ms):"


Maximum time for "distributing" the parameters to the parameter-assignable
modules (timing begins after "Ready message from modules").
If, after the monitoring time has run out, all modules have not been assigned
parameters, then the actual configuration
p
g
is not equal
q
to the p
preset
configuration.

Startup if Preset
Configuration Not
Equal to Actual
Configuration

Only with CPUs with integrated DP interface (and S7-400) can you use the
"Startup if preset configuration not equal to actual configuration" checkbox to
decide whether the CPU should startup if the preset configuration is not the
same as the actual configuration (number and type of modules installed).
The other S7300 CPUs go into RUN when the preset configuration is not the same
as the actual configuration.
g

Training Center
for Automation and Drives

Page 12

ST-7PRO1
HW Configuration and Memory Concept

Retentive Memory

The "Retentive Memory" tab page is used for specifying the memory areas to be
retained
t i d after
ft a power failure
f il
or on transition
t
iti from
f
STOP to
t RUN.
RUN
A "complete restart" is performed in both cases on the S7-300.

Complete Restart
with
Backup Battery

On complete restart, the blocks stored in the battery-backed RAM (OB, FC,
FB, DB) as well as the bit memories, timers and counters defined as retentive
are retained. Only the non-retentive bit memories, timers and counters are reset.

Complete Restart
without
Backup Battery

If the RAM is not battery-backed, the information in it is lost. Only the bit
memories timers and counters defined as retentive and the retentive data block
memories,
areas are saved in the non-volatile RAM area.
After a complete restart, the program must be downloaded again:
from the memory card (if inserted) or
from the PG (if no memory card exists).

Training Center
for Automation and Drives

Page 13

ST-7PRO1
HW Configuration and Memory Concept

Cycle

"Scan cycle monitoring time (ms):"


- If this time is exceeded the CPU goes into the STOP mode.
Possible causes why this time is exceeded: Communications processes,
frequently from interrupt events, errors in the CPU program.
- If you have programmed an error OB 80, the scan cycle time is doubled.
After that, the CPU also goes into the STOP mode.
"Cycle load from communication (%):"
- Communication (e.g. data transmission to another CPU via MPI or test
functions, that was triggered by PG) is restricted to the specified
percentage
t
off the
th currentt scan cycle
l time.
ti
- Restricting the cycle load can slow down communication between CPU
and PG.
- Example: Restricting communication to 20% results in a maximum
communication load of 20ms for a scan cycle time of 100ms.

Size of the
Process Image

With the CPU 318-2 and several S7-400 CPUs, you can specify the size of the
process image (in bytes). The process image area always begins with input or
output byte 0
0.

Clock Memory

Clock memories are bit memories that change their binary value periodically (markto-space ratio 1:1).
Each bit in the clock memory byte is assigned a particular period/frequency.
Example of a flashing light with a flashing frequency of 0.5Hz:
(Period = 2s, light ON = 1s, light OFF = 1s).

Training Center
for Automation and Drives

Page 14

ST-7PRO1
HW Configuration and Memory Concept

Preset Option

Preset characteristics (protection level 1; no password assigned):


Th position
The
iti off th
the kkeyswitch
it h on th
the CPU d
determines
t
i
th
the protection:
t ti
Keyswitch in RUN-P position or STOP: no restrictions
Keyswitch in RUN position: read-only access possible!

Password

If a protection level was assigned with a password (only valid until a memory reset),
a "person who knows the password" has reading and writing access.
"The person who doesnt know the password" has the following restrictions:
protection level 1: corresponds to the preset characteristics
protection level 2: read-only access possible, irregardless of the keyswitch
setting
tti
protection level 3: neither reading nor writing access possible, irregardless
of the keyswitch setting.

Characteristics of a Password-protected Module in Operation


Example: if you want to execute the function "Modify Variable", you must enter the
password for a module that has been assigned the protection level 2 parameter.
Access Rights
You can also enter the password for a protected module in the SIMATIC
Manager:
1. Select the protected module or its S7 program
2. Enter the password by selecting the menu options PLC -> Access Rights. The
access rights, after a password has been entered, is only valid until the last S7
application is completed.
Operation

Training Center
for Automation and Drives

The cycle load for test functions is regulated with this.


In Process operation, test functions such as "Monitor" or "Monitor/Modify Variable"
are restricted in such a way that the permitted scan cycle time increase that is set
cannot be exceeded.
exceeded Testing with breakpoints and single-step
single step (program execution)
cannot be performed.
In Test operation, all test functions through the PG/PC can be used without
restrictions, even if they cause the scan cycle time to be greatly increased.

Page 15

ST-7PRO1
HW Configuration and Memory Concept

System Diagnostics

If the "Record cause of CPU STOP" checkbox is deactivated (not checked), no


message is sent to the PG / OP when the CPU goes into Stop mode ("CPU
Messages").
The cause of the stop is still entered in the diagnostic buffer.

Clock

The possibilities of synchronizing the clocks in a device network are discussed in


the chapter "Troubleshooting".
It is, however, also possible to automatically adjust the time on the clock of a standalone device by a specified correction factor
factor.

Correction Factor

The correction factor is used for correcting an inaccuracy of the clock over 24 hours.
The correction factor can be either positive or negative.
Example: If the clock is 3 seconds fast after 24 hours, this can be corrected with the
factor "-3000ms".

Note

Training Center
for Automation and Drives

p , "Time-Of-Dayy Interrupts"
p and "Cyclic
y
Interrupt"
p are discussed in the
The "Interrupts",
chapter "Organization Blocks".

Page 16

ST-7PRO1
HW Configuration and Memory Concept

Save

You select the menu options Station->Save to save the current configuration in the
currentt project
j t (without
( ith t generating
ti system
t
data
d t blocks).
bl k )

Save and Compile

When you select the menu options Station->Save and Compile or click the
icon in the toolbar, the configuration and parameter assignment data is
also saved in system data blocks.

Consistency Check

You select the menu options Station -> Consistency Check to check whether it is
possible to generate configuration data from the entries made.

Download in Module You select the menu options PLC ->


> Download or click the
toolbar to download the selected configuration to the PLC.
The PLC must be in "STOP" mode!

icon in the

System Data Blocks The SDBs are generated and modified when you configure the hardware.
System data blocks (SDBs) contain configuration data and module parameters.
They are stored in the work memory of the CPU on downloading.
This makes it easier to replace modules, because the parameter assignment data is
downloaded to the new module from the system data blocks on startup.
In the programming device, the system data blocks are saved under: Project \
Station \ CPU \ S7_program \ Blocks \ System_data.
You double-click the My Briefcase icon
to open the list of system data blocks.
If you use a memory card as Flash EPROM, you should save the SDBs there as
well. That way, the configuration is not lost if you operate without battery backup
and there is a power failure.

Training Center
for Automation and Drives

Page 17

ST-7PRO1
HW Configuration and Memory Concept

Introduction

A configuration is only necessary in the following cases:


if you wantt tto modify
dif th
the b
basic
i settings
tti
off th
the modules
d l
for stations with distributed I/O
for S7-400 with several CPUs or with expansion racks.
It is possible to read out the actual configuration from the CPU, to look at the set
parameters in an existing system.

Actual Configuration During startup, the CPU generates an actual configuration, that is, it saves the
arrangement
g
of the modules and allocates the addresses in accordance with a fixed
algorithm. If no parameters have been assigned, the default parameters defined at
the factory are used.
The system stores this actual configuration in system data blocks.
Uploading to PG

There are two ways of uploading the actual configuration to the PG:
1. In the SIMATIC Manager:
by selecting the menu options PLC -> Upload Station.
2. In the HW Config
g tool:
by selecting the menu options PLC -> Upload or by clicking the

icon.

Storage on PG

The actual configuration read from the hardware is inserted as a new station in the
selected project on the PG.

Note

When you read out the actual configuration, the order numbers of the modules
cannot be completely identified. For this reason, you should check the configuration
and if required, insert the exact module type of the existing modules. To do so,
choose the module
module, and then select the menu options Options ->
> Specify Module
Module.

Training Center
for Automation and Drives

Page 18

ST-7PRO1
HW Configuration and Memory Concept

Introduction

With this function, you obtain a quick overview of the state of the PLC. If, for example,
th
there
is
i a hardware
h d
fault
f lt iin a di
diagnostics-capable
ti
bl module,
d l you can identify,
id tif th
through
h
the use of a symbol, which module is faulty and where it is located. When you doubleclick on the faulty module, additional information is displayed.

Opening the Tool

Select the menu options PLC->Diagnose Hardware in the SIMATIC Manager. A


second possibility is to open the station online in the HW Config tool or you can click
on the
icon in the toolbar.

Description
p

When yyou open


p the system
y
diagnostics,
g
the hardware configuration
g
is read out from
the CPU (see left-hand screenshot). In this view, all the modules present (including
those in expansion racks or distributed I/O) are displayed.
If the CPU is in STOP mode or if there is a fault in a module, this is indicated with
symbols.
You can double-click the CPU or a faulty module to obtain further diagnostic
information (see right-hand screenshot). In the example, there is a power failure in the
analog module.

Note

If yyou have selected the menu options


p
Options
p
-> Customize -> View 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" window.

Training Center
for Automation and Drives

Page 19

ST-7PRO1
HW Configuration and Memory Concept

General

Training Center
for Automation and Drives

In the slide you can see several examples of errors that can occur with
configuration.

Page 20

ST-7PRO1
HW Configuration and Memory Concept

Slot dependent
Add
Addressing
i

The modules are assigned fixed slot-dependent addresses with the S7-300
(CPU without
(CPUs
ith t DP iinterface)
t f
) and
d S7
S7-400
400 ((without
ith t hardware
h d
configuration).
fi
ti )

Variable
Addressing

With the S7-300 (CPUs with integrated DP interface) and with the S7-400, you
can assign parameters to the starting addresses of the modules.

What to Do

When you double-click on a digital or an analog module, the parameter assignment


screen is opened. After you choose the "Addresses" tab, you can deselect "System
default". You can now define the starting address in the "Start" box. If the address is
already used, an error message is triggered.
P t process images
Part
i
can only
l b
be d
defined
fi d iin th
the S7
S7-400.
400 Th
Thatt way, specific
ifi inputs
i
t
and outputs (e.g. time-critical signals) can be combined into one group. A system
function triggers the updating of a part process image in the user program.

Note

After a CPU memory reset, the parameters, and therefore also the addresses are
lost. This means that with the S7-300 the slot-dependent addresses and with the
S7-400 the default addresses are valid once more.

Training Center
for Automation and Drives

Page 21

ST-7PRO1
HW Configuration and Memory Concept

Symbols

Symbolic addressing and the editing of symbol tables is discussed in detail in the
chapter "Symbols".
It is also possible to access the symbol table of the HW station from the "HW
Config" tool. The symbol table can be supplemented or modified.
After you click the module with the right mouse button, you can open the symbol
table by selecting the menu option Edit Symbolic Names .

Training Center
for Automation and Drives

Page 22

ST-7PRO1
HW Configuration and Memory Concept

Task

Since a HW station does not yet exist in the project "My Project", you are to read out
th actual
the
t l configuration,
fi
ti
check
h k it,
it and
d save it iin th
the project.
j t

Step 7

Adjust the following addresses:

Training Center
for Automation and Drives

Module

Slot

Address

DI
DI
DO
DO
AI

8
9
10
11
12

0
8
4
8
304

Page 23

ST-7PRO1
HW Configuration and Memory Concept

Task

Training Center
for Automation and Drives

With the help of a small program test the flashing frequencies preset in the system!

Page 24

ST-7PRO1
HW Configuration and Memory Concept

Das könnte Ihnen auch gefallen