Está en la página 1de 18

Drive ES SIMATIC V5.

4
Convert DVA_S7 projects
Function Description

Edition 06/06

Safety Instructions
This Manual contains information which you should carefully observe to ensure your own
personal safety and the prevention of damage to the system. This information is
highlighted by a warning triangle and presented in one of the following ways depending
on the degree of risk involved:
DANGER
indicates that death, severe personal injury or substantial property damage will result if
proper precautions are not taken.
WARNING
indicates that death, severe personal injury or substantial property damage can result if
proper precautions are not taken.
CAUTION
indicates that minor personal injury or property damage can result if proper precautions
are not taken.
NOTE
contains important information about the product, its operation or a part of the document
to which special attention is drawn.
Qualified person
The unit may only be started up and operated by a qualified person or persons.
Qualified persons as referred to in the safety guidelines in this manual are those who are
authorized to start up, earth and label units, systems and circuits in accordance with
relevant safety standards.
Rules for proper use
Please note the following:
WARNING
The unit may be used only for the applications described in the catalog or the technical
description, and only in combination with the equipment, components and devices of
other manufacturers as far as this is recommended or permitted by Siemens.
The successful and safe operation of this equipment is dependent on proper
transportation, storage, erection and installation and on careful operation and
maintenance.
Trademarks
SIMATIC, SIMATIC HMI, SIMATIC NET, SIROTEC, SINUMERIK and USS are
registered trademarks of Siemens AG. Other names in this publication might be
trademarks whose use by a third party for his own purposes may violate the rights of the
registered holder.

Copyright Siemens AG 2000, 2002 All rights reserved

Exclusion of liability

The reproduction, transmission or use of this document or its contents are


not permitted without express written authority. Offenders will be liable for
damages. All rights, including rights created by patent grant or registration
of a utility model or design, are reserved.

We have checked that the contents of this document correspond to the


hardware and software described. Nonetheless, differences might exist
and therefore we cannot guarantee that they are completely identical. The
information given in this publication is reviewed at regular intervals and
any corrections that might be necessary are made in subsequent editions.
We welcome suggestions for improvement.

Siemens AG
Bereich Automatisierungs- und Antriebstechnik (A&D)
Geschftsgebiet Motion Control Systems (MC)
Postfach 3180, D-91050 Erlangen
Siemens Aktiengesellschaft

Subject to change without prior notice.

Edition 06/06

Introduction

Contents
1

Introduction .................................................................................................................... 4

1.1

General .......................................................................................................................... 4

1.2

Requirements................................................................................................................. 4

1.3

Installation ...................................................................................................................... 4

Conversion from DVA_S7 to Drive ES .......................................................................... 5

DVA_S7 converter ......................................................................................................... 6

Using the User data DB user interface........................................................................ 7

4.1

General .......................................................................................................................... 7

4.2

Process data (PZD) ....................................................................................................... 7

4.3

PKW data ..................................................................................................................... 13

ADAPT_DVA function .................................................................................................. 14

5.1

Type/Number ............................................................................................................... 14

5.2

Calling OBs .................................................................................................................. 14

5.3

Function description..................................................................................................... 14

5.4

I/O bar .......................................................................................................................... 14

5.5

Calling a block.............................................................................................................. 15

5.6

Notes............................................................................................................................ 15

Abbreviations ............................................................................................................... 16

Siemens AG - Drive ES SIMATIC V5.4


Convert DVA_S7 projects - Function Description

Introduction

Edition 06/06

Introduction

1.1

General
STEP7 projects whose drives were configured with the DVA_S7 object manager
will not run under Version 5 and higher of STEP7 as the DVA_S7 object manager
can no longer be used with these versions of STEP7. In the new versions of
STEP7, the Drive ES object manager is used instead.
To enable users to continue to work with old projects, the existing DVA_S7
objects have to be converted into Drive ES objects.
The "DVA_S7-Konverter" conversion tool is available for this purpose. In addition,
a function block is now available that enables parameter assignment jobs (PKW
jobs) to be launched from the DVA_S7 user interface (User data DB) using the
appropriate Drive ES SIMATIC function block.

1.2

Requirements

Hardware

PC/PG with 80486 processor (Pentium processor for Windows NT operating


system) and at least 32 MB memory (64 MB recommended)

STEP 7 Version 5.x or higher


STEP 7 "Drive ES-SlaveOM" and "Drive ES-DriveOM" object managers
Project with drives configured using DVA_S7 transferred to STEP7 V5.x
"DVA_S7 converter" tool
Drive ES SIMATIC-ADAPT_DVA library

Software

1.3

Installation
To start the installation, place the Drive ES SIMATIC CD in the CD ROM drive of
your PC/PG and start the install.bat program. All further information will be
provided during the installation process. Please note the information in the readme
file.

Siemens AG - Drive ES SIMATIC V5.4


Convert DVA_S7 projects - Function Description

Edition 06/06

Conversion from DVA_S7 to Drive ES

Conversion from DVA_S7 to Drive ES


To enable a STEP 7 project with DVA_S7 drives to be processed under STEP 7
V5.x, the DVA_S7 objects have to be converted into Drive ES objects in the STEP
7 hardware configuration. This can be done using the DVA_S7 converter
program.
The DVA_S7 blocks for communication with the drives in the STEP7 user program
can be replaced with Drive ES blocks without the need to change the user interface
in the User data DB. The procedure is described in Section 4 of this document.

Siemens AG - Drive ES SIMATIC V5.4


Convert DVA_S7 projects - Function Description

DVA_S7 converter

Edition 06/06

DVA_S7 converter
The tool is launched by pressing the Start button and selecting
SIMATIC\STEP7\Drive ES - DVA_S7 converter.
The user selects the project to be converted in the Open dialog. The DVA_S7
objects in the selected project are shown in the application window of the converter
tool.

The conversion process for these objects is started by clicking on the Convert
button. On completion of this process, the user saves the converted Drive ES
objects in the STEP 7 database. Once converted, a project cannot be converted
back again.
The use of the tool is self-explanatory. An online help function provides more
information if required.

Siemens AG - Drive ES SIMATIC V5.4


Convert DVA_S7 projects - Function Description

Edition 06/06

Using the User data DB user interface

Using the User data DB user interface

4.1

General
The paragraphs below describe how the user interface in the User data DB can
be retained when replacing the FC21, FC22 and FC23 blocks of the DVA_S7
product by the FB31, FB32 FB33 blocks from the Drive ES SIMATIC-DRVDPS7
library.

4.2

Process data (PZD)


Blocks PCD_SEND and PCD_RECV from Drive ES SIMATIC are used to transfer
the PZD data between the drive and the SIMATIC. To be able to use the User
data DB for these blocks, the appropriate addresses of the data in the User data
DB must be specified at the inputs and outputs of the blocks.
The method of calling PCD_SEND and PCD_RECV for the various PPO types is
shown below.

Siemens AG - Drive ES SIMATIC V5.4


Convert DVA_S7 projects - Function Description

Using the User data DB user interface

Edition 06/06

PPO - Type 1 (STL source code)


Send
CALL PCD_SEND, DB_PCD_SEND(
CFG_DATA
:= DRIVDB1.SLAVE_x.SLOT_y,
PCD_1
:= DBND.DBW n1 + 26,
PCD_2
:= DBND.DBW n1 + 28,
PCD_3
:=,
PCD_4
:=,
PCD_5
:=,
PCD_6
:=,
PCD_7
:=,
PCD_8
:=,
PCD_9
:=,
PCD_10
:=,
PCD_12
:=,
PCD_13
:=,
PCD_14
:=,
PCD_15
:=,
PCD_16
:=,
SFC_ERR := DBND.DBX(n1 + 5).1,
CFG_ERR := M30.1);
Receive
CALL PCD_RECV, DB_PCD_RECV(
CFG_DATA
:= DRIVDB1.SLAVE_x.SLOT_y,
PCD_1
:= DBND.DBW n1 + 38,
PCD_2
:= DBND.DBW n1 + 40,
PCD_3
:=,
PCD_4
:=,
PCD_5
:=,
PCD_6
:=,
PCD_7
:=,
PCD_8
:=,
PCD_9
:=,
PCD_10
:=,
PCD_12
:=,
PCD_13
:=,
PCD_14
:=,
PCD_15
:=,
PCD_16
:=,
PLC_CTRL := DBND.DBX(n1 + 5).0,
DEV_FLT := DBND.DBX(n1 + 4).6,
DEV_WAR := DBND.DBX(n1 + 4).7,
SFC_ERR := DBND.DBX(n1 + 5).1,
CFG_ERR := M30.4);

// x: Slave-No.; y: Slot-No.

// x: Slave-No.; y: Slot-No.

n = start address of communication control word in the User data DB

Siemens AG - Drive ES SIMATIC V5.4


Convert DVA_S7 projects - Function Description

Edition 06/06

Using the User data DB user interface

PPO - Type 2 (STL source code)


Send
CALL PCD_SEND, DB_PCD_SEND(
CFG_DATA
:= DRIVDB1.SLAVE_x.SLOT_y,
PCD_1
:= DBND.DBW n1 + 26,
PCD_2
:= DBND.DBW n1 + 28,
PCD_3
:= DBND.DBW n1 + 30,
PCD_4
:= DBND.DBW n1 + 32,
PCD_5
:= DBND.DBW n1 + 34,
PCD_6
:= DBND.DBW n1 + 36,
PCD_7
:=,
PCD_8
:=,
PCD_9
:=,
PCD_10
:=,
PCD_12
:=,
PCD_13
:=,
PCD_14
:=,
PCD_15
:=,
PCD_16
:=,
SFC_ERR := DBND.DBX(n1 + 5).1,
CFG_ERR := M30.1);
Receive
CALL PCD_RECV, DB_PCD_RECV(
CFG_DATA
:= DRIVDB1.SLAVE_x.SLOT_y,
PCD_1
:= DBND.DBW n1 + 46,
PCD_2
:= DBND.DBW n1 + 48,
PCD_3
:= DBND.DBW n1 + 50,
PCD_4
:= DBND.DBW n1 + 52,
PCD_5
:= DBND.DBW n1 + 54,
PCD_6
:= DBND.DBW n1 + 56,
PCD_7
:=,
PCD_8
:=,
PCD_9
:=,
PCD_10
:=,
PCD_12
:=,
PCD_13
:=,
PCD_14
:=,
PCD_15
:=,
PCD_16
:=,
PLC_CTRL := DBND.DBX(n1 + 5).0,
DEV_FLT := DBND.DBX(n1 + 4).6,
DEV_WAR := DBND.DBX(n1 + 4).7,
SFC_ERR := DBND.DBX(n1 + 5).1,
CFG_ERR := M30.4);

// x: Slave-No.; y: Slot-No.

// x: Slave-No.; y: Slot-No.

n = start address of communication control word in the User data DB

Siemens AG - Drive ES SIMATIC V5.4


Convert DVA_S7 projects - Function Description

Using the User data DB user interface

Edition 06/06

PPO - Type 3 (STL source code)


Send
CALL PCD_SEND, DB_PCD_SEND(
CFG_DATA
:= DRIVDB1.SLAVE_x.SLOT_y,
PCD_1
:= DBND.DBW n1 + 10,
PCD_2
:= DBND.DBW n1 + 12,
PCD_3
:=,
PCD_4
:=,
PCD_5
:=,
PCD_6
:=,
PCD_7
:=,
PCD_8
:=,
PCD_9
:=,
PCD_10
:=,
PCD_12
:=,
PCD_13
:=,
PCD_14
:=,
PCD_15
:=,
PCD_16
:=,
SFC_ERR := DBND.DBX(n1 + 5).1,
CFG_ERR := M30.1);
Receive
CALL PCD_RECV, DB_PCD_RECV(
CFG_DATA
:= DRIVDB1.SLAVE_x.SLOT_y,
PCD_1
:= DBND.DBW n1 + 14,
PCD_2
:= DBND.DBW n1 + 16,
PCD_3
:=,
PCD_4
:=,
PCD_5
:=,
PCD_6
:=,
PCD_7
:=,
PCD_8
:=,
PCD_9
:=,
PCD_10
:=,
PCD_12
:=,
PCD_13
:=,
PCD_14
:=,
PCD_15
:=,
PCD_16
:=,
PLC_CTRL := DBND.DBX(n1 + 5).0,
DEV_FLT := DBND.DBX(n1 + 4).6,
DEV_WAR := DBND.DBX(n1 + 4).7,
SFC_ERR := DBND.DBX(n1 + 5).1,
CFG_ERR := M30.4);

10

// x: Slave-No.; y: Slot-No.

// x: Slave-No.; y: Slot-No.

n = start address of communication control word in the User data DB

Siemens AG - Drive ES SIMATIC V5.4


Convert DVA_S7 projects - Function Description

Edition 06/06

Using the User data DB user interface

PPO - Type 4 (STL source code)


Send
CALL PCD_SEND, DB_PCD_SEND(
CFG_DATA
:= DRIVDB1.SLAVE_x.SLOT_y,
PCD_1
:= DBND.DBW n1 + 10,
PCD_2
:= DBND.DBW n1 + 12,
PCD_3
:= DBND.DBW n1 + 14,
PCD_4
:= DBND.DBW n1 + 16,
PCD_5
:= DBND.DBW n1 + 18,
PCD_6
:= DBND.DBW n1 + 20,
PCD_7
:=,
PCD_8
:=,
PCD_9
:=,
PCD_10
:=,
PCD_12
:=,
PCD_13
:=,
PCD_14
:=,
PCD_15
:=,
PCD_16
:=,
SFC_ERR := DBND.DBX(n1 + 5).1,
CFG_ERR := M30.1);
Receive
CALL PCD_RECV, DB_PCD_RECV(
CFG_DATA
:= DRIVDB1.SLAVE_x.SLOT_y,
PCD_1
:= DBND.DBW n1 + 22,
PCD_2
:= DBND.DBW n1 + 24,
PCD_3
:= DBND.DBW n1 + 26,
PCD_4
:= DBND.DBW n1 + 28,
PCD_5
:= DBND.DBW n1 + 30,
PCD_6
:= DBND.DBW n1 + 32,
PCD_7
:=,
PCD_8
:=,
PCD_9
:=,
PCD_10
:=,
PCD_12
:=,
PCD_13
:=,
PCD_14
:=,
PCD_15
:=,
PCD_16
:=,
PLC_CTRL := DBND.DBX(n1 + 5).0,
DEV_FLT := DBND.DBX(n1 + 4).6,
DEV_WAR := DBND.DBX(n1 + 4).7,
SFC_ERR := DBND.DBX(n1 + 5).1,
CFG_ERR := M30.4);

// x: Slave-No.; y: Slot-No.

// x: Slave-No.; y: Slot-No.

n = start address of communication control word in the User data DB

Siemens AG - Drive ES SIMATIC V5.4


Convert DVA_S7 projects - Function Description

11

Using the User data DB user interface

Edition 06/06

PPO - Type 5 (STL source code)


Send
CALL PCD_SEND, DB_PCD_SEND(
CFG_DATA
:= DRIVDB1.SLAVE_x.SLOT_y,
PCD_1
:= DBND.DBW n1 + 26,
PCD_2
:= DBND.DBW n1 + 28,
PCD_3
:= DBND.DBW n1 + 30,
PCD_4
:= DBND.DBW n1 + 32,
PCD_5
:= DBND.DBW n1 + 34,
PCD_6
:= DBND.DBW n1 + 36,
PCD_7
:= DBND.DBW n1 + 38,
PCD_8
:= DBND.DBW n1 + 40,
PCD_9
:= DBND.DBW n1 + 42,
PCD_10
:= DBND.DBW n1 + 44,
PCD_12
:=,
PCD_13
:=,
PCD_14
:=,
PCD_15
:=,
PCD_16
:=,
SFC_ERR := DBND.DBX(n1 + 5).1,
CFG_ERR := M30.1);
Receive
CALL PCD_RECV, DB_PCD_RECV(
CFG_DATA
:= DRIVDB1.SLAVE_x.SLOT_y,
PCD_1
:= DBND.DBW n1 + 54,
PCD_2
:= DBND.DBW n1 + 56,
PCD_3
:= DBND.DBW n1 + 58,
PCD_4
:= DBND.DBW n1 + 60,
PCD_5
:= DBND.DBW n1 + 62,
PCD_6
:= DBND.DBW n1 + 64,
PCD_7
:= DBND.DBW n1 + 66,
PCD_8
:= DBND.DBW n1 + 68,
PCD_9
:= DBND.DBW n1 + 70,
PCD_10
:= DBND.DBW n1 + 72,
PCD_12
:=,
PCD_13
:=,
PCD_14
:=,
PCD_15
:=,
PCD_16
:=,
PLC_CTRL := DBND.DBX(n1 + 5).0,
DEV_FLT := DBND.DBX(n1 + 4).6,
DEV_WAR := DBND.DBX(n1 + 4).7,
SFC_ERR := DBND.DBX(n1 + 5).1,
CFG_ERR := M30.4);

12

// x: Slave-No.; y: Slot-No.

// x: Slave-No.; y: Slot-No.

n = start address of communication control word in the User data DB

Siemens AG - Drive ES SIMATIC V5.4


Convert DVA_S7 projects - Function Description

Edition 06/06

4.3

Using the User data DB user interface

PKW data
To transmit the PKW data from the User data DB, the ADAPT_DVA block must
be called; this copies the data from the User data DB to the instance of the
PDAT_CY. The ADAPT_DVA also copies the reply back to the User data DB,
controls the start command and enters the replies from PDAT_CY into the
communication display word.
CALL PDAT_CY, DB_PDAT_CY(
CFG_DATA
:= DRIVDB1.SLAVE_1.SLOT_4,
START
:= ,
R_ID_IN
:= ,
P_NO_IN
:= ,
P_IND_IN
:= ,
P_VAL_IN
:= ,
R_ID
:= ,
These inputs/outputs are
P_NO
:= ,
transferred directly to/from the
P_IND
:= ,
appropriate instance using
P_VAL
:= ,
ADAPT_DVA
BUSY
:= ,
READY
:= ,
REQ_ERR
:= ,
WDOG_ERR
:= ,
SFC_ERR
:= ,
CFG_ERR
:= M0.1);

Siemens AG - Drive ES SIMATIC V5.4


Convert DVA_S7 projects - Function Description

13

ADAPT_DVA function

Edition 06/06

ADAPT_DVA function

5.1

Type/Number
FC 24
The block number can be changed.

5.2

Calling OBs
Alternatively, the block can be incorporated into the following OBs:
Cyclic task:
OB1
Wake alarm OB:
e.g. OB32

5.3

Function description
As long as Bit0 in the communication control word is set, the block copies the data
from the PKW area of the send box in the User data DB to the inputs of
PDAT_CY and sets the START input in the instance to "true". If PDAT_CY signals
BUSY, Bit0 is reset. This also applies to the START input.
If PDAT_CY signals "READY", "REQ_ERR" or "WDOG_ERR", these messages
are copied into the communication display word (READY = Bit1; REQ_ERR = Bit2;
WDOG_ERR = Bit4). The reply data is copied to the receive box of the PKW area
in the User data DB providing "READY", "REQ_ERR" or "WDOG_ERR" are
pending and "START" is not set.
If a PPO type not equal to 1, 2 or 5 is on the PPO_TYP input, the PPO_ERR output
is set to TRUE and the send data or receive data is not copied.

5.4

I/O bar

Parameter

Data type

Type

Description

PPO_TYP

INT

IN

PPO type

DBND

INT

IN

Number of User data DB

KSTW

INT

IN

Start address of communication control word

DI_PDAT_CY

INT

IN

Number of instance DB of PDAT_CY

DI_OFFSET

INT

IN

Offset when using FB33 as multiple instance

PPO_ERR

BOOL

OUT

Invalid PPO type

14

Siemens AG - Drive ES SIMATIC V5.4


Convert DVA_S7 projects - Function Description

Edition 06/06

5.5

ADAPT_DVA function

Calling a block
Calling from CFC

Calling from STL (source code)


CALL "ADAPT_DVA" (
PPO_TYP
DBND
KSTW
DI_PDAT_CY
DI_OFFSET
PPO_ERR

5.6

:= MW 0,
:= MW 2,
:= MW 4,
:= MW 6,
:= MW 8,
:= M
10.0);

Notes
The block does not check whether the specified DBs are present in the CPU. If
an invalid DB number is specified, a system error message is issued and the
CPU goes into STOP if the corresponding error OB is not loaded.
If the data structure of PDAT_CY or the User data DB is changed, a new
version of the ADAPT_DVA must also be used.
No check is made as to whether the valid PPO types (1, 2, 5) correspond to the
structure of the specified User data DB (input: DBND).

Siemens AG - Drive ES SIMATIC V5.4


Convert DVA_S7 projects - Function Description

15

Abbreviations

Edition 06/06

Abbreviations

AWL

Instruction list

CFC

Continuous Function Chart

DB
DBB
DBW
DP
Drive ES

Data block
Data byte
Data word
Decentralized peripheral
Drive Engineering System

FB
FC

Function block
S7 function (block in SIMATIC S7)

HIW

Main actual value

HSW

Main setpoint

IND

Index in PPO

KSTW

Communication control word

MB

Flag byte

MW

Flag word

OB
OM

Organisation block
Object manager

PKE
PKW

Parameter identifier in PPO


Parameter ID value

PPO
PWE
PZD

Parameter process data object


Parameter value in PPO
Process data

16

Siemens AG - Drive ES SIMATIC V5.4


Convert DVA_S7 projects - Function Description

Siemens AG
Bereich Automatisierungs- und Antriebstechnik (A&D)
Geschftsgebiet Motion Control Systems (MC)
Postfach 3180, D-91050 Erlangen

Siemens Aktiengesellschaft

Siemens AG, 2000, 2002


Subject to change without prior notice

También podría gustarte