Escolar Documentos
Profissional Documentos
Cultura Documentos
Contents
1 INTRODUCTION.................................................................................................................................................. 1
1.1 GENERAL INFORMATION ................................................................................................................................... 1
1.2 REQUIREMENTS ............................................................................................................................................... 1
1.2.1 Hardware................................................................................................................................................. 1
1.2.2 Software .................................................................................................................................................. 1
1.3 INSTALLATION NOTES ....................................................................................................................................... 1
1.4 BLOCK FUNCTIONS ........................................................................................................................................... 1
1.5 PARAMETER PROCESS DATA OBJECT (PPO) ..................................................................................................... 1
2 CONFIGURATION OF COMMUNICATION ........................................................................................................ 3
2.1 PARAMETERIZATION OF THE DP INTERFACE ...................................................................................................... 3
2.3 PARAMETERIZATION OF THE DRIVES.................................................................................................................. 5
3 DESCRIPTION OF THE BLOCKS ...................................................................................................................... 6
3.1 BLOCK STRUCTURE .......................................................................................................................................... 6
3.2 FUNCTIONS ..................................................................................................................................................... 7
3.2.1 FC21: DPS7-S (transmit) ........................................................................................................................ 7
3.2.2 FC22: DPS7-E (receive) ......................................................................................................................... 8
3.2.3 FC23: DPS7-V (pre-assignment) .......................................................................................................... 10
3.3 DATA BLOCKS ................................................................................................................................................ 12
3.3.1 DB "net data" (communication interface) .............................................................................................. 12
3.3.2 DB "parameter sets".............................................................................................................................. 20
4 TECHNICAL DATA AND PROCESSING TIMES .............................................................................................. 22
4.1 TECHNICAL BLOCK DATA................................................................................................................................. 23
4.2 PROCESSING TIMES ....................................................................................................................................... 23
5 DIAGNOSTICS .................................................................................................................................................. 24
5.1 DP DIAGNOSTICS ........................................................................................................................................... 24
5.2 S7 SYSTEM DIAGNOSTICS............................................................................................................................... 24
6 EXAMPLE PROGRAM ...................................................................................................................................... 25
6.1 BUS CONFIGURATION AND BUS INTERFACE ...................................................................................................... 25
6.2 PARAMETERIZATION OF THE DP INTERFACE .................................................................................................... 27
6.3 PLC PROGRAM .............................................................................................................................................. 27
6.4 PROGRAM LISTING ......................................................................................................................................... 28
6.5 PARAMETERIZATION OF THE DRIVES................................................................................................................ 31
7 ABBREVIATIONS.............................................................................................................................................. 32
Editions
Edition Order Number Date Status
Note
This specification does not purport to cover all details or variations in equipment, nor to provide for every
possible contingency to be met in connection with installation, operation or maintenance.
Should further information be desired or should particular problems arise which are not covered
sufficiently for the purchaser's purposes, the matter should be referred to your local Siemens Sales
Office.
The contents of this specification shall not become part of or modify any prior or existing agreement,
commitment or relationship. The sales contract contains the entire obligation of the Variable-Speed Drives
Division of Siemens AG. The warranty contained in the contract between the two parties is the sole
warranty of Variable-Speed Drives Division. Any statements made in this documentation/specification
neither create new warranties nor modify the existing warranty.
References
/1/: SIMATIC S7
System Software for S7-300/400
Reference Manual
Order No.: C79000-G7000-C303-01
/2/: SIMOVERT Master Drives
Communication Board CB1
Operating Instructions
Order No.: 6SE7087-6CX84-0AK0
/3/: SIMOREG K 6RA24
Communication Board CB24
Operating Instructions
Order No.: 6RX1241-0AK01
/4/: SIMOVERT MASTERDRIVES Motion Control
Kompendium, Chapter 8.2
Order No.: 6SE7080-0QX50
/5/: PROFIBUS-Profil Drehzahlveränderbare Antriebe, PROFIDRIVE
PROFIBUS-Nutzerorganisation Karlsruhe
Order No. 3.071
1 Introduction
1.1 General information
The "DVA_S7 option package for SIMATIC S7" supports communications links between SIMOREG and
SIMOVERT variable-speed drives and a higher-level SIMATIC S7 control system. The link is implemented using
the standardized PROFIBUS-DP communications system in accordance with the "PROFIBUS profile variable-
speed drives, PROFIDRIVE" /5/ or via the Universal Serial Interface Protocol
(the USS protocol).
This Manual describes the STEP7 user program required for profile-compliant net data transfer between a
SIMATIC S7-300 or S7-400 as the master and drives as slaves on the PROFIBUS-DP bus system.
The software in question is part of the "DVA_S7 option package for SIMATIC S7" and is to be found in the
STEP7 library "DPS7".
1.2 Requirements
1.2.1 Hardware
• PC/PG with a Pentium 133MHz and at least 16MB RAM
• S7-CPU 3xx/4xx with at least 12KB RAM and integrated PROFIBUS-DP interface or S7-CPU 4xx with at
least 12 KB RAM and CP443-5
1.2.2 Software
• Windows95 / Windows NT (V4.0 or higher)
• STEP 7 Version 3.x or higher
• DVA_S7-DPS7
• Type files: In STEP 7 versions < 4.02 the type description files already integrated in STEP 7 for the
configuration of communications modules CB1 and CB24 (SI8022AX.200 and SI802DAX.200) must be
updated with the type description files of the same name on the DVA_S7-CD.
2 Configuration of communication
Before starting up PROFIBUS communication, it is necessary to work through the following configuration steps:
• Define hardware configuration, parameterize DP master and slaves (STEP 7 hardware configuration)
• Parameterize communication software "DPS7"
− Create data blocks
− Pre-assign data block "parameter sets"
− Write the communication program
• Parameterize the drives
Note: If PPO types 2 or 5 are selected in the set configuration for communications modules CB1 and CB24
the entries given under "options" must be used. The same applies to module CBP if this module is
not configured as a standard slave with expanded functionality in STEP 7.
No
Hardware configuration in STEP 7 End
completed?
Yes
No
Same PPO type for all slaves?
Yes
Yes
Create data blocks DBND and DBPA with Create data blocks DBND and DBPA manually
FC23 and pre-assign DBPA: and pre-assign DBPA manually:
• Call up and parameterize FC23 in • Calculate length of DBND and create "empty"
OB100 → 3.2.3 DBND → 3.3.1 (possibly take over example DB
from LIBRARY → 4)
• Calculate length of DBPA, create and pre-
assign DBPA → 3.3.2 (possibly take over
example DB from LIBRARY → 4)
No
BUSF display on the CPU off? Check bus link to the slaves
Does the number of slaves on the bus correspond
with the hardware configuration?
Yes
Check bus addresses
Yes
Communication in progress? End
No
No
CPU in STOP? Check parameterization of the drives
Check content of the net data (actual values being
received? Is bit 10 set in the control word?)
Yes Evaluate communication status word in DBND →
3.3.1
The drives are linked to the PROFIBUS-DP via supplementary modules or interface modules in the drives.
These are
• Communication board CB1 or CBP for MASTERDRIVES FC, VC with CU2 and SC
• Communication board CBP for MASTERDRIVES Motion Control, Vector Control with CUVC and SIMOREG
DC MASTER
• Communication board CB24 for SIMOREG K 6RA24
• Interface module OPMP for MICRO-/MIDIMASTER 6SE31
• Interface module CB15 for MICRO-/MIDIMASTER 6SE32
• Interface module CB155 for COMBIMASTER.
See the relevant module or device instruction manual for parameterization of these interfaces in the units.
Please see Section 6.5 for examples.
SANZ Commnication
PPO Transmit
DBND slave 1
DBPA Receive
WDH slave 1
PANF
ANZ :
Communication
parameter set
FC: DPS7-E
slaves 1...n
DBPA
SYPA
SLPA
3.2 Functions
Program structure
DB "net data"
Communication
control slave 1
OB "cycle"
Transmit
slave 1
System parameters
Communication
parameter set
slaves 1...n
Call
FC21 must be called at least once per PLC cycle and slave.
STL
CALL FC 21
DBPA :=
SYPA :=
SLPA :=
Program structure
DB "net data"
Communication
control slave 1
OB "cycle"
Transmit
slave 1
DB "parameter sets"
System parameters
Communication
parameter set
slaves 1...n
Call
FC22 must be called at least once per PLC cycle and slave.
STL
CALL FC 22
DBPA :=
SYPA :=
SLPA :=
The parameters of the FC: DPS7-E correspond to the parameters of the FC: DPS7-S.
The two functions FC21 and FC22 access the same parameter set in DB "parameter sets" (system parameters
and slave communication parameters) for one slave and must therefore be parameterized identically for one
slave.
Limit values
The DP address space available in a SIMATIC S7 depends on the CPU but is always at least 2048 bytes (4
Kbytes for CPU414-2DP, 416-2DP).
FC23 performs its calculations on the basis of maximum 2048 bytes available address space. With FC23 and
the following limit values:
• DP address space maximum 2048 bytes,
• Maximum 125 slaves in a DP system (limited to 123 slaves if FC23 is used)
• Different maximum number of DP slaves in the different S7 DP master systems
the following number of drives can be parameterized:
Call
FC23 is called up during system start-up (OB100).
STL
CALL FC 23
SANZ :=
TNU1 :=
PPO :=
DBND :=
DBPA :=
WDH :=
PANF :=
ANZ :=
The length of the transmit and receive buffers must depend on the PPO type. If the PKW interface does not exist
(PPO types 3 and 4), the buffer for the current PKW request is not used. DBW0 is reserved.
The length of the DB "net data" required depends on the number of slaves and the PPO type used: As the
maximum length of a data block in the SIMATIC S7 depends on the CPU used, several "net data" DBs may be
necessary in certain cases.
Number of data words per slave in DB "net data" = 2 x (PKW + PZD) + PKW +5
where PKW = 0 or 4
PZD = 2, 6 or 10.
Value table:
PPO type Number of data Number of data words in the Number of data words in the DBND
words per slave in DBND dependent on number of where
the DBND slaves n nmax = 125* and same PPO type
1 21 n x 21 + 1 2626
2 29 n x 29 + 1 3626
3 9 nx9+1 1126
4 17 n x 17 + 1 2126
5 37 n x 37 + 1 4626
* Reduction of maximum number of slaves used on PROFIBUS-DP possible by limiting the number of DP slaves on an S7
(see 3.2.3)!
(n = 2,4,6...)
All areas and data words marked * must be assigned and evaluated by the user.
(n = 2,4,6...)
All areas and data words marked * must be assigned and evaluated by the user.
(n = 2,4,6...)
(n = 2,4,6...)
All areas and data words marked * must be assigned and evaluated by the user.
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Bit 1 = 0 No meaning
= 1 Accept parameter change report
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Bit 1 = 0 No meaning
= 1 PKW request complete without error
Bit 2 = 0 No meaning
= 1 PKW request complete with error
Bit 7 = 0 No warning
= 1 Warning from drive pending
Bit 8 = 0 Local drive operation or PLC has taken over PZD control
= 1 PLC control requested (PZD)
Handling of communication control word, status word, PAFE bytes and PKE by the user
Parameter ID PKE in transmit buffer (DBW n+18; required for PPO types 1, 2 and 5 only)
The user must assign values to the parameter number (bits 0 to 10) and the request ID (bits 12 to 15) (for
request and response IDs see /2/ and /3/). The toggle bit (bit 11) for the parameter change report is masked by
functions FC21, 22.
PPO
TNU
DBND Communication
KSTW parameter set slave n
PPKW
DBW (n x 12 PPZD
+ 6)
Parameter description
System parameters
TNU: Node number, corresponds to the DP station number defined with STEP7 (hardware
configuration). Permissible values: 1 to 125
KSTW: Address of the communication control word KSTW for the slave in DB "net data".
PPKW: Initial address of the DP I/O area for the PKW data of the slave (I/O address as defined in the
STEP 7 hardware configuration for this slave). The content of this parameter is of no
consequence for PPO types 3 and 4!
PPZD Initial address of the DP I/O area for the PZD data of the slave (I/O address as defined in the
STEP 7 hardware configuration for this slave).
Note on PPKW and PPZD:
If the DBPA is pre-assigned manually, the addresses of the I/O area for the PKW and PZD data
of a slave do not have to be contiguous. If the DBPA is pre-assigned with FC23, however, the
program assumes this.
Block number FC 21 FC 22 FC 23
Local data 8 8 16
Nesting depth 1 1 1
5 Diagnostics
5.1 DP diagnostics
DP diagnostics is not included in the functions of the "option package DVA_S7 for SIMATIC S7" and must
therefore be programmed by the user. System function SFC13 ( "DPNRM_DG") is available for reading out slave
diagnostics data and is explained in /1/.
Program example /6/ demonstrates parameterization of SFC13 (FC99).
Communication boards CBP, CB15 and CB155 also support the diagnostic alarm function of the S7. In the event
a drive fault, a diagnostic alarm is triggered and OB82 in the CPU is called .
A defined response to an error can therefore be programmed in these organization blocks. The block in question
must always be "empty" in the PLC. Otherwise the CPU goes into the STOP state if an error occurs.
6 Example program
The program example for the SIMATIC S7 S7-300/400 PLC with integrated DP interface is located in path
EXAMPLE300+400 of library DPS7.
The numbers of the blocks can be changed.
Master
CPU
315-2DP
4xx-2DP
CBx CBx
MASTER MASTER
DRIVES DRIVES
Slave 1 Slave 2
Bus cable
• The bus is implemented in RS485 technology with a shielded twisted-pair cable.
The SIEMENS SINEC L2 bus cable (order no.: 6XV1830-0AH10) can be used as the bus cable.
• The bus cable must be laid in such a way that it is as free as possible from interference.
Bus termination
The first and last nodes must be fitted with a terminating resistor.
Equipotential bonding
An equipotential bonding conductor must be laid between the nodes.
2 2
(16 mm copper cable for lengths up to 200m, 25 mm copper cable for lengths above 200m).
For connection to the S7-DP master (integrated DP interface or separate CP), a 9-way subminiature D
connector is required (eg, SINEC L2 bus connector SIEMENS 6ES7972-0BA10-0XA0).
Off
B = RS485P = pin 3
BABA A = RS485N = pin 8
Terminate the bus (only necessary if the drive is the first or last node):
DIP-FIX switch S1 Function
S1.3 Jumper closed: Bus termination
S1.4 Jumper closed: Bus termination
Note: The position of jumpers S1.3 and S1.4 must only be changed when the electronic box is disconnected
from the power supply. The terminating resistor draws power from the connected unit. Therefore, make sure
that the units (CB1) at the end of the bus are always supplied with power (each must have a separate electronic
power supply!)
Selecting a CPU with integrated DP interface or a DP communications processor from the hardware catalog of
STEP 7 implements a PROFIBUS-DP system in the hardware configuration. Once the parameters of the master
(eg, baud rate) have been set, slave 1 and slave 2 must be selected from the hardware catalog and placed in the
PROFIBUS line.
Station number, PPO type and I/O addresses must be parameterized for both slaves as follows.
Slave 1
MASTERDRIVES CB1 or CBP
Station number: 3
PPO type 1
Inputs: IW 256 (4 words PKW) Outputs: QW 256 (4 words PKW)
IW 264 (2 words PZD) QW 264 (2 words PZD)
Slave 2
MASTERDRIVES CB1 or CBP
Station number: 4
PPO type 1
Inputs: IW 268 (4 words PKW) Outputs: QW 268 (4 words PKW)
IW 276 (2 words PZD) QW 276 (2 words PZD)
The DP system is now parameterized for the program example and the data for the hardware configuration can
be loaded in the CPU.
The example program from library path EXAMPLE300+400 can be loaded directly into the CPU memory.
The example provides the following functions:
• Generation of DB "net data" and DB "parameter sets".
• Pre-assignment of the DB "parameter sets"
• Net data exchange with 2 drives via PPO type 1.
• Handling of parameter requests (1 read and 2 write requests for MASTERDRIVES VC with CU2).
• Read out of DP diagnostic data.
DB50: DB "parameter sets" for slaves 1 and 2 (system and slave related parameters for slaves 1 & 2)
DB99: DB for read diagnostic data of slaves 1 and 2
DB100: DB "net data" (communication interface for slaves 1 and 2)
OB100 : Start-up
Example program for 2 DP slaves
Network 1: Create data blocks DBPA and DBND and pre-assign DBPA
CALL FC 23
SANZ :=2 // Number of slaves
TNU1 :=3 // Node number of the first slave
PPO :=1 // PPO type
DBND :=100 // Number of the (first) DB "net data"
DBPA :=50 // Number of DB "parameter sets"
WDH :=100 // Number of repetitions PKW request
PANF :=256 // I/O beginning (see STEP7 hardware configuration)
ANZ :=MB50 // Error byte
OPN DB 100 // DB "net data" slave 1 and 2
L W#16#45E
T DBW 28 // Control word slave 1
T DBW 70 // Control word slave 2
BE
FC99: DP diagnostics
Network 1 : Diagnostics request?
AN M 10.0 // Diagnostics request
BEC
FC100: TEST_PKW
Example program for 2 DP slaves
Network 1 : Initiate PKW requests for slave 1
OPN DB 100 // DB "net data"
AN M 100.0
JC W1
R M 100.0
L W#16#71CE // Write P 462
T DBW 20
L W#16#100 // Index = 1
T DBW 22
L 50 // Value = 50
T DBW 26
S DBX 3.0
BEU
W1: AN M 100.1
JC W2
R M 100.1
L W#16#61CE // Read P 462
T DBW 20
L W#16#100 // Index = 1
T DBW 22
S DBX 3.0
BEU
W2: AN M 100.2
JC W3
R M 100.2
L W#16#71D5 // Write P 469
T DBW 20
L W#16#100 // Index = 1
T DBW 22
L 50 // Value = 50
T DBW 26
S DBX 3.0
BEU
W3: NOP 0
Parameterization of the PROFIBUS-DP interface for MASTERDRIVES VC(CU2) with CB1 or CBP.
Requirements: Access level P051=3, function selection "hardware configuration" P052=4. (The example
parameterization can only be used if no technology module is plugged into the drive!):
Designation Parameters
Parameterization enable P053 = 3 (parameterization enable CB1/CBP and PMU)
Module in slot 2 P090 = 1 (CB1/CBP in slot 2)
Bus address P918 = 3 or 4
Frame failure time P695 = 10ms
Control bit connection P554, i001 = 3001 (control word, bit 0 = on/off1 = PZD1, bit 0)
etc.
Setpoints P443, i001 = 3002 (main setpoint = PZD2)
etc.
With this parameterization the status word of MASTERDRIVES is received from the DP master. The drive can
be operated with the control word (settings such as 9C7EHEX = OFF, 9C7FHEX = ON). The 2nd word in the
transmit frame of the DP master is interpreted as a main setpoint by the drive. The drive returns the main actual
value at this point.
7 Abbreviations
DB Data block
DBB Data byte
DBND Net data block
DBPA Data block for system and slave communication parameter sets
DBW Data word
DP Distributed I/Os
DVA Variable-speed drives
MB Flag byte
OB Organization block
Siemens Aktiengesellschaft Subject to change without prior notice Order No. E20125-C0010-S302-A1-7600
Printed in the Fed. Rep. of Germany