Cyclic communication between SIMATIC S7-300…€¦ ·  · 2016-07-26Service & Support Answers for...

21
Service & Support Answers for industry. Cover SINAMICS G/S: Configuration of standard telegrams in TIA Portal Cyclic communication between SIMATIC S7-300/400/1200/1500 and SINAMICS G/S FAQ November 2013

Transcript of Cyclic communication between SIMATIC S7-300…€¦ ·  · 2016-07-26Service & Support Answers for...

Service & Support

Answers for industry.

Cover

SINAMICS G/S: Configuration of standard telegrams in TIA Portal

Cyclic communication between SIMATIC S7-300/400/1200/1500 and SINAMICS G/S

FAQ November 2013

Question

2 Configuration of standard telegrams in TIA Portal

V1.1, Item-ID: 82841762

This entry is from the Siemens Industry Online Support. The general terms of use (http://www.siemens.com/terms_of_use) apply.

Clicking the link below directly displays the download page of this document.

http://support.automation.siemens.com/WW/view/en/82841762

Caution The functions and solutions described in this article confine themselves to the realization of the automation task predominantly. Please take into account furthermore that corresponding protective measures have to be taken up in the context of Industrial Security when connecting your equipment to other parts of the plant, the enterprise network or the Internet. Further information can be found under the Content-ID 50203404.

http://support.automation.siemens.com/WW/view/en/50203404

Question How is possible to setup a communication between SIMATIC S7-300/400/1200/1500 and SINAMICS G/S using standard communication function blocks in TIA Portal and using predefined PLC data types?

Answer The instructions and notes listed in this document provide a detailed answer to this question.

Table of content

Configuration of standard telegrams in TIA Portal V1.1, Item-ID: 82841762 3

Table of content 1 General use case ..............................................................................................4

2 Available PLC data types .................................................................................6

2.1 SINAMICS G120x with Control Unit CU2x0x-2 ....................................6 2.2 SINAMICS S110 ..................................................................................7 2.3 SINAMICS S120 ..................................................................................8

3 Embedding of the global user defined library ................................................9

4 Generation of the data block ......................................................................... 11

4.1 Standard telegram without extension ................................................. 11 4.2 Standard telegram with extension ..................................................... 14

5 Example for creating a cyclic communication with DPWR_DAT and DPRD_DAT ...................................................................................................... 16

6 Question / answers ......................................................................................... 21

1 General use case

4 Configuration of standard telegrams in TIA Portal

V1.1, Item-ID: 82841762

1 General use case

The communication to a SINAMICS G/S system in TIA Portal can be realized by using technology objects or predefined function blocks with a closed structure and also with standard communication functions which are using predefined PLC data types.

NOTE PLC data types (formerly known as UDT – user defined data type) are describing a structured data type by using different kinds of standard data types like BOOL, INT, WORD, …

The PLC data types – used as a telegram type – describes and names only the meaning of the data which are sent between a PLC and a drive.

By selecting the same standard telegram in the drive, the PLC data type describes the data interface to the SINAMICS drive.

Which benefits do you have by using PLC data types for bus communication:

• Mapping the whole standard telegram in user friendly, binary coded control and status words

• Comments available in German an English

• The global library can be transferred and used in different projects

• The PLC data type can be easily expanded with user defined control and status words

• The standard cyclic communication uses system functions

1 General use case

Configuration of standard telegrams in TIA Portal V1.1, Item-ID: 82841762 5

The following picture shows the buildup of such an automation solution:

Figure 1-1

2 Available PLC data types

6 Configuration of standard telegrams in TIA Portal

V1.1, Item-ID: 82841762

2 Available PLC data types

The different Control Units of the SINAMICS G/S system support only a part of all available standard telegrams. For every system (G120 / S110 / S120) exists a separate prepared folder.

NOTE It is not important how the drive has been commissioned (Startdrive / STARTER GSD). The system functions and also the PLC data types work with both kinds of drive objects.

2.1 SINAMICS G120x with Control Unit CU2x0x-2

For the Control Units of the SINAMICS G system are the following PLC Data types available:

Figure 2-1

2 Available PLC data types

Configuration of standard telegrams in TIA Portal V1.1, Item-ID: 82841762 7

2.2 SINAMICS S110

For the Control Units of the SINAMICS S110 system are the following PLC data types available:

Figure 2-2

2 Available PLC data types

8 Configuration of standard telegrams in TIA Portal

V1.1, Item-ID: 82841762

2.3 SINAMICS S120

For the Control Units of the SINAMICS S120 system are the following PLC data types available:

Figure 2-3

3 Embedding of the global user defined library

Configuration of standard telegrams in TIA Portal V1.1, Item-ID: 82841762 9

3 Embedding of the global user defined library

Table 3-1

1. Download of the library

http://support.automation.siemens.com/WW/view/en/82841762

2. Extract the library

Extract the library to a user defined folder:

3. Open a (new) TIA Portal project

3 Embedding of the global user defined library

10

Configuration of standard telegrams in TIA Portal V1.1, Item-ID: 82841762

4. Open the global user defined library

5. Using the templates

4 Generation of the data block

Configuration of standard telegrams in TIA Portal V1.1, Item-ID: 82841762

11

4 Generation of the data block

4.1 Standard telegram without extension

The data block used for the cyclic communication can be created in only a few steps using the PLC data types.

Table 4-1

1. Add the telegram from the library in a SIMATIC S7 CPU

2. Create a new data block

4 Generation of the data block

12

Configuration of standard telegrams in TIA Portal V1.1, Item-ID: 82841762

3. Select the inserted telegram as data type for the data block

4. Note: You can create also a data block and use directly the telegram type

5. Compile the data block

4 Generation of the data block

Configuration of standard telegrams in TIA Portal V1.1, Item-ID: 82841762

13

6. Important It is possible for the communication with a S7-1200 / S7-1500 to use structures in optimized data blocks as of TIA Portal V12SP1 and also with the delivered firmware versions. For the parameterization of the communication see chapter 5.

7. Note If the data block is created on a S7-300/400 in TIA Portal, then the block will be created with an absolute access. If this access is also necessary for S7-1200/1500, then it is possible to change a data block attribute.

8. Change block access attribute

9. Data block with absolute access – noticeable with the “offset” column

4 Generation of the data block

14

Configuration of standard telegrams in TIA Portal V1.1, Item-ID: 82841762

4.2 Standard telegram with extension

For several use cases it is necessary to define additional control and status words.

Table 4-2

10. Copy and Paste of the predefined telegram

11. Using the option “Add Row” to create new lines for data description

4 Generation of the data block

Configuration of standard telegrams in TIA Portal V1.1, Item-ID: 82841762

15

12. Example for a telegram 111 with extension in send and receive

13. Create the data block

See chapter 4.1

5 Example for creating a cyclic communication with DPWR_DAT and DPRD_DAT

16

Configuration of standard telegrams in TIA Portal V1.1, Item-ID: 82841762

5 Example for creating a cyclic communication with DPWR_DAT and DPRD_DAT

The system function blocks DPWR_DAT (cyclic writing) and DPRD_DAT (cyclic reading) are identically with the STEP7 classic functions SFC14/15 and they are used for a cyclic, non-synchronous communication. In the following steps it will be showed how to use the created data blocks.

Notes The existing PLC data types can be used also for a synchronous communication using OB61. More information about synchronous communication can be found here : Manual STEP7 V12 SP1

Notes The configuration of SINAMICS G120/S120 will be not described in this document.

For the configuration of the communication it's to be assumed that the SINAMICS drives are completely configured.

The communication commissioning can be used for PROFIBUS and PROFINET.

5 Example for creating a cyclic communication with DPWR_DAT and DPRD_DAT

Configuration of standard telegrams in TIA Portal V1.1, Item-ID: 82841762

17

Table 5-1

14. Initial setup: G120 and S120 connected to a S7-1x00

15. Evaluation of the necessary HW –ID addresses for the “LADDR” Input of the communication blocks

Notes: These values can be found in the “PLC tags all tags”

16. Evaluation of the necessary HW –ID addresses for the “LADDR” Input of the communication blocks using the hardware identifier of the telegram

Notes: This is only available with GSD/GSDXML files

5 Example for creating a cyclic communication with DPWR_DAT and DPRD_DAT

18

Configuration of standard telegrams in TIA Portal V1.1, Item-ID: 82841762

17. Insert the communication blocks from the Extended instructions folder in TIA Portal

18. View of the data block with optimized access

19. Integration of the communication blocks in S7-1x00 for example in MAIN (OB1) using the symbolic access for the S120

5 Example for creating a cyclic communication with DPWR_DAT and DPRD_DAT

Configuration of standard telegrams in TIA Portal V1.1, Item-ID: 82841762

19

20. View of the data block with optimized access and telegram extensions

21. Integration of the communication blocks in S7-1x00 for example in MAIN (OB1) using the symbolic access for the G120 (TLG111 with extensions)

22. Important: By using the absolute data block access, it is necessary to look for the access range of the telegram (WORD 12, WORD 14 …) The principal setup of the absolute data block access pointer is: P#DBx.DBXy.y WORD zz (x=Data block number; y.y = Start address in Bool; zz=Length in word)

5 Example for creating a cyclic communication with DPWR_DAT and DPRD_DAT

20

Configuration of standard telegrams in TIA Portal V1.1, Item-ID: 82841762

23. Call of the communication blocks with absolute data block access using TLG111 with extension – for example for G120

. The access range for the standard telegram was increased in chapter 4 with one double word in both directions. Because of this, the access range is now 14 words for the G120.

24. Call of the communication blocks with absolute data block access using TLG111 - for example for S120

The data block for the telegram 111 was also created in chapter 4. The access range for the standard telegram 111 is 12 words.

6 Question / answers

Configuration of standard telegrams in TIA Portal V1.1, Item-ID: 82841762

21

6 Question / answers Q: The usage of the optimized data block access creates the fault code 8092(hex) in the status word of the communication blocks DPWR_DAT and DPRD_DAT?

A: A possible reason for this fault code is the usage of a S7-1200 CPU with Firmware lower than 3.0 or a S7-1500 CPU with Firmware version lower than 1.1.

In this case the optimized data block access cannot work in combination with the “structure” of the PLC data types. The solution is to upgrade the firmware of the CPU or the usage of the absolute data block access.