Encoders With PROFIBUS-DP User Manual

Download as pdf or txt
Download as pdf or txt
You are on page 1of 43

User's Manual

Encoders with
PROFIBUS-DP
Interface
9/2000 Version 1.01
General Information

1 General Information............................................................................................ 3
1.1 The PROFIBUS Technology .................................................................... 3
1.2 Encoder Device Profile............................................................................ 3
1.3 Abbreviations .......................................................................................... 4
2 Encoder Installation ............................................................................................ 5
2.1 Cabling .................................................................................................... 5
2.2 Address................................................................................................... 5
2.3 Terminating Resistor............................................................................... 5
2.4 GSD File .................................................................................................. 6
3 Encoder Configuration........................................................................................ 7
3.1 Encoder Class ......................................................................................... 7
3.2 Operating Parameters........................................................................... 11
3.2.1 Code Sequence ....................................................................... 13
3.2.2 Class 2 Functionality................................................................ 14
3.2.3 Commissioning Diagnostics .................................................... 14
3.2.4 Scaling Functions..................................................................... 14
3.2.5 Multi/Single Separation............................................................ 18
3.2.6 Running Indication ................................................................... 18
3.2.7 Data_Exchange Alarm ............................................................. 18
3.2.8 Control Bit for Limit Switch Function ...................................... 18
3.2.9 Limit Switch Minimum ............................................................ 19
3.2.10 Limit Switch Maximum .......................................................... 19
3.3 Data exchange ...................................................................................... 20
3.3.1 Position .................................................................................... 20
3.3.2 Preset Value Function.............................................................. 21
3.4 Diagnostic Information.......................................................................... 22
3.4.1 Diagnostic Header ................................................................... 23
3.4.2 Alarms...................................................................................... 23
3.4.3 Operating Status...................................................................... 25
3.4.4 Encoder type ........................................................................... 26
3.4.5 Singleturn Resolution or Measuring Step................................ 27
3.4.6 Number of Distinguishable Revolutions .................................. 28
3.4.7 Additional Alarms..................................................................... 28
3.4.8 Supported Alarms.................................................................... 29
3.4.9 Warnings ................................................................................. 30
3.4.10 Supported Warnings .............................................................. 31
3.4.11 Profile Version ........................................................................ 32
3.4.12 Software Version.................................................................... 32
3.4.13 Operating Time ...................................................................... 33
3.4.14 Offset Value ........................................................................... 33
3.4.15 Offset Value of the Encoder Manufacturer ............................ 34
3.4.16 Scaling Parameters Settings .................................................. 34
3.4.17 Encoder Serial Number .......................................................... 35
4 Configuration Example..................................................................................... 36
5 Appendix............................................................................................................ 40
A) Overview of encoder functions............................................................. 40
B) History................................................................................................... 42

2
General Information

1 General Information
This manual describes installation and configuration options of
the HEIDENHAIN devices with PROFIBUS-DP interface. The
PROFIBUS-DP gateway is therefore the solution of choice for
applications with high ambient temperature. Encoders with
integral PROFIBUS-DP interface are advantageous if a very
compact solution is required.

In view of the certification by PNO (PROFIBUS user


organization) all products can be used in all PROFIBUS-DP
systems without restrictions. Among other things this means
that all possible baud rates, the complete address range and
the device characteristics are supported according to the
PROFIBUS device profile for encoders.

1.1 The PROFIBUS Technology


PROFIBUS is manufacturer-independent and open field bus
standard defined by the international standards EN 50170 and
EN 50254. PROFIBUS enables communication with devices
from differing manufacturers. PROFIBUS is suited for time-
critical applications as well as for complex tasks. Other
technical and manufacturer-independent information is
available on the Internet at (http://www.profibus.com).

1.2 Encoder Device Profile


The encoder device profile for PROFIBUS-DP defines the
functionality of the encoders connected to PROFIBUS-DP.
The operating functions are divided into two device classes:

Class 1 encoders offer basic functions that all PROFIBUS-DP


encoders must support. An encoder of class 1 can optionally
support selected functions of class 2 but these functions
must be implemented according to the profile. To support
early PROFIBUS-DP implementations the size of the protocol
data units (PDU) is limited to 16 bytes.

Encoders of class 2 must support all functions of class 1 as


well as of class 2.

In addition to the two classes, parameters and diagnostic


ranges are reserved for manufacturer-specific functions. The
position value of the encoder is transferred in binary format.

The device profile can be ordered at PNO in Karlsruhe,


Germany (order no. 3.062)

3
General Information

1.3 Abbreviations
DP Decentral Periphery
DDLM Direct Data Link Mapper, the interface
between PROFIBUS-DP functions and
the encoder software
PDU Protocol Data Unit
PI PROFIBUS International
PNO PROFIBUS Nutzerorganisation e.V.
(PROFIBUS user organization)
PROFIBUS Process Field Bus

4
Encoder Installation

2 Encoder Installation
2.1 Cabling
The PROFIBUS-DP device is supplied with 10 to 30 Vdc by
means of the screw terminal strip on the PCB. A shielded
power cable should be used. A cable according to the PNO
specifications should be used as data cable.

Installation of the gateway:


1. Remove the cover of the gateway housing.
2. Strip the cable ends by a suitable length, leaving approx.
15 mm of the cable shield for connection to the cable
screw fitting.
3. Slide the power cable through the cable screw fitting.
4. Connect the wires of the power supply through the
terminal block +E and 0 V. Tighten the terminal screws.
5. Tighten the cable screw fitting and ensure that the
shielding is connected with the fitting.

For the installation of the encoder with PROFIBUS-DP


interface, please see the installation instructions supplied
with the product.

2.2 Address
The address of the PROFIBUS-DP unit must be set to a value
between 3 and 126 by means of the respective address
selector switch. The address is set in decimal code (the value
for each switch position is marked beside the switch). The
encoder reads the address switch only at power-up.

Note!
The PROFIBUS-DP device does not support the setting of the
station address by the PROFIBUS master.

Setting the address:


1. Switch off the power supply to the PROFIBUS-DP unit if
necessary.
2. Use the address selection switches to set the address.
3. Fix cover according to the installation instructions.

2.3 Terminating Resistor


If the PROFIBUS-DP device to be installed is used as last
participant in the system, the terminating resistor on the PCB
must be activated. For the position of the switches see the
respective installation instructions.

5
Encoder Installation

2.4 GSD File


A diskette with the respective GSD files (Geräte Stamm
Daten = device identification records) is supplied with the
PROFIBUS-DP manual.

Installation:
1. Select the GSD file of the respective device on the diskette
and copy the *.gsd file (encoder or gateway) into the
respective directory of the PROFIBUS configuration tool.
2. Select the bitmap file (encoder or gateway) of the
respective device on the floppy disk and copy the *.bmp
file into the respective directory of the PROFIBUS
configuration tool.
3. Update the GSD files (SCAN).

6
Encoder Configuration

3 Encoder Configuration
The PROFIBUS-DP devices can be configured and parameters
set according to the user’s needs. In this context it is useful
to know that with PROFIBUS there are three types of data
transmission.

Configuration
When the system is started, the PROFIBUS devices are
configured (DDLM_Set_Prm mode), i.e. the encoder class set
by means of the GSD file in the configuration tool (see
Chapter 3.1 Encoder class) and the set operating parameters
(see Chapter 3.2 Operating parameters) are transferred to
the respective slave. This has the advantage that the
configuration data need not be modified when a PROFIBUS
device is exchanged.

Data exchange
In the normal mode (DDLM_Data-Exchange mode), data are
exchanged between master and slaves. The preset value
function can be carried out only in this operating mode. The
data exchange is described in Chapter 3.3.

Diagnostic messages
In the diagnostic mode (DDLM_Slave_Diag) diagnostic data of
the slave are transferred on the master’s request. The
diagnostic messages are described in Chapter 3.4.

3.1 Encoder Class


In general, the encoders with PROFIBUS-DP interface are
divided into three classes:

CLASS 1
In the CLASS 1 configuration only output values are assigned.
Depending on the encoder resolution, this is one output word
(16 bits) or two (32 bits).
The following functions can be performed:
Changed direction of counting
Diagnostic data up to octet 16

Configuration data:
Singleturn CLASS 1 – 16 Bit: D0hex 1 input data word,
data consistency
Multiturn Class 2 – 32 Bit: D1hex 2 input data words,
data consistency

7
Encoder Configuration

CLASS 2
In the class 2 configuration output values and input words are
transferred. Depending on the encoder resolution, this is one
output word (16 bits) or two (32 bits).
The following functions are available in addition to the class 1
functions:
· Scaling function
· Preset Value Function
· Extended diagnostic data

Configuration data:
Singleturn Class 2 – 16 bits: F0hex 1 input data word,
1 output data word
for preset value,
data consistency
Multiturn Class 2 – 32 bits: F1hex 2 input data words,
2 output data words
for preset value,
data consistency

SPECIALS
In the Specials configuration two output values and two input
words are assigned.
The following functions are available in addition to the class 2
functions:
· Separation of multi/singleturn position value
· Running indication
· Data exchange alarm
· Limit switch function (minimum and maximum value)

Configuration data:
· Special01 Class 2 – 32 bits: F1hex 2 input data words,
2 output data words
for preset value,
data consistency

8
Encoder Configuration

The following table gives an overview of configurations of the


individual encoders:

Encoder Positions/ Distinguishable Total CLASS 1 CLASS 2 SPECIALS


revolutions revolutions resolution

ECN 113 1) 8 192 1 8 192 á á –

ECN 413 1) 8 192 1 8 192 á á –

ROC 413 8 192 1 8 192 á á á

EQN 425 8 192 4 096 33 554 432 á á á

ROQ 425 8 192 4 096 33 554 432 á á á

ROC 415 1) 32 768 1 32 768 á á 2) –

ROC 417 1) 131 072 1 131 072 á á 2) –

RCN 220 1) 1 048 576 1 1 048 576 á á 2) –

RCN 723 1) 8 388 608 1 8 388 608 á á 2) –

LC 481 1) 0,1 µm – á – –

LC 181 1) 0,1 µm – á – –

1) connectable by gateway to PROFIBUS-DP


2) Scaling factor only in binary steps

9
Encoder Configuration

The following figure gives an overview of the functions of the


encoders:

Encoders according to Class 1 encoder profile:

Position

Devices of
Basic functions Code sequence
class 1

Display of the
position value

Encoders according to Class 2 encoder profile:

Position

Devices of
Basic functions Code sequence
class 1
---------- Absolute position
- Scaling function
Scaling function - Measuring units per revolution
- Measuring range in measuring
steps
- Control function/status
Class 2
encoder

Preset function Preset value

Display of the
position value

10
Encoder Configuration

3.2 Operating Parameters


The PROFIBUS-DP encoder is configured by means of the
operating parameters. The values selected in the
configuration tool are saved in an EPROM or in a binary file
and are transferred to the PROFIBUS-DP slave each time the
network is started.

The following table lists all available parameters:


Parameters Data type Parameter Device Details
octet number class

Code sequence Bits 9 1 3.2.1

Class 2 functionality Bits 9 2 3.2.2

Commissioning diagnostics Bits 9 Optional 3.2.3

Scaling function control Bits 9 2 3.2.4

Measuring units per revolution 32 bits 10 – 13 2 3.2.4


without sign

Total measuring range (units) 32 bits 14 – 17 2 3.2.4


without sign

Multi/Single separation Bits 26 Special 3.2.5

Running indication Bits 26 Special 3.2.6

Data_Exchange Alarm Bits 26 Special 3.2.7

Limit switch function Bits 26 Special 3.2.8

Limit switch minimum 32 bits 27 – 30 Special 3.29


without sign

Limit switch minimum 32 bits 31 – 34 Special 3.2.10


without sign

11
Encoder Configuration

The parameters described in octets 9 an 26 are defined bit by


bit as follows:

DDLM_Set_Prm
Octet 9

Bits 7–0

Data 27 – 20

Operating parameters

Bits Definition =0 =1

0 Code Sequence Clockwise (CW) Counterclockwise (CCW)


Increasing position values Increasing position values
for clockwise revolutions for counterclockwise
(seen from flange side) revolutions (seen from
flange side)

1 Class 2 functionality Disable Enable

2 Commissioning diagnostics No Yes

3 Scaling function control Disable scaling Enable scaling


Scaling parameters are
taken into octets 10 to 17.

4
Reserved
... for future
applications
7

12
Encoder Configuration

DDLM_Set_Prm
Octet 26

Bits 7–0

Data 27 – 20

Operating parameters (manufacturer-specific)

Bits Definition =0 =1

0 Limit switch function control Disable Enable


Scaling parameters are
taken into octets 27 to 34.

1 Data_Exchange Alarm Disable Enable

2 Running indication Disable Enable

3 Multi/Single separation Disable Enable

4
Reserved
... for future
applications
7

3.2.1 Code Sequence


The code sequence defines whether increasing position
values for shaft revolutions of the encoder is indicated
clockwise or counterclockwise (seen from flange side). The
code sequence is set by means of the code sequence bit in
the operating parameters.
The code sequence is preset to clockwise revolution of the
shaft (0).

13
Encoder Configuration

3.2.2 Class 2 Functionality


This bit enables/disables class 2 functionality.
Class 2 functionality for the PROFIBUS-DP gateway is preset
to disabled (0). This means that this control bit must be
activated during configuration to support the class 2
functions. For encoders with integral PROFIBUS-DP interface,
the default setting is assigned as with the previously selected
encoder class.

Note!
If a class 1 encoder uses some optional class 2 functions, the
class 2 control bit must be set.

3.2.3 Commissioning Diagnostics


The commissioning diagnostics function makes it possible to
check the encoder components responsible for position
detection during a standstill of the encoder (e.g. light unit,
photo elements and trigger). In conjunction with the position
alarms, it enables thorough checking of whether the position
values are correct. The commissioning diagnostics function is
started by the commissioning bit in the operating parameters.
If an error is found, this is indicated in the diagnostic function
by the commissioning diagnostics alarm bit (see Chapter
3.4.2 “Alarms”).

The commissioning diagnostics function is an option. To find


out whether the encoder supports commissioning
diagnostics, the “operating status” should be read by the
diagnostic function and the commissioning diagnostics bit
should be checked.

3.2.4 Scaling Functions


The scaling function converts the encoder-specific physical
position value by means of software in order to change the
resolution of the encoder.

The parameters "Measuring units per revolution" and "Total


measuring range in measuring steps" are the scaling
parameters set by the parameter function. Scaling is active
only if the control bit for the scaling function is set. When the
control bit is set to 0, the scaling function is disabled.

14
Encoder Configuration

The default setting is:

Measuring units per revolution


= singleturn resolution.

Total measuring range in measuring units


= Singleturn resolution x number of distinguishable
revolutions.

Format of the scaling parameters:

DDLM_Set_Prm
Octet: 10 11 12 13

Bits 31 – 24 23 – 16 15 – 8 7–0

Data 231 – 224 223 – 216 215 – 28 27 – 20

Measuring units per revolution

DDLM_Set_Prm
Octet: 14 15 16 17

Bits 31 – 24 23 – 16 15 – 8 7–0

Data 231 – 224 223 – 216 215 – 28 27 – 20

Total measuring range in measuring units

The data format for both scaling parameters is 32 bits without


sign, with a value range from 1 to 232, which is limited by the
resolution of the encoder. For a 25-bit encoder with a
singleturn resolution of 13 bits the permissible value range for
"Measuring units per revolution" is between 1 and 213 (8192)
and for the "Total measuring range in measuring steps" the
permissible value range is between 1 and 225 (33 554 432).
The scaling parameters are securely stored in the PROFIBUS-
DP master and are reloaded into the main memory of the
encoder at each power-up.

Both parameters are input in 16-bit format. Here a difference


is made between a low and high word.

15
Encoder Configuration

Example of scaling and entry:

Total measuring range in measuring units


= 4000 steps x 3200 revolutions
= 12 800 000
= 00 C3 50 00 hex

® High word: 00C3 hex = 195

® Low word: 5000 hex = 20 480

Entry in the configuration software:


Total measuring range (steps) hi = 195
Total measuring range (steps) lo = 20 480

Note!
If the user wants to transmit a parameter telegram without
changing the scaling parameters and with the scaling function
remaining enabled, the length of the telegram must be limited
to 9 and the scaling function control bit must be set. In this
case the encoder reacts only to the parameter octets that are
received.

Measuring range
The measuring range is defined by the parameter "Total
measuring range in measuring units." The encoder has two
different operating modes, depending on the specified
measuring range. When the encoder receives a parameter
message, it checks the scaling parameters for binary scaling.
If binary scaling is detected, the encoder selects operating
mode A (see following explanation). If not, operating mode B
is selected.

A. Cyclic operation (binary scaling)


Measuring mode A is used if the encoder functions with 2x
number of revolutions (number of revolutions 2, 4, 8, 16, 32,
64 128, 256, 512, 1024, 2048 and 4096).

If the desired measuring range is equal to the specified


singleturn resolution £ 2x (with x £ 12), the encoder operates
in endless cyclic operation (0 to max. position value , 0 to
max. position value, etc.). If the position value of the encoder
exceeds the maximum value (total measuring range) by a
rotation of the axis to be measured, the encoder indicates 0
as position value again.

16
Encoder Configuration

Example of a cyclic scaling:


Measuring units per revolution
= 1000
Total measuring range
= 32,000 (25 = number of revolutions 32)

Position

Measuring range

B. Noncyclic operation
If the measuring range is used to limit the value range of the
encoder to a value other than the specified singleturn
resolution * 2x, the output position value is limited within the
operating range. If the position value resulting from rotation of
the encoder exceeds the maximum value or falls below 0, the
encoder indicates the value of the measuring range. See
figure below.

Example of noncyclic scaling:


Measuring units per revolution
= 100
Total measuring range
= 5000 (number of revolutions 50)

Position
Scaled
total range

Measuring range

17
Encoder Configuration

3.2.5 Multi/Single Separation


Multiturn encoders make it possible to split the 32-bit format
of the position value. When the control bit is activated for the
multiturn/singleturn separation, two separate values are
transferred for the singleturn and multiturn position.

DDLM_Data_Exchange: input words


Word Word 1 Word 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Multiturn-Position Singleturn-Position

3.2.6 Running Indication


When the control bit for the running indication is set, the
position value is stored every 500 µs and compared with the
position value from one second before. This makes it possible
to monitor a continuous process by means of the running
indication. If the position value has not changed within 1 s, bit
28 is set in the input word.

DDLM_Data_Exchange: input word, bit 28


Word Word 1 Word 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
x Position value

3.2.7 Data_Exchange Alarm


When the control bit for the Data_Exchange Alarm is set, the
diagnostic bytes of the encoder can be interrogated online. If
bit 31 is set in the output word, the diagnostic bytes of the
encoder are interrogated. A possibly complicated
interrogation of the diagnostic bytes via function modules is
not necessary.

DDLM_Data_Exchange: output word, bit 31


Word Word 1 Word 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
1

3.2.8 Control Bit for Limit Switch Function


When the control bit for the limit switch function is activated,
two position values can be set. When the current position
values exceed or fall below these values, this is indicated by
the respective bits in the input word. Within the two limit
switch values both signaling bits are set to zero.

18
Encoder Configuration

3.2.9 Limit Switch Minimum


In the octets 27 to 30, a position value minimum is set as
limit switch.

DDLM_Set_Prm
Octet: 27 28 29 30

Bits 31 – 24 23 – 16 15 – 8 7–0

Data 231 – 224 223 – 216 215 – 28 27 – 20

Limit switch minimum

When the value falls below this defined position value, bit 29
is set in the input word:

DDLM_Data_Exchange: input word, bit 29


Word Word 1 Word 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
x Position value

3.2.10 Limit Switch Maximum


In the octets 31 to 34, a position value maximum is set as
limit switch.

DDLM_Set_Prm
Octet: 31 32 33 34

Bits 31 – 24 23 – 16 15 – 8 7–0

Data 231 – 224 223 – 216 215 – 28 27 – 20

Limit switch maximum

When the defined position value is exceeded, bit 30 is set in


the input word:

DDLM_Data_Exchange: input word, bit 30


Word Word 1 Word 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
x Position value

19
Encoder Configuration

3.3 Data exchange

3.3.1 Position
The input data of the encoder are required only for the
position value with a defined length of 32 bits. As an option,
the encoder supports a position value length of 16 bits. The
value is right-justified in the data field.

DDLM_Data_Exchange mode

Standard configuration:
Octet: 1 2 3 4

Bits 31 – 24 23 – 16 15 – 8 7–0

Data 231 – 224 223 – 216 215 – 28 27 – 20

Data_Exchange – 32 bits

Configuration data:
Device class 1 D1hex 2 input data words,
data consistency
Device class 2: F1hex 2 input data words,
2 output data words for
preset value, data consistency

Optional configuration:
Octet: 1 2

Bits 15 – 8 7–0

Data 215 – 28 27 – 20

Data_Exchange – 16 bits

Configuration data:
Device class 1 D0hex 1 input data word,
data consistency
Device class 2: F0hex 1 input data words,
1 output data word for
preset value, data consistency

20
Encoder Configuration

3.3.2 Preset Value Function


The preset value function enables the adaptation of the zero
point of the encoder to the mechanical zero point of the
system. The preset value function sets the actual value of the
encoder as preset value. The preset value is saved in the
encoder as output value when the Data_Exchange function is
activated. The preset value function is used after the scaling
function. This means that the preset value is entered in the
current measuring unit.

The most significant bit (MSB) of the preset value controls


the preset value function as follows:
Normal operating mode: MSB = 0 (bit 31, optional bit 15)
The encoder will not change the preset value.
Default mode: MSB = 1 (bit 31, optionally bit 15)
With MSB = 1, the encoder accepts the transferred value
(bits 0 – 30) as preset value in the binary code. The encoder
reads the current position value and calculates an offset value
using the preset value and the read position value. The
position value is shifted by the calculated offset value. If the
output position value equals the preset value, the preset
mode is terminated and the MSB can be set to 0 by the
master. The resulting offset value can be read by means of
the diagnostic function. In case of a power interruption, it is
permanently stored in the encoder and is reloaded at each
start-up.

Note!
The preset value function should be used only during a
standstill of the encoder.

Preset value format (2 words, 32 bits):


Octet: 1 2 3 4

Bits 31 30 –- 24 23 – 16 15 – 8 7–0

Data 0/1 230 – 224 223 – 216 215 – 28 27 – 20

Preset Preset value - max. 31 bits


control bit

Preset value format (1 word, 16 bits):


Octet: 1 2

Bits 15 14 – 8 7–0

Data 0/1 214 – 28 27 – 20

Preset control bit Preset value - max. 15 bits

21
Encoder Configuration

3.4 Diagnostic Information


The diagnostic information contains diagnostic data which are
on the one hand defined in the PROFIBUS-DP specification
(octets 1 to 6) but are encoder-specific diagnostic data:
Diagnostic function Data type Diagnost. Device Details
octet class
number

Station status 1 Bits 1 1 –

Station status 2 Bits 2 1 –

Station status 3 Bits 3 1 –

Diagnostic master address Bits 4 1 –

PNO identification number Bits 5–6 1 –

Extended diagnostic header Octet string 7 1 3.4.1

Alarms Octet string 8 1 3.4.2

Operating Status Octet string 9 1 3.4.3

Encoder type Octet string 10 1 3.4.4

Singleturn resolution (encoder) 32 without sign 11 – 14 1 3.4.5


Measuring unit (linear encoder)

Number of distinguishable revolutions 16 without sign 15, 16 1 3.4.6

Additional alarms Octet string 17 2 3.4.7

Supported alarms Octet string 18, 19 2 3.4.8

Warnings Octet string 20, 21 2 3.4.9

Supported warnings Octet string 22, 23 2 3.4.10

Profile version Octet string 24, 25 2 3.4.11

Software version Octet string 26, 27 2 3.4.12

Operating time 32 without sign 28 – 31 2 3.4.13

Offset value 32 with sign 32 – 35 2 3.4.14

Manufacturer offset value 32 with sign 36 – 39 2 3.4.15

Measuring units per revolution 32 without sign 40 – 43 2 3.4.16

Total measuring range in measuring units 32 without sign 44 – 47 2 3.4.16

Serial number ASCII string 48 – 57 2 3.4.17

Reserved for future definitions 58 - 61 2 –

Limit switch minimum 32 without sign 62 – 65 Special –

Limit switch maximum 32 without sign 66 - 69 Special –

22
Encoder Configuration

Note!
The length of the diagnostic information of class 1 is limited
to 16 bytes. It is compatible with former DP versions.

For PROFIBUS-DP encoders of class 2, the length of the


encoder-specific diagnostic data including the extended
diagnostic header is 57 bytes (39 hex). In the SPECIAL
configuration, the length of the encoder-specific diagnostic
data is 69 bytes (45 hex).

The DDLM_Slave_Diag memory range up to octet 99 is


reserved for future diagnostic data of class 2.

3.4.1 Diagnostic Header


The header byte specifies the length of the encoder
diagnostics including the header byte. The format of the
transmission length is hexadecimal. For the PROFIBUS-DP
encoder of class 1 the length of the encoder-specific
diagnostic data is 10 bytes (0A hex).

DDLM_Slave_Diag
Octet 7

Bits 7 6 5–0

Data 0 0 xxh

Set to 00. Length including header

Extended diagnosis

3.4.2 Alarms
An alarm is given if a malfunction in the encoder can lead to
incorrect position values. Octet 8 in the diagnostic function
(DDLM_Slave_Diag) indicates the status of the alarms.
Additional alarms for device class 2 are added in the
diagnostic octet 17.

If an alarm is given, the Ext_Diag bit and the Stat_Diag bit in


the diagnostic function are set to high until the alarm is reset
and the encoder can provide a correct position value. Alarms
can be reset (deleted) when all encoder parameters are within
the specified value ranges and the position value is correct.

23
Encoder Configuration

Note
Not every encoder supports every alarm. For encoders of
class 2 the diagnostic information "supported alarms" (see
Chapter 3.4.8) makes it possible to find out which individual
alarm bits are supported.

DDLM_Slave_Diag
Octet 8

Bits 7–0

ALARMS

Bits Definition =0 =1

0 Position error No Yes

1 Voltage supply error No Yes

2 Current is too high No Yes

3 Commissioning diagnostics OK Error

4 Memory error No Yes

5
Currently
6 not
assigned
7

24
Encoder Configuration

3.4.3 Operating Status


Octet 9 in the diagnostic function provides information about
encoder-specific parameters. A class 2 encoder sets the
functionality bit for class 2 commands in order to show the
DP master that all class 2 commands are supported. The DP
master must activate the class 2 functionality bit in the
parameter message (DDLM_Set_Prm) to enable the use of
class 2 functions.

The status bit of the scaling function is set when the scaling
function is activated and the resolution of the encoder is
calculated by means of the scaling parameters.

DDLM_Slave_Diag
Octet 9

Bits 7–0

Operating Status

Bits Definition =0 =1

0 Code sequence Increasing position values Increasing position values


for clockwise revolutions for counterclockwise
(seen from flange side) revolutions (seen from
flange side)

1 Class 2 functionality No, not supported Yes

2 Commissioning diagnostics No, not supported Yes

3 Scaling function status Scaling disabled Scaling enabled

4
Currently
5
not
6 assigned

25
Encoder Configuration

3.4.4 Encoder type


The type of encoder can be read in octet 10 of the diagnostic
function. The type of encoder is defined in hex code in the
range from 0 to FF.

DDLM_Slave_Diag
Octet 10

Bits 0 - FF

Encoder type

Code Definition

00 Absolute singleturn encoder

01 Absolute multiturn encoder

02 Absolute singleturn encoder with electronic revolution counter

03 Incremental rotary encoder

04 Incremental rotary encoder with battery buffer

05 Incremental linear encoder

06 Incremental linear encoder with battery buffer

07 Absolute linear encoder

08 Absolute linear encoder with periodic coding

09

·
Currently
· not
assigned
·

FF

26
Encoder Configuration

3.4.5 Singleturn Resolution or Measuring Step


The singleturn resolution in the diagnostic function has
different meanings depending on the type of encoder.

3.4.5.1 Rotary or Angle Encoder


For rotary or angle encoders, the diagnostic octets 11 to 14
indicate the physical resolution in number of measuring steps
per revolution which is transferred for the absolute singleturn
position value. The maximum singleturn resolution is 232.

DDLM_Slave_Diag
Octet 11 12 13 14

Bits 31 – 24 23 – 16 15 – 8 7–0

Data 231 – 224 223 – 216 215 – 28 27 – 20

Singleturn resolution

3.4.5.2 Linear Encoder


For linear encoders, the diagnostic octets 11 to 14 output the
measuring step in nm (0.001 µm).

Example:
A 1 µm resolution of the linear encoder µm results in a value
of 00 00 03 E8 hex.

DDLM_Slave_Diag
Octet 11 12 13 14

Bits 31 – 24 23 – 16 15 – 8 7–0

Data 231 – 224 223 – 216 215 – 28 27 – 20

Measuring unit

27
Encoder Configuration

3.4.6 Number of Distinguishable Revolutions


The number of distinguishable revolutions that the encoder
can transfer is defined by octets 15 and 16 of the diagnostic
function. In accordance with the formula below, the
measuring range for an encoder results from the number of
distinguishable revolutions multiplied by the singleturn
resolution. The maximum number of distinguishable
revolutions is 65 536 (16 bits).

Measuring range = number of distinguishable revolutions x


singleturn resolution

DDLM_Slave_Diag
Octet 15 16

Bits 15 – 8 7–0

Number of distinguishable revolutions

3.4.7 Additional Alarms


The diagnostic octet 17 indicates additional alarms for device
class 2.

DDLM_Slave_Diag
Octet 17

Bits 7–0

Additional alarms

Bits Definition =0 =1

0
Currently
·
not
7 assigned

28
Encoder Configuration

3.4.8 Supported Alarms


The diagnostic octets 18 and 19 contain information on the
supported alarms.

DDLM_Slave_Diag
Octet 18 19

Bits 15 – 8 7–0

Supported alarms

Bits Definition =0 =1

0 Position error Not supported Supported

1 Voltage supply error Not supported Supported

2 Current is too high Not supported Supported

3 Commissioning diagnostics Not supported Supported

4 Memory error Not supported Supported

5
Currently
·
not
15 assigned

29
Encoder Configuration

3.4.9 Warnings
Warnings indicate that tolerances for certain internal
parameters of the encoders have been exceeded. Contrary to
alarms, no faulty position values are expected in case of
warnings.
Octets 20 and 21 of the diagnostic function indicate the
status of the warnings. If a warning is set, the Ext_Diag bit in
the diagnostic function is logically set to 1 until the warning is
reset. All warnings are deleted when the diagnostic message
of the encoder has been read. However, if the tolerances are
still exceeded, the warning is activated again. The warning
"Maximum operating time exceeded" (bit 4) is not activated
before the system is switched on again.
Not every encoder supports every warning. Please refer to
the diagnostic information under “Supported Warnings“ (see:
Chapter 3.4.10), for information on the support of specific
warnings.

DDLM_Slave_Diag
Octet 20 21

Bits 15 – 8 7–0

WARNINGS

Bits Definition =0 =1

0 Frequency exceeded No Yes

1 Temperature exceeded No Yes

2 Light control reserve Not reached Reached

3 CPU monitoring status OK Reset

4 Maximum operating time No Yes


exceeded

5 Battery charging OK Too low

6 Reference point Reached Not reached

7
Currently
·
not
15 assigned

30
Encoder Configuration

3.4.10 Supported Warnings


The diagnostic octets 22 and 23 contain information on
supported warnings.

DDLM_Slave_Diag
Octet 22 23

Bits 15 – 8 7–0

Supported Warnings

Bits Definition =0 =1

0 Frequency warning Not supported Supported

1 Temperature warning Not supported Supported

2 Light control reserve Not supported Supported


warning

3 CPU monitoring status Not supported Supported


warning

4 Maximum operating time Not supported Supported


exceeded warning

5 Battery charging warning Not supported Supported

6 Reference point warning Not supported Supported

7
Currently
·
not
15 assigned

31
Encoder Configuration

3.4.11 Profile Version


Octets 24 and 25 of the diagnostic function provide the
PROFIBUS-DP encoder profile version that is implemented in
the encoder. The octets revision number and index are
combined.

Example:
Profile version: 1.40
Octet no. 24 25
Binary code: 00000001 01000000
Hex: 1 40

DDLM_Slave_Diag
Octet 24 25

Bits 15 – 8 7–0

Data 27 – 20 27 – 20

Revision number Index

Profile Version

3.4.12 Software Version


Octets 26 and 27 of the DDLM_Slave_Diag function provide
the software version of encoder. The octets revision number
and index are combined.

Example:
Software version: 1.40
Octet no.: 26 27
Binary code: 00000001 01000000
Hex: 1 40

DDLM_Slave_Diag
Octet 26 27

Bits 15 – 8 7–0

Data 27 – 20 27 – 20

Revision number Index

Software version

32
Encoder Configuration

3.4.13 Operating Time


The operating time monitor stores the operating time for the
encoder in operating hours. The operating time is saved every
six minutes in the encoder’s nonvolatile memory. This
happens as long as the encoder is under power. The
operating time is displayed as a 32-bit value without sign in
0.1 h by the DDLM_Slave_Diag function.

If the operating time function is not supported by the


encoder, it is set to the maximum value (FFFF FFFF hex). The
manufacturer of the encoder can define a maximum operating
time.
If this limit is exceeded, the "maximum operating time
exceeded" bit is activated (see: Chapter 3.4.9 “ Warnings”).

DDLM_Slave_Diag
Octet 28 29 30 31

Bits 31 – 24 23 – 16 15 – 8 7–0

Data 231 – 224 223 – 216 215 – 28 27 – 20

Operating time

3.4.14 Offset Value


The offset value is calculated by the preset value function and
shifts the position value by the calculated value. The offset
value is stored in the encoder and can be provided by the
diagnostic octets 32 to 35. The data type for the offset value
is a 32-bit binary value with algebraic sign, whereby the offset
value range is equal to the measuring range of the encoder.

The preset value function is used after the scaling function.


This means that the offset value is indicated according to the
scaled resolution of the encoder.

DDLM_Slave_Diag
Octet 32 33 34 35

Bits 31 – 24 23 – 16 15 – 8 7–0

Data 231 – 224 223 – 216 215 – 28 27 – 20

Offset Value

33
Encoder Configuration

3.4.15 Offset Value of the Encoder Manufacturer


The manufacturer offset value indicates the encoder offset
set by the manufacturer. This value gives information on the
shift of the position zero point in number of positions from
the physical zero point of the encoder. The data type for the
offset value is a 32-bit binary value with sign. The value range
corresponds to the measuring range of the encoder. The
offset value of the manufacturer of the encoder is indicated in
the number of units according to the basic resolution of the
encoder. The value is stored in write-protected memory,
which can be changed only by the encoder manufacturer.
This value has practically no importance for the user.

DDLM_Slave_Diag
Octet 36 37 38 39

Bits 31 – 24 23 – 16 15 – 8 7–0

Data 231 – 224 223 – 216 215 – 28 27 – 20

Offset Value of the Encoder Manufacturer

3.4.16 Scaling Parameters Settings


The scaling parameters are set in the DDLM_Set_Prm
function. The parameters are stored in the octets 40 to 47 of
the diagnostic data. The "Measuring units per revolution" and
"Total measuring range in measuring units" parameters define
the selected resolution of the encoders.
The status bit of the scaling function in the operating status
(octet 9 of the diagnostic data) indicates whether the scaling
function is enabled.

Values preset by the manufacturer of the encoder:


Measuring units per revolution
= singleturn resolution.
Total measuring range in measuring units
= singleturn resolution x number of distinguishable
revolutions.

The data type for both values is 32 bits without sign.

34
Encoder Configuration

DDLM_Slave_Diag
Octet 40 41 42 43

Bits 31 – 24 23 – 16 15 – 8 7–0

Data 231 – 224 223 – 216 215 – 28 27 – 20

Measuring units per revolution

DDLM_Slave_Diag
Octet 44 45 46 47

Bits 31 – 24 23 – 16 15 – 8 7–0

Data 231 – 224 223 – 216 215 – 28 27 – 20

Total measuring range in measuring units

3.4.17 Encoder Serial Number


Octets 48 to 57 of the diagnostic function provide the serial
number of the encoder as a 10-character ASCII string. If the
serial number is not supported, the ASCII string consists only
of asterisks (**********). This corresponds to hex code 2A.

DDLM_Slave_Diag
Octets 48 – 57

Bits 79 – 0

Data ASCII

Serial number

Example of a serial number


Octet 48 49 50 51 52 53 54 55 56 57

ASCII string 30 30 30 35 39 46 38 44 45 35

Serial (hex.) 0 0 0 5 9 F 8 D E 5

Serial (dec.) 9434 2629

35
Configuration Example

4 Configuration Example
This example using a Siemens S5 (115 with CPU 942A) with
IM 308-C master interface module and the COM PROFIBUS
configuration software is intended to illustrate the
commissioning of a model ROQ 425 absolute rotary encoder.
The encoder is to be scaled to 3600 measuring units per
revolution and a maximum measuring range.

Please refer to the respective manufacturer for information on


the configuration of other PROFIBUS-DP master interface
modules.

Copying the GSD and bitmap file


First, copy the GSD file “JHDPa401.gsd” from the floppy disk
directory Encoders\ROC_ROQ_EQN\GSD into the directory
...\GSD, and bitmap file “Jh_encon.bmp” from the directory
Encoders\ROC_ROQ_EQN\Bitmap into the directory ...\Bitmap.

Then, all the type files are copied into the configuration
software COM PROFIBUS by selecting the File command in
the menu bar and the menu item Scan GSD files.

Note!
There is no confirmation after the copying process.

Configuration of the master system


The next step is the configuration of the master system.
Using the File menu item, either open an existing file or
create a new configuration.
In this example a new configuration is created with the
master system IM 308-C on the host station type S5-
115U/CPU 942A with the station address 1.

36
Configuration Example

Selecting the DP Slave


After confirming with the OK button, select as the next step
the PROFIBUS-DP slave. In this example, it is an Encoder.
After using the mouse to select the DP slave, append it to the
master component IM 308-C and enter the address of the DP
slave in the input mask. This must be identical with the
address defined for the DP slave.

After you select the slave address, the selection menu


appears for the station type.

37
Configuration Example

Configuring the DP slave


When you select the Configure... button, the input mask for
configuring the DP slave opens. Click the Order Number
button to select the encoder class. In our example, it is a
Multiturn CLASS 2.

Assigning parameters for the DP slave


After confirming your input with OK, click the Param. button.
An input mask opens for entering the parameters of the DP
slave.

In the parameter mask, enter one by one the characteristics


for the DP slave.
In this example, that means:

Parameter Value Details in Chapter


Direction of rotation Increasing clockwise 3.2.1
Class 2 functionality Enabled 3.2.2
Commissioning diagnostics Disabled 3.2.3
Scaling function Enabled 3.2.4
Measuring units per revolution 3600
Total measuring range (hi) 225
Total measuring range (lo) 0
38
Configuration Example

The total measuring range is calculated according to the


pattern described in the chapter entitled Scaling Function.

For this example, the maximum total measuring range is


calculated as follows:
Scaled total measuring range
= scaled measuring steps per revolution
x max. number of distinguishable revolutions
= 3600 x 4096
= 14 745 600
= 00 E1 00 00 hex

® Total measuring range (hi)


= 00 E1 hex = 225 decimal
® Total measuring range (lo)
= 00 00 hex = 0 decimal

39
Appendix

5 Appendix
A) Overview of encoder functions
The encoder specification comprises functions for
comprehensive diagnoses and for parameterizing the position
value. Tables A.1 and A.2 provide an overview of encoder
data for class 1 and class 2 encoders.

These data are implemented as user-specific data of the


communications functions.

Table A.1: Encoder-specific data class 1


(CLASS 1), mandatory for all DP encoders
Function Octet no. Data type Name

Data_Exchange 1–4 32-bit unsigned *) Position value (input)

Data_Exchange 1–4 32-bit unsigned *) Preset value (output)

RD_Inp 1–4 32-bit unsigned *) Position value

Slave_Diag 7 Octet string External extended


diagnostic header

Slave_Diag 8 Octet string Alarms

Slave_Diag 9 Octet string Operating status

Slave_Diag 10 Octet string Encoder type

Slave_Diag 11 – 14 32-bit unsigned Singleturn resolution or


measuring step

Slave_Diag 15, 16 16-bit unsigned Number of


distinguishable
revolutions

Set_Prm 9 Octet string Operating parameters

*) Optionally 16-bit unsigned

40
Appendix

Table A.2: Encoder-specific data class 2


(CLASS 2), optional functionality
As supplement to Table A.1
Function Octet no. Data type Name

Slave_Diag 17 Octet string Additional alarms

Slave_Diag 18, 19 Octet string Supported alarms

Slave_Diag 20, 21 Octet string Warnings

Slave_Diag 22, 23 Octet string Supported warnings

Slave_Diag 24, 25 Octet string Profile version

Slave_Diag 26, 27 Octet string Software version

Slave_Diag 28 – 31 32-bit unsigned Operating time

Slave_Diag 32 – 35 32-bit signed Offset value

Slave_Diag 36 – 39 32-bit signed Manufacturer’s offset


value

Slave_Diag 40 – 43 32-bit unsigned Measuring units per


revolution

Slave_Diag 44 – 47 32-bit unsigned Total measuring range in


measuring units

Slave_Diag 48 – 57 ASCII string Serial number

Set_Prm 10 – 13 32-bit unsigned Measuring units per


revolution

Set_Prm 14 – 17 32-bit unsigned Total measuring range in


measuring units

41
Appendix

B) History
Version Date Modifications
1.0 2000-07-18 First edition
1.01 2000-08-22 Change of SPECIAL octet assignment
for operating parameters and limit
switch
- Change of bit assignment for
Data_Exchange_Alarm
- Supplementation of diagnostic
information about limit switch
positions

42
DR. JOHANNES HEIDENHAIN GmbH
Dr.-Johannes-Heidenhain-Straße 5
83301 Traunreut, Germany
{ + 49 / 86 69 / 31-0
| + 49 / 86 69 / 50 61
e-mail: [email protected]
{ Service + 49 / 86 69 / 31-12 72
{ TNC-Service + 49 / 86 69 / 31-14 46
| + 49 / 86 69 / 98 99
e-mail: [email protected]
http://www.heidenhain.de

Ve 00
345 677-20 · 2 · 9/2000 · S · Printed in Germany · Subject to change without notice

You might also like