SIMATIC. PROFINET IO From PROFIBUS DP to PROFINET IO. Preface. Guide to the PROFINET Documentation 1. PROFINET IO and PROFIBUS DP

Preface SIMATIC PROFINET IO From PROFIBUS DP to PROFINET IO Programming Manual Edition 07/2004 Guide to the PROFINET Documentation 1 PROFINET IO ...
Author: Elijah Pierce
0 downloads 0 Views 468KB Size
Preface

SIMATIC PROFINET IO From PROFIBUS DP to PROFINET IO Programming Manual

Edition 07/2004

Guide to the PROFINET Documentation

1

PROFINET IO and PROFIBUS DP

2

Blocks in PROFINET IO and PROFIBUS DP

3

SSLs in PROFINET IO and PROFIBUS DP

4

Diagnostics in PROFINET IO

5

Migration of PC User Programs

6

CPs for PROFINET IO

7

Safety Guidelines This manual contains notices which you should observe to ensure your own personal safety as well as to avoid property damage. The notices referring to your personal safety are highlighted in the manual by a safety alert symbol, notices referring to property damage only have no safety alert symbol. Danger indicates an imminently hazardous situation which, if not avoided, will result in death or serious injury. Warning indicates a potentially hazardous situation which, if not avoided, could result in death or serious injury. Caution used with the safety alert symbol indicates a potentially hazardous situation which, if not avoided, may result in minor or moderate injury. Caution used without safety alert symbol indicates a potentially hazardous situation which, if not avoided, may result in property damage. Notice used without the safety alert symbol indicates a potential situation which, if not avoided, may result in an undesirable result or state. When several danger levels apply, the notices of the highest level (lower number) are always displayed. If a notice refers to personal damages with the safety alert symbol, then another notice may be added warning of property damage.

Qualified Personnel The device/system may only be set up and operated in conjunction with this documentation. Only qualified personnel should be allowed to install and work on the equipment. Qualified persons are defined as persons who are authorized to commission, to earth, and to tag circuits, equipment and systems in accordance with established safety practices and standards.

Intended Use Please note the following: Warning This device and its components may only be used for the applications described in the catalog or technical description, and only in connection with devices or components from other manufacturers approved or recommended by Siemens. This product can only function correctly and safely if it is transported, stored, set up and installed correctly, and operated and maintained as recommended.

Trademarks All designations marked with ® are registered trademarks of Siemens AG. Other designations in this documentation might be trademarks which, if used by third parties for their purposes, might infringe upon the rights of the proprietors.

Copyright Siemens AG, 2004. All rights reserved Reproduction, transmission or use of this document or its contents is 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.

Disclaimer of Liability We have checked the contents of this manual for agreement with the hardware and software described. Since deviations cannot be precluded entirely, we cannot guarantee full agreement. However, the data in the manual are reviewed regularly, and any necessary corrections will be included in subsequent editions. Suggestions for improvement are welcomed.

Siemens AG Automation and Drives Group P.O. Box 4848, D-90327 Nuremberg (Germany)

Siemens AG 2004 Technical data subject to change

Siemens Aktiengesellschaft

A5E00298268-01

Preface Convention Where the term PROFIBUS DP is used, PROFIBUS DPV1 is meant unless expressly indicated in the text. The information in this manual regarding STEP 7 also applies to NCM PC.

Purpose of the Manual You should read this documentation if you: • have adequate experience of PROFIBUS DP and want to use PROFIBUS I/O, or • want an overview of the differences between PROFIBUS DP and PROFINET IO, or • want an overview of the new/modified blocks and systems status lists for PROFINET IO, or • want to use PROFINET IO with the new blocks and systems status lists, or • want to convert an existing PROFIBUS DP system to PROFINET IO.

Audience To understand this manual, you must have basic experience of PROFIBUS DP. You should also be familiar with the PROFINET system description.

Range of validity This documentation is the basic documentation for all products from the PROFINET environment. The documentation of the individual PROFINET products is based on this documentation.

Recycling and Disposal Due to the low levels of pollutants in the devices described in this documentation, they can be recycled. For environmentally-friendly recycling and disposal of your old devices, contact a company certified for disposal electronic components.

From PROFIBUS DP to PROFINET IO Programming Manual, Edition 07/2004, A5E00298268-01

iii

Preface

iv

From PROFIBUS DP to PROFINET IO Programming Manual, Edition 07/2004, A5E00298268-01

Table of contents Preface ...................................................................................................................................................... iii 1

Guide to the PROFINET Documentation ................................................................................................ 1-1

2

PROFINET IO and PROFIBUS DP......................................................................................................... 2-1 2.1

Comparison of PROFINET IO and PROFIBUS DP ................................................................... 2-1

2.2

Representation in STEP 7/NCM PC .......................................................................................... 2-3

3

Blocks in PROFINET IO and PROFIBUS DP.......................................................................................... 3-1

4

SSLs in PROFINET IO and PROFIBUS DP ........................................................................................... 4-1

5

Diagnostics in PROFINET IO.................................................................................................................. 5-1

6

7

5.1

Comparison of Diagnostics in PROFINET IO and PROFIBUS DP ........................................... 5-2

5.2

Diagnostics Mechanism in PROFINET IO ................................................................................. 5-6

Migration of PC User Programs .............................................................................................................. 6-1 6.1

Migration When Using the OPC Interface.................................................................................. 6-2

6.2 6.2.1 6.2.2

Migration When Using the DP Base Programming Interface .................................................... 6-3 Comparison of the Function Calls.............................................................................................. 6-4 Comparison of the Dynamic Calls.............................................................................................. 6-5

CPs for PROFINET IO............................................................................................................................ 7-1 7.1

Contents..................................................................................................................................... 7-1

7.2

CP 343-1 .................................................................................................................................... 7-1

7.3

CP 443-1 Advanced................................................................................................................... 7-2

Index................................................................................................................................................ Index-1

From PROFIBUS DP to PROFINET IO Programming Manual, Edition 07/2004, A5E00298268-01

v

Table of contents Tables Table 2-1

Comparison of the Transmission Technology of PROFINET and PROFIBUS.......................... 2-1

Table 2-2

Comparison of Topology of PROFINET and PROFIBUS .......................................................... 2-2

Table 2-3

Address Assignment to I/O Devices/DP Slaves......................................................................... 2-2

Table 2-4

Import of Device Data in STEP 7 ............................................................................................... 2-3

Table 2-5

Comparison of the Representation of PROFINET IO and PROFIBUS DP in STEP 7/ NCM PC....................................................................................................................... 2-4

Table 3-1

New System Standard Functions of PROFINET IO and PROFIBUS DP and Those That Must Be Replaced.............................................................................................................. 3-1

Table 3-2

System and Standard Functions in PROFIBUS DP that must be Implemented with Different Functions in PROFINET IO........................................................................................................ 3-2

Table 3-3

OBs in PROFINET IO and PROFIBUS DP................................................................................ 3-2

Table 4-1

Comparison of the System Status Lists of PROFINET and PROFIBUS ................................... 4-1

Table 5-1

Comparison of diagnostics between PROFINET and PROFIBUS ............................................ 5-3

Table 5-2

Comparison of the Interface LEDs............................................................................................. 5-5

Table 5-3

Diagnostic Data Records in PROFINET IO ............................................................................... 5-7

Table 6-1

Comparison of the Services ....................................................................................................... 6-2

Table 6-2

Changes in the DP Base User Program .................................................................................... 6-3

Table 6-3

Function calls ............................................................................................................................. 6-4

Table 6-4

Access to the Process Image..................................................................................................... 6-5

vi

From PROFIBUS DP to PROFINET IO Programming Manual, Edition 07/2004, A5E00298268-01

1

Guide to the PROFINET Documentation Overview

The schematic below provides you with an overview of the PROFINET documentation.

Ethernet > Assign Device Name. You can, for example, use this function to identify a PROFINET IO device you want to address in cubicle.

Further Information on Diagnostics and Blocks For more detailed information on the topic of diagnostics, refer to the PROFINET System Description. For more detailed information on blocks (OBs, SFBs, etc.), refer to the STEP 7 online help and the reference manual System Software for S7-300/400 System and Standard Functions.

See also Diagnostics Mechanism in PROFINET IO (Page 5-6)

5.2

Diagnostics Mechanism in PROFINET IO

Totally Integrated Diagnostic Concept PROFINET IO supports you with a totally integrated diagnostic concept. The basics of this concept are explained below.

Diagnostic Mechanism If a channel error occurs (for example overflow of an analog input), the malfunctioning IO device generates a diagnostic interrupt to the IO controller. This interrupt calls a suitable program routine (OB82) in the user program to initiate a reaction to the error. If a defect means that a device or submodule must be completely replaced, the IO controller automatically assigns parameters to and configures the new device or submodule. Following this, cyclic exchange of user data is resumed.

Diagnostic Data Records in PROFINET IO There are two different types of diagnostic data records: 1. Channel diagnostic data records Channel diagnostic data records are displayed when there is an error on a channel and/or the channel is triggered an interrupt. If there is no error, a diagnostic data record with the length 0 is returned. A maximum of 400 channel errors can be displayed one time. 2. Vendor-specific diagnostic data records The structure and size of vendor-specific diagnostic data records depend on the particular vendor. This information is entered in the GSD file of a device.

5-6

From PROFIBUS DP to PROFINET IO Programming Manual, Edition 07/2004, A5E00298268-01

Diagnostics in PROFINET IO 5.2 Diagnostics Mechanism in PROFINET IO

List of Diagnostic Data Records in PROFINET IO The following list shows important diagnostic data records in PROFINET IO. Table 5-3

Diagnostic Data Records in PROFINET IO

Data Record Number

Content and Meaning

800AH

Channel diagnostics for a submodule slot

800BH

Vendor-specific channel diagnostics for a submodule slot (entering state)

800CH

Vendor-specific channel diagnostics for a submodule slot (entering and exiting state)

C00AH

Channel diagnostics for a slot

C00BH

Vendor-specific channel diagnostics for a slot (entering state)

C00CH

Vendor-specific channel diagnostics for a slot (entering and exiting state)

E002H

Deviation between the desired and actual configuration of the IO devices assigned to an IO controller

E00AH

Channel Diagnostics for the channels assigned to an IO controller in an IO device

E00BH

Vendor-specific channel diagnostics for the channels assigned to an IO controller in an IO device (entering state)

E00CH

Vendor-specific channel diagnostics for the channels assigned to an IO controller in an IO device (entering and exiting state)

F00AH

Channel diagnostics for an IO device

F00BH

Vendor-specific channel diagnostics for an IO device (entering state)

F00CH

Vendor-specific channel diagnostics for an IO device (entering and exiting state)

BFF0H to BFFFH

Vendor, order number, the product version, version etc.

Structure of Diagnostic Data Records You will find the structure of the diagnostic data records on the Web at: www.siemens.com/automation/service. It is explained in the entry number 19169848.

PROFINET System Overview For more detailed information on the topic of diagnostics, refer to the PROFINET System Description.

From PROFIBUS DP to PROFINET IO Programming Manual, Edition 07/2004, A5E00298268-01

5-7

Diagnostics in PROFINET IO 5.2 Diagnostics Mechanism in PROFINET IO

5-8

From PROFIBUS DP to PROFINET IO Programming Manual, Edition 07/2004, A5E00298268-01

Migration of PC User Programs

6

Chapter Content This chapter explains the adaptations you will need to make to PC programs if you convert from the PROFIBUS DP to PROFINET IO. The following situations must be distinguished: • whether you previously used the DP base programming interface or • whether you use the OPC interface The steps necessary for migration are described in the following sections for both situations.

From PROFIBUS DP to PROFINET IO Programming Manual, Edition 07/2004, A5E00298268-01

6-1

Migration of PC User Programs 6.1 Migration When Using the OPC Interface

6.1

Migration When Using the OPC Interface

Dynamic Response The dynamic response of the PROFINET IO OPC server is the same as that of the PROFIBUS DP OPC server since the OPC interface is a standard interface.

Comparison of the Services The handling of items for services such as Write and Read remains the same. The syntax for calling these services has only slight differences. To migrate comparable services, you therefore only need to replace the items . Table 6-1

Comparison of the Services

Service

PROFIBUS DP OPC Server

PROFINET IO OPC Server

Read/write process data

Sample item

Sample item

DP:[CP 5613]Slave005M003_EB10

PNIO:[CTRL3]EB10

Explanation

Explanation

Master CP 5613, slave 5, submodule 3, input byte 10

Controller index 3, input byte address 10

Sample item

Sample item

DP:[CP 5613]Slave005S003Data2,10,B7

PNIO:[CTRL1]EDS10,DATA61450,10

Explanation

Explanation

Master CP 5613, slave 5, slot 3, index 2, data record with length 10 bytes starting at offset 7

Controller index 1, address 10, data record index 61450, length 10 bytes

Sample item

Sample item

DP:[CP 5613]Masterstate

PNIO:[CTRL3]mode

Explanation

Explanation

Master CP 5613, operating state

Controller index 3, operating state

Read/write data records

Query/set information or control variable

6-2

From PROFIBUS DP to PROFINET IO Programming Manual, Edition 07/2004, A5E00298268-01

Migration of PC User Programs 6.2 Migration When Using the DP Base Programming Interface

6.2

Migration When Using the DP Base Programming Interface

Changes in the DP Base User Program Before an existing DP Base user program can be used in PROFINET IO with the IO Base user programming interface, the following modifications are necessary: Table 6-2

Changes in the DP Base User Program

Program Components

Convertibility

Addressing

Must be adapted.

Function calls

Must be modified.

Error codes

Must be adapted.

Event- or interrupt servicing

Must be modified.

Headers and libraries

Must be replaced.

Start/stop routines

Must be modified.

Writing User Data (IO data) after Return of a Station or Insert Module Interrupt In PROFIBUS DP, following a station return interrupt or an insert module interrupt, the last data written by the user and its status (GOOD or BAD) is transferred. In PROFINET IO, if the user data has not already been written cyclically, you must make sure yourself that the user data is written again after a station return or insert module interrupt. This data can, for example, be obtained by an initialization routine. As an alternative, the marked "old" data can be written again.

Reference The following sections show where adaptations are necessary in function calls and dynamic sequences.

From PROFIBUS DP to PROFINET IO Programming Manual, Edition 07/2004, A5E00298268-01

6-3

Migration of PC User Programs 6.2 Migration When Using the DP Base Programming Interface

6.2.1

Comparison of the Function Calls

Function calls The following table shows the function calls of the DP Base programming interface and the corresponding calls in the IO Base user programming interface: Table 6-3

DP Base Programming Interface

IO Base User Programming Interface

DP_alarm_ack

PNIO_alarm_resp

DP_close

PNIO_close

DP_delete_sema_object

not applicable 1

DP_disable_event

not applicable 1

DP_ds_read

PNIO_ds_read

DP_ds_write

PNIO_ds_write

DP_enable_event

not applicable 1

DP_fast_logic_off

N/A

DP_fast_logic_on

N/A

DP_fetch_alarm

not applicable 1

DP_get_actual_cfg

N/A

DP_get_cref

N/A

DP_get_err_txt

N/A

DP_get_pointer

N/A

DP_get_result

N/A

DP_global_ctrl

N/A

DP_init_sema_object

N/A*

DP_open

PNIO_controller_open

DP_read_slv_par

N/A

DP_release_pointer

N/A

DP_reset_cp

N/A

DP_set_mode

PNIO_set_mode

DP_slv_state

PNIO_device_activate

DP_start_cp

N/A

DP_watchdog

N/A

DP_write_trc

N/A

1

6-4

Function calls

Mapped on callback mechanism.

From PROFIBUS DP to PROFINET IO Programming Manual, Edition 07/2004, A5E00298268-01

Migration of PC User Programs 6.2 Migration When Using the DP Base Programming Interface

6.2.2

Comparison of the Dynamic Calls

Semaphores and Callbacks The semaphore mechanism of the DP Base programming interface is no longer supported in the IO Base user programming interface. Alarms and Events are now signaled by callback mechanisms. Since callback mechanisms are asynchronous and can be executed at any time, an IO Base user program must always be prepared for parallel activities. Suitable synchronization mechanisms are therefore necessary.

Hardware Interrupts Fast Logic is not supported.

Process image The difference between a DP Base and IO Base user program when accessing the process image is in the addressing and the access mechanism. Table 6-4

Access to the Process Image

Mechanisms

DP Base user program

IO Base user program

Addressing

Access using the PROFIBUS station number.

Access using addresses assigned during configuration.

Access Mechanism

1. Lock dual-port RAM.

Access to the IO controller using the function calls: • PNIO_data_read • PNIO_data_write

2. Access with pointer to dual-port RAM. 3. Dual-port RAM release.

From PROFIBUS DP to PROFINET IO Programming Manual, Edition 07/2004, A5E00298268-01

6-5

Migration of PC User Programs 6.2 Migration When Using the DP Base Programming Interface

6-6

From PROFIBUS DP to PROFINET IO Programming Manual, Edition 07/2004, A5E00298268-01

CPs for PROFINET IO 7.1

7

Contents

Chapter Content If you use certain communications processors (CPs) for Industrial Ethernet, you obtain the functionality of a PROFINET IO controller in your S7 station. • for SIMATIC S7-300: CP 343-1 • for SIMATIC S7-400: CP 443-1 Advanced This section provides with an overview of the interface to PROFINET IO when you use these CPs.

7.2

CP 343-1

Application The CP 343-1 communications processor is intended for use in an S7-300 programmable controller. It allows attachment of the S7-300 to Industrial Ethernet. With the services for PROFINET IO, the CP 343-1 allows direct access to PROFINET IO devices over Industrial Ethernet

FCs in the User Program Just as for the CPs for PROFIBUS DP, special FCs are also available for PROFINET IO: • FC9 (PNIO_SEND) • FC10 (PNIO_RECV) • FC11 (PNIO_ADDR)

Further information For a detailed description of the functions, refer to the S7-CPs for Industrial Ethernet Configuration and Commissioning manual and the STEP 7 online help. For information on using the CP and the maximum configurations with the PROFINET IO interface, refer to the device documentation supplied with the CP on the SIMATIC NET Manual Collection CD.

From PROFIBUS DP to PROFINET IO Programming Manual, Edition 07/2004, A5E00298268-01

7-1

CPs for PROFINET IO 7.3 CP 443-1 Advanced

7.3

CP 443-1 Advanced

Application The CP 443-1 Advanced communications processor is intended for use in an S7-400 programmable controller (not in H systems). It allows attachment of the S7-400 to Industrial Ethernet. With the services for PROFINET IO, the CP 443-1 Advanced allows direct access to PROFINET IO devices over Industrial Ethernet

SFBs and SFCs for the CP 443-1 Advanced in the User Program No special FBs or FCs are required for PROFINET IO. The distributed I/O interfaces directly or over SFCs/SFBs of the CPU: • SFB52 (RDREC) • SFB53 (WRREC) • SFB54 (RALRM) • SCF14 (DPRD_DAT) • SCF15 (WRRD_DAT) • SFC49 (LGC_GADR) • SFC51 (RD_SZL)

Further information For a detailed description of the blocks / functions, refer to the System Software for S7-300/400 System and Standard Functions manual and the STEP 7 online help. For information on using the CP and the maximum configurations with the PROFINET IO interface, refer to the device documentation supplied with the CP on the SIMATIC NET Manual Collection CD.

7-2

From PROFIBUS DP to PROFINET IO Programming Manual, Edition 07/2004, A5E00298268-01

Index A Access Mechanism, 6-5 Address Assignment, 2-2 Addressing, 6-3 Audience, iii

B Blocks, 3-1 compatibility, 3-1 BUSF, 5-5

C Callback, 6-5 Cause of Error, 5-2 Channel diagnostic data record, 5-6 Channel Diagnostics, 5-7 CiR, 2-3 CP 443-1, 7-2 CP 443-1 Advanced, 7-2 CPU 317T 2DP/PN, 5-5

Diagnostic data record, 5-6 800A, 5-7 800B, 5-7 800C, 5-7 C00A, 5-7 C00B, 5-7 C00C, 5-7 E002, 5-7 E00A, 5-7 E00B, 5-7 E00C, 5-7 F00A, 5-7 F00B, 5-7 F00C, 5-7 Vendor-specific, 5-6 Diagnostic Mechanism, 5-6 Diagnostic status, 5-3 Diagnostics Relational, 5-3 Diagnostics in STEP 7, 5-2 Diagnostics in the User Program, 5-2 DP Base Programming Interface, 6-4 DP Base user program, 6-3, 6-5 DP master, 2-4 DP master system, 2-4 DP slave, 2-4 Dual-port, 6-5

D Device number, 2-4 Diagnostic Concept, 5-6

E Error code, 6-3 Error location, 5-2 Event, 6-5 Event processing, 6-3

F Fast Logic, 6-5 Fault-tolerant systems, 2-3 Function call, 6-3, 6-4

G GSD file, 2-3 From PROFIBUS DP to PROFINET IO Programming Manual, Edition 07/2004, A5E00298268-01

Index-1

Index

H

R

Header, 6-3

Record, 5-6 Representation in NCM PC, 2-4 Representation in STEP 7, 2-4 RX, 5-5

I Identification, 5-6 Interrupt servicing, 6-3 IO Base user program, 6-5 IO Base User Programming Interface, 6-3, 6-4 IO controller, 2-4 IO device, 2-4 IO system, 2-4 Isochronous mode, 2-3 Item, 6-2

L LED, 5-5 BUSF, 5-5 LINK, 5-5 RX, 5-5 TX, 5-5 Library, 6-3 LINK, 5-5

N NCM PC, 2-3 NCM PC Version, 2-3

O OB82, 5-4 OB83, 3-2 OB86, 3-3 OPC interface, 6-2 OPC server, 6-2

P Primary Setup Tool, 2-2 Process image, 6-5 PROFIBUS address, 2-4 Purpose of this documentation, iii

Index-2

S S7 -300, 7-1 S7 -400, 7-2 Semaphores, 6-5 Service, 6-2 SFB52, 3-1, 5-2 SFB53, 3-1 SFB54, 3-1, 5-4 SFB81, 3-2 SFC102, 3-1 SFC13, 3-1 SFC49, 3-2 SFC5, 3-2 SFC58, 3-1 SFC59, 3-1 SFC70, 3-2 SFC71, 3-2 SSL, 4-1, 5-2 W#16#0696, 4-2 W#16#0A91, 4-1 W#16#0C91, 4-1 W#16#0C96, 4-2 W#16#0x94, 4-2 W#16#4C91, 4-1 W#16#xy92, 4-2 Start/stop routines, 6-3 STEP 7, 2-3 STEP 7 Version, 2-3 System and Standard Functions, 3-1

T Topology, 2-2 TX, 5-5

U User Data Writing, 6-3 User Program, 2-1 Diagnostics, 5-2 DP Base, 6-5 IO Base, 6-5

From PROFIBUS DP to PROFINET IO Programming Manual, Edition 07/2004, A5E00298268-01

Suggest Documents