Beruflich Dokumente
Kultur Dokumente
Pag
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
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
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
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
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
"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"
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
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
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
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
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.
Training Center
for Automation and Drives
Page 15
ST-7PRO1
HW Configuration and Memory Concept
System Diagnostics
Clock
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 )
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.
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
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.
Description
p
Note
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
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
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