deutsch english franÇais italiano espaol ... - bosch rexroth

36
RA55713582/2015-12 Replaces: – EN Programming manual ID 40 function modules Siemens TIA Portal 1.0 Version

Upload: others

Post on 11-May-2022

15 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: DEUTSCH ENGLISH FRANÇAIS ITALIANO ESPAOL ... - Bosch Rexroth

POR

TUG

UES

AES

PAÑ

OL

ITA

LIA

NO

FRA

AIS

ENG

LISH

DEU

TSC

H

RA55713582/2015-12Replaces: –EN

Programming manual

ID 40 function modules Siemens TIA Portal

1.0 Version

Page 2: DEUTSCH ENGLISH FRANÇAIS ITALIANO ESPAOL ... - Bosch Rexroth

2/36

Bosch Rexroth AG, MIT: ID 40, RA55713582/2015-12

The sole purpose of the information in this document is to describe the product. No statements concerning a certain condition or suitability for a certain application can be derived from our information. The information given does not release the user from the obligation of own judgment and verification. Please note that our products are subject to a natural aging and wear process.

© This document, as well as the data, specifications and other information set forth in it, are the exclusive property of Bosch Rexroth AG. Any reproduction or distribution requires our consent.

This manual was originally written in German.

Page 3: DEUTSCH ENGLISH FRANÇAIS ITALIANO ESPAOL ... - Bosch Rexroth

3/36

RA55713582/2015-12, MIT: ID 40, Bosch Rexroth AG

Contents

1 About this manual 51.1 Scope of validity 51.2 How this manual is organized 51.3 Illustration 51.3.1 Representation of numbers 51.3.2 Representation of operating states 61.3.3 Presentation of instructions 61.4 Safety instructions 62 Commissioning ID 40/FB 72.1 Introduction 72.2 Installing the library 72.3 Installation of the GSD file 92.4 Configuring the I/O field 102.5 Dividing I/O module configuration 122.6 Example of a Siemens I/O module configuration 123 The function modules 143.1 Overview of function modules 143.1.1 FCs for switching coupling states 143.1.2 FCs for process control 153.1.3 FCs for direct MDT/ SLK access 163.1.4 FCs for pointer commands 163.1.5 FCs for prefetch and pretransmit parameterization 173.1.6 Integrated FB‘s for direct data transfer 173.2 Describing the module parameters 183.3 Access to ID 40 via SLK addresses and data blocks 203.3.1 Recommendation for using the parameter variables 213.3.2 User status information 213.3.3 Internal status information of the modules 223.3.4 Handling the library modules in the event of an error 223.3.5 Synchronization mechanism 233.3.6 Error information 243.4 The function modules in detail 253.4.1 CONNECT 253.4.2 DISCONN 263.4.3 READ_MDT 273.4.4 WRIT_MDT 284 Programming examples 294.1 Programming example: read & write MDT 294.1.1 Calling the CONNECT function 294.1.2 Calling the WRIT_MDT function 294.1.3 Calling the READ_MDT function 304.1.4 Calling the DISCONN function 305 Appendix 315.1 Abbreviations and terms 315.2 Current coupling status 335.3 Display message 34

Contents

ENG

LISH

Page 4: DEUTSCH ENGLISH FRANÇAIS ITALIANO ESPAOL ... - Bosch Rexroth

4/36

Bosch Rexroth AG, MIT: ID 40, RA55713582/2015-12

Page 5: DEUTSCH ENGLISH FRANÇAIS ITALIANO ESPAOL ... - Bosch Rexroth

About this manual 5/36

RA55713582/2015-12, MIT: ID 40, Bosch Rexroth AG

1 About this manual

1.1 Scope of validityThis manual is intended for system integrators. It provides an introduction to the ID 40 function libraries. It is assumed that the reader is familiar with the functionality of the ID 40 system. The modules are described in the ID 40 system manual.

The PDP function library scope covered by the manual is ID 40/SLK PDP firmware versions 3.x and above.

For more information about the ID 40 system, please refer to the following documents:

Table 1: Required and supplementary documentation

Document Version Order no.ID 40 brochure de/en/fr/it/es/pt 3 842 528 602ID 40/SLK Assembly instructions de/en/fr/it/es/pt 3 842 527 942ID 40/MDT Assembly instructions de/en/fr/it/es/pt 3 842 527 943

The system premises for a STEP 7 system apply: TIA Portal V13 runnable. For hardware requirements, see TIA Portal V13.For detailed information, visit www.siemens.de

1.2 How this manual is organizedThis manual is structured in such a way that each section builds on the preceding one. Readers with no experience with identification systems are encouraged to read through the ID 40 system manual from start to finish.

• Section 2 describes the commissioning and installation of the ID 40/FB. • Section 3 covers configuration of ID40-SLKs in the TIA Portal hardware manager. • Section 4 lists all function modules with a description of each. • Section 5 contains example applications. • Section 6 has a table with abbreviations and explanations.

1.3 Illustration

1.3.1 Representation of numbers • Decimal numbers are shown without an affix, e.g. 123.

• Hexadecimal numbers are shown with the prefix 0x, e.g. 0x0002001C

• Data blocks appear with their address and length in bytes in the format <Address>/<Length>, e.g. 0x00000815/25

ENG

LISH

Page 6: DEUTSCH ENGLISH FRANÇAIS ITALIANO ESPAOL ... - Bosch Rexroth

6/36 About this manual

Bosch Rexroth AG, MIT: ID 40, RA55713582/2015-12

1.3.2 Representation of operating statesThe operating states of the read/write head are shown in bold italics, e.g. CONNECTED.

1.3.3 Presentation of instructionsSymbol Meaning

Particular attention must be paid to instructions identified with a “Caution” symbol. They are for your safety.

Important instructions are marked with the Info symbol. They serve as an aid and must be heeded.

f Single, non-related actions

1. 2. 3.

Numbered steps:The numbers indicate that the actions must be performed in order.

1.4 Safety instructions Together, the mobile data carrier MDT and read/write heads SLK comprise the ID 40 identification system and may only be deployed in industrial applications according to Class A of the EMC law. The manufacturer's declaration documents the compliance of the ID 40 Identification system with the requirements of the relevant standards. Country-specific features and regulations may need to be followed as required.

Installation and operation must be performed by trained specialists only. Follow the relevant safety regulations. In particular, steps must be taken to ensure that any fault with the identification system cannot pose a risk for persons or property. These steps include complying with permissible environmental conditions and using the correct power supply rating. For more details, refer to the Section Technical data.The functional capability of the identification system plus all associated modules must be checked on a regular basis. If there are signs of the identification system not working properly, take it out of service and secure against unauthorized use.

Operating personnel must be trained by supervisors responsible or operation. They must follow the safety measures and operate the ID 40 according to this manual.

All warranty and liability claims vis-a-vis the manufacturer shall lapse for damage arising from not using the system as intended or customer interventions not allowed by this manual.

Intended use

Safety measures for normal operation

Instructing operating personnel

Liability and warranty

Page 7: DEUTSCH ENGLISH FRANÇAIS ITALIANO ESPAOL ... - Bosch Rexroth

Commissioning ID 40/FB 7/36

RA55713582/2015-12, MIT: ID 40, Bosch Rexroth AG

2 Commissioning ID 40/FB

2.1 Introduction For details about the ID 40 identification system, please refer to the ID 40 system manual.The functional libraries process data transfer between master (controller) and slave (ID 40/SLK).

2.2 Installing the library f Launch TIA Portal V13 from the Desktop. f From the Options ▶ Global libraries menu, execute the command Retrieve library…

or f right-click in the Global libraries window and execute the command

Retrieve library….

ENG

LISH

Page 8: DEUTSCH ENGLISH FRANÇAIS ITALIANO ESPAOL ... - Bosch Rexroth

8/36 Commissioning ID 40/FB

Bosch Rexroth AG, MIT: ID 40, RA55713582/2015-12

f In the Retrieve archived global library window, select the ID40_TIA_library.zal13 library file and open it.

Page 9: DEUTSCH ENGLISH FRANÇAIS ITALIANO ESPAOL ... - Bosch Rexroth

Commissioning ID 40/FB 9/36

RA55713582/2015-12, MIT: ID 40, Bosch Rexroth AG

2.3 Installation of the GSD fileThe GSD file first needs to be installed before commissioning the ID 40 identification system for the first time.

f In the Options menu, run the command Install general station description file (GSD).

f Select the GSD file and install it.

ENG

LISH

Page 10: DEUTSCH ENGLISH FRANÇAIS ITALIANO ESPAOL ... - Bosch Rexroth

10/36 Commissioning ID 40/FB

Bosch Rexroth AG, MIT: ID 40, RA55713582/2015-12

2.4 Configuring the I/O field • Communication via Profibus requires the I/O field to be in the peripherals area, and the data must be consistent.

• The first 3 modules must always be 4 byte modules 4 I/O cmd or. acc, consistent. • With an S7 with CPU 31x-2DP, the maximum block length is 32 Bytes. • The assemblies must be parameterized within the hardware configuration

f In the Configuration window go to Network view and choose ID 40 in the catalog.

Next, the ID40 is connected to the Profinet IO system:

f In the Hardware catalog select:

Other field devices ▶ PROFIBUS DP ▶ Ident Systems ▶ Rexroth ▶ Rexroth ▶ ID 40/SLK-PDP ▶ ID 40/SLK-PDP

and drag onto the master system.

Page 11: DEUTSCH ENGLISH FRANÇAIS ITALIANO ESPAOL ... - Bosch Rexroth

Commissioning ID 40/FB 11/36

RA55713582/2015-12, MIT: ID 40, Bosch Rexroth AG

f Double-clicking the ID 40 symbol opens a window with the Profibus node properties. Change the name of the Profibus node here if you wish.

f The address can be changed as required under the category PROFIbus address.

Please note: It is important that you configure the I/O modules correctly.

ENG

LISH

Page 12: DEUTSCH ENGLISH FRANÇAIS ITALIANO ESPAOL ... - Bosch Rexroth

12/36 Commissioning ID 40/FB

Bosch Rexroth AG, MIT: ID 40, RA55713582/2015-12

2.5 Dividing I/O module configurationFor example, for 121 byte address data, you will need to use the 128 I/O cmd-oriented data acc. module for the configuration. This means the MDT can read a maximum of 121 Bytes per command. If more data are required, these will need to be divided into multiple read commands.

In the following example, 250 Bytes after the SLK address 0x000001F0 are being read. The data block is retrieved with three read commands executed in sequence. Each command reads 121 bytes. The number of bytes read by the preceding read command is added to the SLK address of each read command.

Table 2: Dividing read access to large data volumes in individual commands:

SLK address Number of bytesFirst read command 0x000001F0 121Second read command 0x00000269 121Third read command 0x000002E2 8

Individual data packets can now be made available in a data element in the PLC program.

2.6 Example of a Siemens I/O module configurationIn the following example, 36 bytes of payload data are transferred between the PLC and SLK. The data are transferred using command-based data exchange. In the event-based data exchange, the ID code (4 bytes) of the data carrier and the MDT status (2 bytes) are transferred in addition to the firmly defined status bytes. A S7 CPU 315-2 PN/DP is used as the CPU. This controller supports a maximum block size of 32 bytes.

At least 7 bytes ( DWORD; 8 bytes) is needed to send/evaluate the response to a command using the command-based channel (command [1 byte] + address [4 Byte] + payload data [2 byte]). 2 double words (DWORD; 8 byte) are parameterized.

Page 13: DEUTSCH ENGLISH FRANÇAIS ITALIANO ESPAOL ... - Bosch Rexroth

Commissioning ID 40/FB 13/36

RA55713582/2015-12, MIT: ID 40, Bosch Rexroth AG

Example of a command-based©n transfer of e.g. 36 payload bytes with CPU 315:

Command 7 bytes 2 x 4 bytes are parameterizedPayload data 36 bytes a maximum block of 32 bytes plus an additional block

of 4 bytes are parameterizedResult 43 bytes 44 bytes are parameterized

Example of an event-based read from the 6 payload data bytes from above:

Status information 2 bytes 4 bytes are parameterizedPayload data 6 bytes 4 bytes are parameterizedResult 8 bytes

In order to receive all payload data in the I/O area, the largest value (43 bytes) must be parameterized at the time of configuration. For command-based data exchange, the I/O field will then comprise the following modules:

• 4 bytes command-based consistent (double word) • 4 bytes command-based consistent (double word) • 4 (3) bytes command-based consistent (double word) since double words are parameterized, as 4 bytes are used here instead of 3 bytes (odd values!).

• 32 bytes command-based not consistent (due to CPU 31x) (8 double words)

For each slave, the I/O range begins with an even address.The start address of a non-digital I/O peripheral for a Siemens S7 PLC, CPU 315-2DP and above at address 128. This may differ for other controllers.

Please note: I/O module configuration Always use even module sizes (divisible by 2).

Gro

uped

are

a

I/O field4 byte4 byte4 byte

32 byte

I field4 byte4 byte

ENG

LISH

Page 14: DEUTSCH ENGLISH FRANÇAIS ITALIANO ESPAOL ... - Bosch Rexroth

14/36 The function modules

Bosch Rexroth AG, MIT: ID 40, RA55713582/2015-12

3 The function modules

3.1 Overview of function modulesThis section lists all of the modules for ID 40, however only explains the important ones for the TIA portal.

3.1.1 FCs for switching coupling statesDescription of module Description CommentCONNECT Switches the SLK from

DISCONNECTED to status CONNECTING.

The HF field is active, the SLK is ready to accept a MDT login.

DISCONN Switches the SLK from CONNECTED to status DISCONNECTED.

The MDT is ended; the HF field is disconnected.

RECONN Switches the SLK from CONNECTED to status CONNECTING.

The MDT is ended; the HF field remains connected.

SET_ERR Switches the SLK from any status to a general error status.

Can be used if the PLC program has lost control. SET_ERR & DISCONNECT beings the SLK into the default status.

Page 15: DEUTSCH ENGLISH FRANÇAIS ITALIANO ESPAOL ... - Bosch Rexroth

The function modules 15/36

RA55713582/2015-12, MIT: ID 40, Bosch Rexroth AG

3.1.2 FCs for process controlDescription of module Description CommentREAD_ALS Reads the current coupling status.

The SLK's current coupling status is the most important system variable for process control.

The value of the coupling status is always sent as a second byte in an event-based channel.

TRANS_OP Function for opening the data transfer.

Opening the transfer is needed when immediate access to the MDT is needed or when retrieving buffered prefetch data.

TRANS_CL Function for closing the data transfer.

Closing the transfer is needed when immediate access to the MDT has ended or when buffered prefetch data were retrieved.

PTRM_END Ends the Pretransmit function. In the PRECONNECTED status, no data records are written to data carriers

PTRM_STB Starts the Pretransmit function in the Single Mode.

Pretransmit is only executed for the next data carrier which logs in

PTRM_MTB Starts the Pretransmit function in Multiple Mode.

Pretransmit is executed as of the next data carrier which logs in until PTRM_END is ended

AREC_ON Switches on the Auto-Reconnect function.

The Auto-Reconnect function automatically ends the MDT coupling after executing the Prefetch. All MDTs which now log into the SLK, go through the PRECONNECTED status, and are then ended. Access to command-based data exchange is not possible.

AREC_OFF Switches off the Auto-Reconnect function.

ENG

LISH

Page 16: DEUTSCH ENGLISH FRANÇAIS ITALIANO ESPAOL ... - Bosch Rexroth

16/36 The function modules

Bosch Rexroth AG, MIT: ID 40, RA55713582/2015-12

3.1.3 FCs for direct MDT/ SLK accessDescription of module Description CommentREAD_MDT Function for reading data from

the data carrier.When reading data from the MDT to the SLK buffer and returned on the fieldbus.

WRIT_MDT Function for writing data from the data carrier.

When writing MDT data, the data are entered immediately on the MDT.

READ_MST Function for reading the MDT status.

The MDT status contains information about the data carrier type and various fault information.

RST_MST Function for resetting the MDT status.

The error information is reset.

READ_MID Function for reading the MDT ID code.

Each data carrier has a unique ID code.

MDT_FORM Function for formatting the data carrier.

The MDT formatting fills a data block in the MDT user memory with a constant value.

BPRE_RD Function for reading out buffered prefetch data from the SLK.

The required data area is in the buffer in the previously parameterized sequence.

3.1.4 FCs for pointer commandsDescription of module Description CommentRD_MPTR1 Function for reading the MDT

pointer 1.Pointers 1 to 3 are freely accessible for the user and are used to store MDT addresses.

RD_MPTR2 Function for reading the MDT pointer 2.

see above

RD_MPTR3 Function for reading the MDT pointer 3.

see above

WR_MPTR1 Function for writing the MDT pointer 1.

see above

WR_MPTR2 Function for writing the MDT pointer 2.

see above

WR_MPTR3 Function for writing the MDT pointer 3.

see above

LA_MPTR1 Function for defining Look-Ahead size for MDT pointer 1.

The look-ahead function supports reading of MDT data from a data block which is addressed via one of three MDT pointers.

LA_MPTR2 Function for defining Look-Ahead size for MDT pointer 2.

see above

LA_MPTR3 Function for defining Look-Ahead size for MDT pointer 3.

see above

Page 17: DEUTSCH ENGLISH FRANÇAIS ITALIANO ESPAOL ... - Bosch Rexroth

The function modules 17/36

RA55713582/2015-12, MIT: ID 40, Bosch Rexroth AG

3.1.5 FCs for prefetch and pretransmit parameterizationDescription of module Description CommentDPRE_STA Function for starting the

unbuffered prefetch parameterization.

Code for the SLK which is sent as next parameterization data.

DPRE_PAR Function for parameterization of the unbuffered prefetch.

For transferring the parameter data (address sets).

DPRE_STO Function for ending the unbuffered prefetch parameterization.

Code for the SLK showing that parameterization is ended.

DPRE_DEL Function for deleting parameterizing unbuffered prefetch address sets.

Deletes all parametrized address sets of the unbuffered prefetch parameterization.

BPRE_STA Function for starting the buffered prefetch parameterization.

Code for the SLK which is sent as next parameterization data.

BPRE_PAR Function for parameterization of the buffered prefetch.

For transferring the parameter data (address sets).

BPRE_STO Function for ending the buffered prefetch parameterization.

Code for the SLK showing that parameterization is ended.

BPRE_DEL Function for deleting parameterizing buffered prefetch address sets.

Deletes all parametrized address sets of the buffered prefetch parameterization.

PTRM_STA Function for starting the Pretransmit parameterization.

Code for the SLK which is sent as next parameterization data.

PTRM_PAR Function for parameterization of the Pretransmit.

For transferring the parameter data (address sets).

PTRM_STO Function for ending the Pretransmit parameterization.

Code for the SLK showing that parameterization is ended.

PTRM_DEL Function for deleting parameterized Pretransmit address sets.

Deletes all parametrized address sets of the Pretransmit parameterization.

3.1.6 Integrated FB‘s for direct data transferThe following function modules process an entire data exchange with a data carrier. Starting from the DISCONNECTED status to the CONNECTED status including data transfer back to the DISCONNECTED status.

Table 3: Integrated FB‘s for direct data transfer

Description of module Description CommentRD_MDT Function for reading data from

the data carrier directly.Use for SLK's where only reading is to take place.

WR_MDT Function for writing data to the data carrier directly.

Use for SLK's where only reading is to take place.

RDWR_MDT Function module for writing or reading data to/from the data carrier directly.

Use for SLK's where reading/writing is to take place. Only one instance is necessary.

ENG

LISH

Page 18: DEUTSCH ENGLISH FRANÇAIS ITALIANO ESPAOL ... - Bosch Rexroth

18/36 The function modules

Bosch Rexroth AG, MIT: ID 40, RA55713582/2015-12

3.2 Describing the module parametersThe following table shows the description of the transfer parameters used in the modules. Sorting is executed in alphabetical order.

Table 4: Describing the module parameters

Parameters Data type

Data format

Description

ADDR DWORD HEX Start address in the write/read head at which data read/write begins.

ALS BYTE HEX Current connection status (ALS = Actual Link status), see module description READ_ALS on Page 15.

BLOCK_LEN WORD HEX Block size of look ahead function for pointer reading

CLOCK BOOL BIT Module activation bit- is reset internally after when passing through the module:TRUE = StartFALSE = no activity

DATA_LEN WORD HEX Size of the data to be written/read from the write/read head in bytes.

ERROR BOOL BIT Sum error bit:TRUE = there is an error. Meaning in word ERROR_CODEFALSE = no error active

ERROR_CODE WORD HEX Coded fault acknowledgmentINT_INT_CMD_PART_1 DWORD HEX Saves the sent command during processing.

Only needed for internal use in the instance.INT_INT_CMD_PART_2 DWORD HEXINT_STATUS WORD HEX Internal status of the function module

(status of processing). Only needed internally and for determining error codes.

MDT_ADDR DWORD HEX Start address in the data carrier from which the data are read or written.

MDT_DATA_LEN BYTE HEX Size of the data to be written/read directly to/from the MDT in bytes.

MDT_ID_CODE DWORD HEX Unique identification number of data carriers. Caution: does not match the serial numbers.

MDT_STATUS WORD HEX Status word for data carrierPATTERN BYTE HEX Filling pattern used when formulating the MDT.

The pattern is written from the indicated MDT address (SLK_Adr1, SLK_Adr2) for length Data_len.

POINTER_DB_ADDR DWORD HEX The start address of the 1st byte in the DB at which data read/write begins.

POINTER_DB_NO WORD HEX Number of a data element, - in which data are stored which are to be written during the write to the SLK. - in which data are stored which were read by the SLK during the read procedure.

READ BOOL BIT READ/WRITE bit in the RDWR_MDT module:READ = 1 module reads dataWRITE = 0 module writes data

READY BOOL BIT Module was processed, READY is reset after setting CLOCK again:TRUE = module readyFALSE = module active

Page 19: DEUTSCH ENGLISH FRANÇAIS ITALIANO ESPAOL ... - Bosch Rexroth

The function modules 19/36

RA55713582/2015-12, MIT: ID 40, Bosch Rexroth AG

Parameters Data type

Data format

Description

RESET BOOL BIT Resets the entire module:TRUE = ResetFALSE = no activity:

SLK_IO_CMD_LEN WORD HEX Length of the command-based channel in bytes.SLK_IO_START_ADDR WORD HEX Start address of the SLK in the peripheral area

of the I/O field of the controller.START_BLOCK_ADDR WORD HEX Start address of the new data block in the event-

based channel (for unbuffered prefetch) or the start address of the new data block in the SLK (for buffered prefetch).

BIT = True / False

HEX = hexadecimal

ENG

LISH

Page 20: DEUTSCH ENGLISH FRANÇAIS ITALIANO ESPAOL ... - Bosch Rexroth

20/36 The function modules

Bosch Rexroth AG, MIT: ID 40, RA55713582/2015-12

3.3 Access to ID 40 via SLK addresses and data blocksThe SLK address is needed to read and write data to both the MDT and SLK via the fieldbus. It is represented as a 32-Bit value in hexadecimal form.

Example: 0x000002C0

An SLK data block comprises the SLK address plus the number of bytes. The SLK address is the starting address. The number of bytes determines the length of the area after the start address. The format is address /number of bytes.

Please note: The SLK address and number of bytes is always represented as hexadecimals.

Each data exchange to and from the SLK is thus specified by an SLK data block. The maximum possible number of bytes depends on what fieldbus system is being used.

Example:4 Bytes are to be read from Address 0x000002C0 the SLK data block is thus 0x000002C0 / 4

Byte 1

Byte 2

Byte 3

Byte 4

Starting address0x000002C0

Next free address0x000002C4

Number of bytes 4

Please note: Do not confuse the SLK address with the fieldbus node number!

Individual data packets can now be made available in a data element in the PLC program.

Page 21: DEUTSCH ENGLISH FRANÇAIS ITALIANO ESPAOL ... - Bosch Rexroth

The function modules 21/36

RA55713582/2015-12, MIT: ID 40, Bosch Rexroth AG

3.3.1 Recommendation for using the parameter variablesThe allocation of input/output parameters with variables or constants is needed for communication with the SLK/MDT via function modules (see Section 3.2 Describing the module parameters on page 18). Most parameters for the SLK can be assigned with a single variable because usually multiple modules are needed for communication with the SLK but these are never allowed to be active at the same time. As a result, the number of variables are kept low within a program and the memory space available is used economically.

Examples for these variables are all of the IN_OUT parameters, such as: • INT_CMD_PART • ERROR_CODE • CLOCK • READY etc.

3.3.2 User status informationThe module is started by creating an increasing curve at parameter CLOCK.In principle, the module must continue to run or every PLC cycle be called up until the Ready signal is active. This means that the command was transferred to the SLK and the SLK has responded. However, this does not indicate whether the communication had a fault or not.After an active Ready signal, if the ERROR bit has the low level, the module was ended positively. If the bit has the high level, this means an error arose either during module processing or the SLK responded with errors. In this case, the coded fault can be evaluated in the ERROR_CODE word.

Fig. 1:

“CLOCK”

“RESET”

“READY”

#1

#2 Flow chart

ENG

LISH

Page 22: DEUTSCH ENGLISH FRANÇAIS ITALIANO ESPAOL ... - Bosch Rexroth

22/36 The function modules

Bosch Rexroth AG, MIT: ID 40, RA55713582/2015-12

3.3.3 Internal status information of the modulesThe following status information of the modules can be determined in the data word INT_STATUS. The data word is for internal purposes and is BIT coded.

Table 5: Significance of the individual bits

Low byte High byteBit 7

Bit 6

Bit 5

Bit 4

Bit 3

Bit 2

Bit 1

Bit 0

Bit 7

Bit 6

Bit 5

Bit 4

Bit 3

Bit 2

Bit 1

Bit 0

X X X 1 1 1 1 Res Res Res Res Res Res Res Res Res

Table 6: Low byte

BIT Designation DescriptionBit 4 STEP2 = Command sent to SLK in full

Cycle after STEP1:Toggle bit was set on bus depending on status of TOGGLE, READY (out.) = 0, CLK (out) =0.

Bit 3 STEP1 External CLK was detected, (data) present on bus.Bit 2 INT READY Internal READY module statusBit 1 TOGGLE Current status of toggle bit as set on the bus

Based on the table above, INT_STATUS can assume the following statuses depending on the toggle bit: • 0x0400 / 0x0600, after reset • 0x0800 / 0x0A00 when STEP1 active • 0x1000 / 0x1200 when STEP2 active

3.3.4 Handling the library modules in the event of an errorTo be able to reset a library module in the event of an error (ERROR-Bit = TRUE), a specific sequence of setting and resetting the module parameter bit is required:

1. Reset the READY flag2. Set RESET FLAG3. Reset the ERROR flag4. Reset the READY flag

Afterwards, the module can be re-executed by resetting the CLOCK flag.

Page 23: DEUTSCH ENGLISH FRANÇAIS ITALIANO ESPAOL ... - Bosch Rexroth

The function modules 23/36

RA55713582/2015-12, MIT: ID 40, Bosch Rexroth AG

3.3.5 Synchronization mechanismUsually, synchronization is not required between module and the addressed SLK when using the modules provided that the controller and SLKs are booted together.

Two events are possible which make synchronization necessary:

1. During system operation, the SLK reboots without the controller also rebooting. This situation can be seen from the Operative Flag of the SLKs (see ID 40 System manual). Through the cyclical evaluation of this information (e.g. OB1), in the appropriate case, the SLK controller sequence must be reset (e.g. RESET of the last called module. Also note that parameterization data are not buffered during a power outage to the SLK and thus a new parametrization becomes necessary (PREFETCH, PRETRANSMIT).

2. During system operation, the controller is rebooted without executing a RESET or boot of the SLKs A TOGGLE-BIT synchronization is also required in this case (see ID 40 system manual). The synchronization can be carried out with the following chain of commands after a reboot of the PLC (one-off OB100):

L PED [SLK_IO_START_ADDR] UW DW#16#8000 0000 Mask Set toggle bit in I/O field. Isolate toggle bit of response SRD 22 Shift to toggle bit in INT_STATUS. L INT_STATUS UW W#16#FDFF Reset toggle bit in INT_STATUS OW T INT_STATUS Save new toggle bit in INT_STATUS

ENG

LISH

Page 24: DEUTSCH ENGLISH FRANÇAIS ITALIANO ESPAOL ... - Bosch Rexroth

24/36 The function modules

Bosch Rexroth AG, MIT: ID 40, RA55713582/2015-12

3.3.6 Error information

Table 7: Error coding of ERROR_CODE:

High byte: SLK result Low byte: Internal module error code0x00 No error occurred. 0 No error occurred.0x01 Unexpected interruption in

communication between SLK and MDT.

1 SLK result ≠ 0

0x02 MDT device fault, e.g. memory area faulty.

0x03 - Error in SLK addressing, e.g. start address and data length go beyond the boundary of an SLK address segment.- Access to a non-existing SLK address segment.

0x04 0x05

Reserved

0x06 MDT data transfer channel not opened.

0x07 - Attempted parameterization of Prefetch even though appropriate parameterization was not started.- Prefetch buffer read even though parameterization of prefetch was started.- Could not open MDT data transfer.

0x08 Value of operand is outside of permissible range, e.g. for command 15.

0x0F Internal system error, e.g. lack of memory.

0x00 2 Unexpected status of toggle bit.0x00 4 Error:

User calls a new function module without the current one having been processed.

Page 25: DEUTSCH ENGLISH FRANÇAIS ITALIANO ESPAOL ... - Bosch Rexroth

The function modules 25/36

RA55713582/2015-12, MIT: ID 40, Bosch Rexroth AG

3.4 The function modules in detailFor TIA portal applications, only the important function modules are offered. For special wishes, please get in touch with Bosch Rexroth AG DC-IA/EAT3.All module parameters affecting the data blocks being read or written to or from the ID 40/SLK must be indicated in bytes.

3.4.1 CONNECTSwitch the SLK to ready-to-receive.

The user can use the write access to the coupling requirement to move the SLK into MDT awaiting-login or to end the MDT communication which is currently active.The term requested means that the current coupling status need not meet the switching request in all cases.

Example: After the CONNECT request, the SLK is only connected when an MDT has retracted into the field area of the SLK. The current coupling status is only set to CONNECTED now.The SLK goes through the CONNECT module to MDT-awaiting-login. The HF field is activated; the next MDT logs into the SLK. Read access to MDT data is now possible via the fieldbus.

Required SLK status display (coupling status) before execution of the FC:

Coupling status: 0x01

Expected coupling status after command execution: 0x02

Table 8: Parameter list for CONNECT module:

Variable name Data type In-Output CommentSLK_IO_START_ADDR WORD VAR_INPUT I/O start address of the addressed SLK.INT_STATUS WORD VAR_IN_OUT Feedback from the module on the internal

status.INT_CMD_PART__1INT_CMD_PART__2

DWORDDWORD

VAR_IN_OUTVAR_IN_OUT

Used internally

ERROR_CODE WORD VAR_IN_OUT Coded fault acknowledgmentCLOCK BOOL VAR_IN_OUT Module activation BitRESET BOOL VAR_IN_OUT Resets the moduleERROR BOOL VAR_IN_OUT Sum error bitREADY BOOL VAR_IN_OUT Module processing done

ENG

LISH

Page 26: DEUTSCH ENGLISH FRANÇAIS ITALIANO ESPAOL ... - Bosch Rexroth

26/36 The function modules

Bosch Rexroth AG, MIT: ID 40, RA55713582/2015-12

3.4.2 DISCONNThe DISCONN function closes the MDT, i.e. the current MDT communication is ended, the MDT and the HF field is disconnected. No more MDTs can log into the SLK.

Required SLK status display (coupling status) before execution of the FC:

Coupling status: 0x04

Expected coupling status after command execution: 0x01

Table 9: Parameter list for DISCONN module:

Variable name Data type In-Output CommentSLK_IO_START_ADDR WORD VAR_INPUT I/O start address of the addressed SLK.INT_STATUS WORD VAR_IN_OUT Feedback from the module on the internal

status.INT_CMD_PART_1INT_CMD_PART_2

DWORDDWORD

VAR_IN_OUTVAR_IN_OUT

Used internally

ERROR_CODE WORD VAR_IN_OUT Coded fault acknowledgmentCLOCK BOOL VAR_IN_OUT Module activation BitRESET BOOL VAR_IN_OUT Resets the module.ERROR BOOL VAR_IN_OUT Sum error bitREADY BOOL VAR_IN_OUT Module processing done

Page 27: DEUTSCH ENGLISH FRANÇAIS ITALIANO ESPAOL ... - Bosch Rexroth

The function modules 27/36

RA55713582/2015-12, MIT: ID 40, Bosch Rexroth AG

3.4.3 READ_MDTREAD Mobile Data Tag

The indicated data range is read. This command needs the Open/close transfer sequence.Use the READ_MDT function to read a data block from MDT address MDT_ADDR with length MDT_DATA_LEN. The result is written in the data element with address POINTER_DB_NO from double word POINTER_DB_ADDR with length MDT_DATA_LEN.

Required SLK status display (coupling status) before execution of the FC:

Coupling status: 0x04

The TRANS_OP command must be executed beforehand.

Table 10: Parameter list for READ_MDT module:

Variable name Data type In-Output CommentSLK_IO_START_ADDR WORD VAR_INPUT I/O start address of the addressed SLK.POINTER_DB_NO WORD VAR_INPUT Start address of DB in which the read

MDT data are to be written.POINTER_DB_ADDR DWORD VAR_INPUT The start address of the 1st byte in the DB

from which the read data are writtenMDT_ADDR WORD VAR_INPUT Start address in the data carrier from which

the data are read.MDT_DATA_LEN BYTE VAR_INPUT Length of the data block to be read.INT_STATUS WORD VAR_IN_OUT Feedback from the module on the internal

status.INT_CMD_PART_1INT_CMD_PART_2

DWORDDWORD

VAR_IN_OUTVAR_IN_OUT

Used internally

ERROR_CODE WORD VAR_IN_OUT Coded fault acknowledgmentCLOCK BOOL VAR_IN_OUT Module activation BitRESET BOOL VAR_IN_OUT Resets the moduleERROR BOOL VAR_IN_OUT Sum error bitREADY BOOL VAR_IN_OUT Module processing done

ENG

LISH

Page 28: DEUTSCH ENGLISH FRANÇAIS ITALIANO ESPAOL ... - Bosch Rexroth

28/36 The function modules

Bosch Rexroth AG, MIT: ID 40, RA55713582/2015-12

3.4.4 WRIT_MDTWRITe Mobile Data Tag

This command is used to write data to the data carrier. This command needs the Open/close transfer sequence.Use the WRIT_MDT function to write a data block to the MDT address MDT_ADDR with length MDT_DATA_LEN. The data are retrieved for writing from the data element with address POINTER_DB_NO from double word POINTER_DB_ADDR with length MDT_DATA_LEN.

Required SLK status display (coupling status) before execution of the FC:

Coupling status: 0x04

The TRANS_OP command must be executed beforehand.

Table 11: Parameter list for WRIT_MDT module:

Variable name Data type In-Output CommentSLK_IO_START_ADDR WORD VAR_INPUT I/O start address of the addressed SLK.POINTER_DB_NO WORD VAR_INPUT Start address of DB in which the read

MDT data are to be written.POINTER_DB_ADDR DWORD VAR_INPUT The start address of the 1st Bytes in the DB

from which the read MDT data are written.MDT_ADDR WORD VAR_INPUT Start address in the data carrier from which

the data are read.MDT_DATA_LEN BYTE VAR_INPUT Length of the data block to be read.INT_STATUS WORD VAR_IN_OUT Feedback from the module on the internal

status.INT_CMD_PART_1INT_CMD_PART_2

DWORDDWORD

VAR_IN_OUTVAR_IN_OUT

Used internally

ERROR_CODE WORD VAR_IN_OUT Coded fault acknowledgmentCLOCK BOOL VAR_IN_OUT Module activation BitRESET BOOL VAR_IN_OUT Resets the moduleERROR BOOL VAR_IN_OUT Sum error bitREADY BOOL VAR_IN_OUT Module processing done

Page 29: DEUTSCH ENGLISH FRANÇAIS ITALIANO ESPAOL ... - Bosch Rexroth

Programming examples 29/36

RA55713582/2015-12, MIT: ID 40, Bosch Rexroth AG

4 Programming examples

4.1 Programming example: read & write MDTIn this example program, data are written to the MDT or read from the MDT in static mode.

4.1.1 Calling the CONNECT function

The CONNECT function was executed without fault, i.e. function result: READY = TRUE and ERROR = FALSE

4.1.2 Calling the WRIT_MDT functionFunction call: WRIT_MDT (Write MDT data: In the example, from address 100 Hex with length 8 byte (16#0008))

Function result: READY = TRUE and ERROR = FALSE

ENG

LISH

Page 30: DEUTSCH ENGLISH FRANÇAIS ITALIANO ESPAOL ... - Bosch Rexroth

30/36 Programming examples

Bosch Rexroth AG, MIT: ID 40, RA55713582/2015-12

4.1.3 Calling the READ_MDT functionFunction call: READ_MDT (Reading the MDT data: In the example, from address 100 Hex with length 6 byte (16#06))

Function result: READY = TRUE and ERROR = FALSE

4.1.4 Calling the DISCONN function

The DISCONN function was executed without fault, i.e. function result: READY = TRUE and ERROR = FALSE

Page 31: DEUTSCH ENGLISH FRANÇAIS ITALIANO ESPAOL ... - Bosch Rexroth

Appendix 31/36

RA55713582/2015-12, MIT: ID 40, Bosch Rexroth AG

5 Appendix

5.1 Abbreviations and termsTechnical term Description0x”plus characters 0..9 and A..F” Used to denote a hexadecimal.Current coupling status(ALS)

Indicates the current coupling status between SLK and MDT.

Requested coupling status Requirement for the SLK to coupling status of the system. e.g. to end the CONNECTED status phase for the MDT.

Auto-Reconnect End data transmission phase automatically.Byte array Data field with a width of 8 bits and variable size.CONNECTED status Here. direct MDT access is possible via the fieldbus.

The CONNECTED status must be ended via a bus command.DB, DI Data element, data element instance: Storage-relevant data.DBB Byte encoding in the DBDBD Double word coding in the DBDBW Word coding in the DBDBX Bit encoding in the DB, X stands for bit address, e.g. 0.3.Disconnect Coupling request to end the data carrier and disconnect

the HF field.Event-based data exchange Cyclical data transmission from SLK to PLC.Error Error output of modulesFB Addressing of a function block

(only describe the parameters needed at the time).FC Function (all of the passed parameters must be

described).Firmware Operating system software that provides the

functionality of a device (here: ID 40/SLK).Formatting value The value entered in the MDT memory during

MDT formatting.Buffered prefetch or Buffered Prefetch

Data are read and stored in internal buffers.GSD file Device master file of slaves. Manufacturer-specific

information. For example a list of different I/O block sizes, version number, module information, etc.

HF field Electro-magnetic high-frequency field. Allows contactless communication between SLK and MDT.

HF interface Data interface between SLK and MDT based on the HF field.

Highbyte Higher-value byte in a data word.ID 40/SLK-PDP Product designation for the SLK of the ID 40 system

for the connection to the Profibus DP.ID 80/E Product designation for the predecessor ID 40 system.

The MDT's of both ID systems are compatible.Node number The SLK in the fieldbus system is accessible from

this number. The node number is configured using the serial interface. Do not confuse this with the SLK address!

Command-based data exchange Data transmission capability independent of the cyclical means of operation of the Profibus.

ENG

LISH

Page 32: DEUTSCH ENGLISH FRANÇAIS ITALIANO ESPAOL ... - Bosch Rexroth

32/36 Appendix

Bosch Rexroth AG, MIT: ID 40, RA55713582/2015-12

Technical term DescriptionConsistent/inconsistent Siemens modules are based on a specific slot position

on the rack. For example, if the top-hat rail has gaps, the Inconsistent set-up message will appear-indicating that the arrangement is not logical.Data within a data field with access to two equal-status partners are consistent if it is ensured that simultaneous access to them is not possible. The data are inconsistent if simultaneous access is possible.

Coupling request Request to the SLK to switch the coupling status of the system.

Low byte Low-value byte in a data word.Master Node in a bus system with the right to issue instructions

to subordinate nodes (slaves).MDTMobile Data storage device

Electronic data memory. The MDT is firmly connected to the workpiece pallet. It contains the latest information about the workpieces on the workpiece pallet.

MDT address Address for payload data in the MDT. The MDT addresses are shown in the 0 area of the SLK address space.

MDT formatting Filling an MDT memory area with a constant formatting value.

MDT-ID-Code 32Bit number which has a different value for each MDT and cannot be changed. Allows each MDT to be uniquely identified.

MDT coupling The MDT is located in the HF field of the SLK and is logged into the SLK.

MDT status Information about the MDT type and current status of the MDT (2 bytes).

MDT type code Three-bit encoding of the MD type; is contained in the MDT status. The MDT type code gives information about the size of the MDT memory.

PDP Abbreviation for the Profibus DP fieldbus system which supports cyclical transfer according to EN 50170.

PRECONNECTED Coupling status of the SLK in which so-called pre-operations are carried out. This coupling status is always run through prior to the CONNECTED status.

Prefetch Automatically expiring read access to the MDT. The prefetch must be configured beforehand. Prefetch always takes place before the CONNECTED status.

RS232 interface Serial interface of the SLK for parameterization and extended diagnostics as per the RS232 specification.

Segment Division of the SLK memory area into individual segments each with a height of 64 kBytes.

Slave Node on a bus system without the right to issue instructions.

SLKWrite-Read-Head

Fieldbus slave with HF communication unit for contactless communication between user controller and MDT.

SLK address Needed for reading and writing data via the fieldbus.SLK data block Data, which is grouped into a block, and which can be

exchanged with the ID 40 system. An SLK data block is determined by the SLK address and the number of data bytes.

SysLog buffer Buffer for recording system-internal events.

Page 33: DEUTSCH ENGLISH FRANÇAIS ITALIANO ESPAOL ... - Bosch Rexroth

Appendix 33/36

RA55713582/2015-12, MIT: ID 40, Bosch Rexroth AG

Technical term DescriptionToggle bit Bit for controlling command-based data exchange.Open/close transfer Securing the MDT data transfer. This ensures that an

unexpected MDT switch cannot lead to incorrect data being read.

Unbuffered prefetch or Direct PrefetchThe data are read and sent to the event-based data exchange without buffering.

Dwell time The time in which the MDT is located in the transmission area of the SLK.

WT Workpiece pallet in transfer systems.

5.2 Current coupling status

Table 12: Current coupling status

Action Code Display DescriptionDISCONNECTED 1 OFF The SLK field is switched off. No MDTs can log into the

SLK. Read access to the data of the preceding MDT is possible via the fieldbus.

CONNECTING 2 WAI The SLK is in the MDT awaiting-login status. The field is activated; the next MDT logs into the SLK.

PRECONNECTED 3 PRE An MDT has logged into the SLK. Automatic data exchange is running if pre-fetches were parameterized.

CONNECTED 4 CON Data exchange with the MDT is possible if the transfer channel is open.

ERROR 5 E00 The SLK is put into the error status, the field is disconnected. No more MDTs can log into the SLK. A currently running MDT communication is ended beforehand, and the MDT is disconnected.

PROGRAM 6 PRG Temporary statusBUSY 7 BSY SLK processes the coupling request.

Table 13: Coupling request

Action Code DescriptionCONNECT 1 Puts the SLK into the MDT awaiting-login status. The field is

connected.DISCONNECT 2 Closes the MDT, i.e. the current MDT communication is ended,

the MDT and the field is disconnected. No more MDTs can log into the SLK.

RECONNECT 3 Closes the MDT, i.e. the current MDT communication is ended and the MDT is disconnected. However, the SLK remains on standby; the field is not disconnected. The next MDT logs into the SLK.

ERROR 4 The SLK is put into the error status, the field is disconnected. No more MDTs can log into the SLK. A currently running MDT communication is ended beforehand, and the MDT is disconnected.

ENG

LISH

Page 34: DEUTSCH ENGLISH FRANÇAIS ITALIANO ESPAOL ... - Bosch Rexroth

34/36 Appendix

Bosch Rexroth AG, MIT: ID 40, RA55713582/2015-12

5.3 Display message

Fig. 2:

Area 1 Area 2Display on the ID 40/SLK

SLK parameters and operating states are shown on the ID 40/SDK display. The display is split into four identical segments which are grouped into two display areas.

• Area 1 consists of the first three segments from the left. • Area 2 the first segment from the right.

Coupling statuses and error codes are displayed using area 1 segments.

Page 35: DEUTSCH ENGLISH FRANÇAIS ITALIANO ESPAOL ... - Bosch Rexroth

Appendix 35/36

RA55713582/2015-12, MIT: ID 40, Bosch Rexroth AG

The following table provides an overview:

Table 14: Overview of displays on the ID 40/SLK read/write head

Display range Displays Comment Example:Area 2 (top) System activity The SLK operating system

is active when the stroke/dash signal rotates in the fourth display segment.

Area 2 (bottom) Fieldbus activity In the bottom half of the display system, from left to righta.Left triangle: SLK recognized by bus and is operative.b.Right triangle = Activity on command-based data channel

Area 1 Current coupling status

See section 5.2 Current coupling status on page 33.

Area 1 Error status with error number

For meaning, see ID 40 manual

Area 1 and area 2

Fieldbus node number Only shown during the start-up phase. Comprises fieldbus code letter and three-digit node number

Serious system error Continuous text, beginning with ASSERT, for meaning, see the ID 40 manual

ENG

LISH

Page 36: DEUTSCH ENGLISH FRANÇAIS ITALIANO ESPAOL ... - Bosch Rexroth

Bosch Rexroth AGPostfach 30 02 0770442 StuttgartGermanyFax +49 711 811–[email protected]

Subject to modificationsRA55713582/2015-12