Profibus Encoder Connection
Profibus Encoder Connection
Drrheimer Str. 36
78166 Donaueschingen
Phone
0771 / 807-0
Fax
0771 / 807-100
Commissioning Instructions
ATM60 / ATM90 / KHK53
with Profibus DP Interface to EN 50170 Vol. 2
Commissioning Instructions
Jan 2005
The data in this documentation describes the product. The properties, however,
are not guaranteed.
SICK STEGMANN GmbH
Duerrheimer Strae 36
D-78166 Donaueschingen
Phone:
Fax:
Web:
http://www.sick-stegmann.de
Version:
Jan 2005
We reserve the right to make technical changes to the documentation and the products
at any time.
Jan 2005
Contents
Contents
Contents 1
Schedule of Revisions ................................................................................................................6
1
Introduction...............................................................................................................7
1.1
Using these Commissioning Instructions....................................................................7
1.2
Documentation............................................................................................................7
1.3
Definition of the Symbols Used in the Document .......................................................7
1.4
Conformity ..................................................................................................................7
1.4.1
Profibus.......................................................................................................................7
1.4.2
European Union Directive Compliance.......................................................................7
2
Designations and Abbreviations .............................................................................9
2.1
Profibus DP-Specific...................................................................................................9
2.2
Data Type Specifications ............................................................................................9
2.3
Encoder-Specific.......................................................................................................10
3
Safety Precautions .................................................................................................11
3.1
Responsibilities of the Commissioning Staff.............................................................11
3.2
Validity and Application.............................................................................................11
3.3
Authorised Users ......................................................................................................12
3.4
Safety Guidelines and Personal Protection ..............................................................12
3.5
Encoder Safety Precautions for Installation, Operation and Maintenance ...............13
4
Introduction.............................................................................................................14
4.1
Profibus Standardisation...........................................................................................14
4.2
Profibus DP...............................................................................................................14
4.2.1
DP-V0 Communication Protocol ...............................................................................15
4.3
Physical Profibus Network Link ................................................................................16
4.3.1
Network Topology.....................................................................................................16
4.3.2
RS485 Transmission Technology.............................................................................17
4.3.3
Installation Notes re: RS485 .....................................................................................17
4.3.4
Profibus Cabling for RS485 ......................................................................................18
4.3.5
Cable Screening .......................................................................................................19
4.4
Device Profiles..........................................................................................................19
4.5
Further Information ...................................................................................................20
5
Encoder Modes .......................................................................................................21
5.1
Cyclical Data Transmission ......................................................................................21
5.1.1
Parameterisation.......................................................................................................21
5.1.2
Configuration ............................................................................................................21
5.1.3
I/O Data Transmission ..............................................................................................21
5.2
Specification of the Encoder Data ............................................................................21
6
Encoder Parameters/Attributes .............................................................................22
6.1
General Conditions for Using the Scaling Function ..................................................22
6.1.1
Specification for Using the Encoder in Continuous Mode ......................................22
6.1.2
Case a) Scaling Function without Limitation to the Measuring Range (with Offset) .22
6.1.3
Case b) Adapted Scaling Functions (without Offset) ................................................23
6.2
Data Storage.............................................................................................................25
6.3
Encoder Attributes/Parameters.................................................................................25
6.3.1
Fundamental Explanations .......................................................................................25
Jan 2005
Contents
6.3.2
6.3.3
6.3.4
6.3.5
6.3.6
6.3.7
6.4
6.4.1
6.4.2
6.4.3
6.4.4
7
7.1
7.2
7.3
7.4
7.4.1
7.4.2
7.4.3
8
8.1
8.2
8.3
8.3.1
8.3.2
8.3.3
8.3.3.1
8.3.3.2
8.3.3.3
8.3.3.4
8.3.3.5
8.3.3.6
8.3.4
8.3.5
8.4
8.5
8.5.1
8.5.2
8.5.3
8.5.4
8.5.5
8.5.6
9
9.1
9.2
9.3
9.3.1
9.3.2
9.3.3
2
Jan 2005
Contents
9.3.4
9.4
9.4.1
9.4.2
9.4.3
9.4.3.1
9.4.3.2
9.4.3.3
9.4.3.4
9.4.4
9.4.5
9.4.6
9.4.7
9.5
9.5.1
9.5.2
9.5.3
9.5.4
9.5.5
9.5.6
9.5.7
9.5.8
9.5.9
9.5.10
9.5.11
9.5.12
9.5.13
9.6
9.6.1
9.6.2
9.6.3
10
10.1
10.2
10.2.1
10.2.2
10.3
10.3.1
10.3.2
10.3.3
10.3.4
10.3.5
10.3.6
10.4
10.4.1
10.4.2
10.4.3
10.4.4
Jan 2005
Master Address.........................................................................................................47
Device-Specific Diagnostics Class 1 .....................................................................47
Class 1 Diagnostic Data Overview ........................................................................47
Diagnostic Header ....................................................................................................47
Alarms.......................................................................................................................47
Commissioning Diagnostics Alarm ...........................................................................48
EEPROM Memory Error ...........................................................................................48
Error in the Position Value ........................................................................................48
Error Correction Measures .......................................................................................48
Operating Status.......................................................................................................49
Device Identification..................................................................................................49
Physical Resolution Span (PRS) ..............................................................................49
Physical Number of Revolutions (PNumR) ...............................................................49
Device-Specific Diagnostics Class 2 .....................................................................50
Class 2 Diagnostic Data Overview ........................................................................50
Diagnostic Header ....................................................................................................50
Additional Alarms......................................................................................................50
Supported Alarms .....................................................................................................51
Warnings...................................................................................................................51
Supported Warnings .................................................................................................51
Profile Version ..........................................................................................................52
Software Version ......................................................................................................52
Operating Time .........................................................................................................52
Offset Value ..............................................................................................................52
Counts per Revolution -- [CPR] ................................................................................52
Number of counts per Measuring Range -- [CMR] ...................................................53
Serial Number...........................................................................................................53
Manufacturer-Specific Diagnostics (Manufacturer Class).........................................53
Station Address ........................................................................................................53
Encoder Status .........................................................................................................53
DP Controller Status .................................................................................................54
Encoder Mounting and Connection ...................................................................55
Mounting ...................................................................................................................55
Screening..................................................................................................................55
Screen Connection at the Bus Link Adapter with Cable Fitting ATM60-P/ATM90-P/
KHK53-P...................................................................................................................56
Screen Connection at the Bus Link Adapter with Screw-in System ATM90-P .........57
Connection to the Network .......................................................................................58
Installation Notes re: Voltage Supply........................................................................58
ATM 60 with Bus Link Adapter Cable Fitting .........................................................58
ATM 60 with Bus Link Adapter Screw-in System M12...........................................59
ATM 90 with Bus Link Adapter Cable Fitting .........................................................60
ATM 90 with Screw-in System M14 without Bus Link Adapter ..............................61
Linear Encoder KHK53 with Bus Link Adapter Cable Fitting .................................62
Device Handling in the Network................................................................................62
Address Setting ........................................................................................................64
Counting Direction ....................................................................................................66
Preset Function.........................................................................................................66
Bus Termination........................................................................................................66
ATM60 / ATM90 / KHK53
Contents
10.5
Status/Display Information........................................................................................67
11
Technical Description ............................................................................................68
11.1
Description of the Rotary Encoders ..........................................................................68
11.2
Description of the Linear Encoder ............................................................................68
11.3
Profibus Interface Brief Overview of Specific Features .........................................68
11.4
Profibus Interface Specification .............................................................................69
List of Figures............................................................................................................................70
Notes
71
Jan 2005
Jan 2005
Schedule of Revisions
Schedule of Revisions
The following information lists the revisions made by the company since the first edition.
New information (N)
New properties and additional information on existing properties.
Revised information (R)
Revisions to the previous edition, which require a different procedure during commissioning.
Inf.
Revisions
First edition of the document
Chapter
Rev
1.00
Date
Jan 2005
Jan 2005
Introduction
Introduction
1.1
These instructions give an overview of the ATM60/ATM90/KHK53 encoders with Profibus interface and describe configuration, installation, operation and maintenance of the devices in the
Profibus network.
These instructions have been written for trained persons who are responsible for installation,
assembly and operation of the ATM60/ATM90/KHK53 encoders in industrial environments.
The commissioning staff should understand Profibus network operations and know how slave
devices function in a network and communicate with a Bus Master. There should be basic understanding of and experience in electrical terminology, programming procedures, networks, the
devices and software required as well as knowledge of applicable safety regulations.
1.2
Documentation
This documentation
1.3
This symbol identifies text with important information on the correct use of the
encoders. Non-compliance may lead to encoder malfunctions.
This symbol identifies text with useful details or explanations for the better understanding of this documentation.
1.4
Conformity
1.4.1
Profibus
1.4.2
Declaration of Conformity
Jan 2005
Introduction
Jan 2005
2.1
Profibus DP-Specific
PNO
DP
ID
GSD
DPM1
DPM2
Node
MAC ID
SAP
FDL
DDLM
IO (I/O)
Input data
Output data
2.2
BOOL
BYTE
WORD
USINT
UINT
UDINT
SINT
INT
DINT
Jan 2005
Boolean
Bit String
Bit String
Unsigned Short Integer
Unsigned Integer
Unsigned Double Integer
Signed Short Integer
Signed Integer
Signed Double Integer
1 bit
1 byte (8 bits)
2 bytes (16 bits)
Int (1 byte) - (0...255)
Int (2 bytes) - (0...65,535)
Int (4 bytes) - (0...+232.-1)
Int (1 byte) - (-128...+127)
Int (2 bytes) - (-32,768...+32,767)
Int (4 bytes) - (-231...+231 - 1)
2.3
Encoder-Specific
CPR (cpr)
CMR
R
Scaling parameters
Counts (steps) per Revolution (per span for linear ones). customer-specified -Counts (steps) over the total Measuring Range. customer-specified -Ratio (R) = [CMR] / [CPR]. limited to values 2**N, (N=0,1,...13)
Scaling parameters: [CMR], [CPR]
PRS
PnumRev
PMR
PM_Bit
PmaxVal
ScF
Pos_Scal
Pos_Phy
CPS
RPS
RPM
METpM
01METpM
10
Jan 2005
Safety Precautions
Safety Precautions
3.1
Due to the various possible applications of the products described in this documentation, those
responsible for the application and use of the devices must personally ensure that all necessary
measures are taken so that the application and use of devices meets the performance and
safety requirements. The applicable laws, regulations, guidelines and standards shall be taken
into account.
The devices described in this documentation are intended for use under industrial conditions.
Non-compliance with applicable safety regulations, process-related and other instructions can
lead to bodily harm and/or damage to the devices or the system. Qualified users
of/commissioning staff for these devices are personally responsible for the selection of suitable
products for the intended application. SICK STEGMANN GmbH accepts no liability and no responsibility for direct or indirect consequential damage due to improper handling or incorrect selection of products. Proper handling assumes that the instructions in this documentation are followed.
Qualified users or commissioning staff are those familiar with the safety requirements and their
application to installation, operation and maintenance of the devices.
It is advisable for persons operating or maintaining electrical or mechanical devices, to have basic knowledge of First Aid.
3.2
Jan 2005
11
Safety Precautions
3.3
Authorised Users
Installation and maintenance of the encoders must be performed by
trained and qualified staff with knowledge of electronics, precision
engineering and controller programming. The appropriate standards
of technical safety requirements must be met.
3.4
12
Jan 2005
Safety Precautions
3.5
Jan 2005
The ATM60/ATM90/KHK53 encoders must only be fitted or maintained when free from voltage. Consequently, for any electrical or
electronic devices, machine and system parts linked to installation, operation or maintenance, the voltage must previously have
been switched off. Also check that they are voltage-free.
Cabling, earthing, screening and overvoltage protection are of
particular importance.
Check whether switching off devices, machines or system parts
causes dangers.
If necessary, place warning signs to prevent unauthorised persons from entering the danger area.
The correct functioning of safety features shall be checked (e.g.
emergency stop).
EMC-compliant earthing and screening must be performed with
particular care, to ensure satisfactory operation of the devices.
The safe assembly of all components must be checked prior to
switching back on.
Avoid impacts on shaft and collet.
Programs which frequently use Explicit Messages, to write parameters to the EEPROM (non-volatile memory) of the encoders,
should be avoided. This could significantly reduce the lifetime.
During commissioning of the encoders via a configuration tool,
there must be no connection to a running network.
13
Introduction
Introduction
4.1
Profibus Standardisation
Profibus is based on known international standards. The protocol architecture follows the
ISO/OSI layer model. Since 2000, Profibus is specified in IEC 61158 Type 3 and IEC 61784.
IEC 61158 Type 3 includes the whole range of Profibus consisting of the DP-V0, DP-V1 and
DP-V2 versions. IEC 61784 specifies the properties of the CPF 3 communication series, in
which the profiles used under Profibus are summarised.
Profibus achieved national standardisation in 1993 through DIN 19245, Part 1-3 and panEuropean standardisation in 1996 through EN 50170.
Application Profiles
User
DP-Functions
DP-Funktionen
DP-Grundfunktionen
Application
(7)
FMS
(3)-(6)
Data Link
(2)
Physical
(1)
IEC Interface
IEC 1158-2
ISO/OSI Schichtenmodell
Layer
The Profibus range consists of three compatible versions (DP, PA, FMS). All three versions use
the same type of protocol for bus access. This protocol is integrated via layer 2 in the OSI reference model. It also includes data integrity and handling of the transmission protocols and telegrams. The 'DP' and 'FMS' versions also use the same transmission technology, which is integrated via layer 1.
PROFIBUS profiles
PROFIBUS
Profile
4.2
Profibus DP
This version is intended for high-speed data communication at device level. Central controllers
(e.g. PLCs/PCs) thus communicate with their distributed field devices (input/output units, drives,
encoders etc.) via a special serial high-speed link.
Profibus DP uses layer 1, layer 2 and the user interface. The DDLM offers the user interface
easy access to layer 2. The functions of the application are defined in this part of the interface.
Profibus DP only uses a part of the services of layer 2. These services are called via Service
Access Points (SAPs) of layer 2 through higher layers (user interface). For Profibus DP, each
SAP is allocated a precisely defined function.
14
Jan 2005
Introduction
The following services are used by the DP version:
SRD
Send and request data with reply.
SDN
Send
Data
with
No
Multicast telegrams.
Acknowledgement
--
Broadcast,
This version provides the basic functionality of DP including the cyclical data exchange, as well
as different types of diagnostics.
Jan 2005
15
Introduction
Comprehensive overview of the basic functions:
Technology
Bus access
Communication
Operations conditions
Synchronisation
Functionality
Safety functions
Device types
Detailed description
Token Passing procedure between masters and master-slave
procedure for slaves.
Mono-master or multi-master systems are possible.
Master and slave devices, max. 126 stations on a bus.
Peer-to-peer (user data traffic) or multicast through Global Control Commands (GCC).
Cyclical master-slave user data transmission
Operate: cyclical transmission of input/output data.
Clear: inputs are read, outputs remain in a failsafe status.
Stop: no transmission of user data.
Global control commands enable the synchronisation of inputs
and outputs.
Sync Mode: outputs are synchronised.
Freeze Mode: inputs are synchronised.
Cyclical user data traffic between master(s) and slave(s).
Dynamic activation/deactivation of individual slaves, testing the
slave configuration.
Diagnostic functions (3 hierarchical levels).
Synchronisation of inputs and/or outputs.
Address assignment for slaves over the bus.
Maximum possible 246 bytes of input/output per slave.
Message transmission with Hamming distance HD = 4.
Watchdog timer of the DP slave detects errors of the master allocated.
Access protection for the inputs/outputs of the slaves.
Monitoring of user data traffic using an adjustable monitoring
timer for the master.
Class 1 DP Master (DPM1): central programmable controllers
such as PLCs or PCs.
Class 2 DP Master (DPM2): developmental or diagnostic tools.
DP Slave: device with binary or analogue inputs/outputs.
4.3
4.3.1
Network Topology
The cabling and some specific features such as bus termination, are shown.
16
Jan 2005
Introduction
4.3.2
The ATMxx and KHK53 encoders with Profibus interface use RS485 transmission technology.
This is the most frequently used technology for Profibus DP, and is very easy to handle. The installation of the twisted pair cable does not require expert knowledge. The bus structure permits
the addition and removal of stations as well as step-by-step commissioning of the system, without affecting the other stations concerned.
The transmission speed is between 9.6 KBits/s and MBits/s (selectable). During commissioning, the same transmission speed is selected for all devices on the bus (the encoders automatically adjust).
Basic functions when using RS485 technology:
Network topology
Signal transmission
Station numbers
Connectivity
4.3.3
All devices are connected in a line bus structure. Up to 32 stations (masters or slaves) can be
interconnected in a segment. At the beginning and end of each segment, the bus is terminated
using a terminating resistor. Trouble-free operation requires that the two bus terminations always be supplied with voltage.
For more than 32 subscribers, repeaters (line amplifiers) must be used to connect the individual
bus segments.
The encoders contain connectable bus terminations - (see DIP switch-n).
Jan 2005
17
Introduction
At the bus connector or at the bus terminal block, a 5 V supply voltage is available for the bus
termination via external resistors. See also Figure 44 (VP, DGND).
The maximum cable length depends on the transmission speed. The specified length can be
extended using repeaters. The use of more than 3 successive repeaters is not recommended.
The cores of the data cables are identified by 'A' and 'B' (terminals (3) and (8)). It is not defined
which core must be connected to a particular terminal on the bus terminal block. The handling,
however, must be identical throughout the system. The following allocations are used:
Data line 'A'
green
Data line 'B'
red
4.3.4
Two basic cable types are available for copper-based Profibus DP networks. According to the
electrical properties, they are called 'cable type A' and 'cable type B' (not to be confused with
the cores A and B at 4.3.3).
Cables of type A are the only permitted cables for new installations.
The following specifications relate to a cable of type A:
Parameter
Wave impedance
Distributed capacitance
Loop resistance
Core diameter
Core cross-section
18
The cumulative length of all spurs is limited to 6 m (depending on how the stations are arranged).
Jan 2005
Introduction
9.6
19.2
93.75
187.5
500
1,500
12,000
1200
1200
1000
1000
400
200
100
The length of a spur also includes the distance between the plug socket and the
RS485 line driver within a device.
I/O bus cables should be laid in their own cable ducts or in metallic, electrically conductive conduits. This improves the EMC properties. The following conditions must be met:
The cables must not be twisted, stretched or crushed.
The temperature range for the laying and operation.
The max. permitted stretching and bending stresses.
4.3.5
Cable Screening
4.4
Device Profiles
Applications using Profibus combine standard objects and application-specific objects together
in device profiles. The device profile fully defines the device from the network perspective.
The PNO co-ordinates the work of industrial experts on developing both new object specifications and device profile specifications. Hence there are Special Interest Groups (SIGs). Profiles
provide a summary specification of how Profibus DP is used in individual areas of application.
When using the profiles, system operators and end users have the benefit of being able to interchange different manufacturers devices. The profiles thus lead to a significant reduction in
development costs.
Jan 2005
19
Introduction
The Encoder SIG has, in agreement with the PNO, produced a device profile (Version 1.1), to
ensure the interoperability of their devices.
The following issues were defined:
Measuring principle of absolute and incremental encoders.
Functionality of two device classes (Device Class 1, Class 2).
4.5
Further Information
20
Jan 2005
Encoder Modes
Encoder Modes
The Profibus DP specification, level DP-V0, only defines the cyclical data traffic between a master and a slave. Each download/upload of the parameter data must be complete before the cyclical data exchange is started. The checking of diagnostic data, in case of error[s], is also embedded in the cyclical data traffic.
The encoders only support the basic DP functions according to DP-V0 specification.
There are three main states:
Stop:
No data transmission between DPM1 and encoder.
Clear: DPM1 reads the input information from the encoder and holds the outputs in
failsafe condition.
Operate: cyclical data traffic operation, via polling
5.1
Data transmission between the DPM1 and the encoder is divided into three phases:
Parameterisation
Configuration
Transmission of the I/O data (data exchange)
5.1.1
Parameterisation
The encoder receives a set of parameterisation data according to the encoder profile (see 8.3.2)
5.1.2
Configuration
The encoder receives one (1 byte), which contains the configuration setup, according to the encoder profile (see 8.4).
This setup, also called Module Config, determines how the data is ultimately put together once
I/O data transmission has started.
5.1.3
Further information see Data Types 6.4 and Data Exchange Mode 8.5.
5.2
Essentially, the encoder is an input/output device. This means that the masters encoder data
is used by the bus and itself produces data for the bus. The functionality of the output data is
reduced to the Preset value' data type.
The table shows the properties of all data types supported across the different module configurations, also called Data Assemblies.
Data type
Position value
Speed value
Time stamp
Preset value
(*1)
(*2)
Data size
4 bytes
2 bytes
2 bytes
Assembly (Ax)
1, 2, 3, 4, 5, 6
3, 4, 5, 6
5, 6
4 bytes
2, 4, 6
Prod_Update (x1)
0.250 ms
50.000 ms
0.250 ms
Cons_Update
~ 20 ms - (x2)
Jan 2005
21
Encoder Parameters/Attributes
Encoder Parameters/Attributes
6.1
6.1.1
If a rotary absolute encoder exceeds the physical measuring range [PMR], it continues to count
either with its minimum value [PminVal] (0) or its maximum value [PmaxVal], depending on the
direction of rotation (i.e. it wraps around). Successful counting, relating to position readout, is
only ensured if the scaled measuring range [CMR] is an integer multiple of [PMR]. The mapping
of the [CMR] on the [PMR] with an offset (residual value through non-integer multiple) leads to
an incorrectly scaled position value (no monotonous counting sequence). Possible solutions:
a) Mapping the scaled measuring range in the physical measuring range and adapting the resulting offset. The physical measuring range exceeds the limits or falls within the limits. The
offset value must be stored in a non-volatile RAM (EEPROM), to ensure after switching off
and on again the correct conversion of the physical position value to the scaled position
value.
b) Selecting the scaled measuring range such that it can be mapped completely in the physical
measuring range (without resulting offset). This means a possible adaptation of the configured CMR value.
The following illustration shows an example of the relationship between the two measuring
ranges.
[0...N] = Minimum/maximum values of the physical measuring range [PMR].
[0...M] = Minimum/maximum values of the scaled measuring range [CMR].
0
N0
CMR - 1
CMR - 2
M
CMR - 3
M
offset
M
N0
M
0
M
0
M
0
Without considering the resulting offset, the scaled position values are no longer correct. The
encoder changes from one physical measuring range to the next.
0
M 0
M 0
M 0
M 0
M 0
M 0
M 0
The offset is used to calculate a correctly scaled position value. When changing from one
physical measuring range to the next, the offset value itself must be adapted.
6.1.2
Case a) Scaling Function without Limitation to the Measuring Range (with Offset)
The scaled measuring range is mapped into the physical measuring range. A (possibly resulting) offset is used to ensure the correct conversion of physical position values to scaled position values. The customer-specified value for CMR is not matched to obtaining a 2N value for
the relationship between CMR and CPR. -- The following limitations are defined:
22
Relationship (quotient) between CMR and CPR (R) must be greater than or equal to 1.
Jan 2005
Encoder Parameters/Attributes
CMR must be smaller than or equal to the physical measuring range supported by the encoder.
6.1.3
The scaled measuring range is mapped completely in the physical measuring range. The customer-specified value for CMR is matched to obtaining a 2N value for the relationship between
CMR and CPR (there is no offset). The following settings are also valid:
R = 2**N, with N = {0,1, 13}, R= CMR/ CPR (with CMR being a multiple of CPR
CMR PMR.
The table below shows some configurations for adhering to the limits defined:
Customer-specified value
CPR
CMR
8,192
67,108,864
8,192
67,108,863...
33,544,432
8,192
33,544,431...
16,777,216
8,192
16,383... 8,192
8,192
8,191... 1
4,096
4,096
4,096 (B1)
2,730 (x1)
2,730 (x1); (B2)
2,730 (x1)
2,048
2,048
2,048
Jan 2005
67,108,864
67,108,863...
33,544,432
33,544,431...
16,777,216
67,108,864...
33,544,432
33,544,431...
22,364,160
22,364,179...
11,182,080
67,108,864
67,108,863
16,777,216
16,777,215
8,388,608
ScF
R = 2N
1
1
213
212
8,192
16,777,216 (224)
211
8,192
8,192
8,192 (213)
8,192 (213)
1
1
1
1
4,096
4,096
33,544,432 (225)
33,544,432 (225)
1/2
1/2
213
213
4,096
16,777,216 (224)
1/2
212
2,730
22,364,160
1/3 (*)
213
2,730
22,364,160
1/3 (*)
213
2,730
11,182,080
1/3 (*)
212
2,048
2,048
16,777,216 (224)
16,777,216 (224)
1/4
1/4
213
213
2,048
8,388,608 (223)
1/4
212
23
Encoder Parameters/Attributes
Customer-specified value
CPR
CMR
(x1)
67,108,864
1,000
(x1)
67,108,863...
1,000
8,192,000
(x1)
(8,192,000-1)...
1,000
4,096,000
(*1)
4,096,000
ScF
R = 2N
1/n (*)
1/n (*)
213
213
1/n (*)
212
Value is not 2N; thus, the scaling factor never gives an integer result.
(B2)
This means that the max. physical position value supported by the encoder also corresponds
with the max. value within the scaled measuring range.
To operate a rotary encoder in 'Continuous Mode' (so-called rotary axis), CMR
must be a multiple (R = 2N) based on parameter 'CPR'. The device automatically
adapts the factor 'R' to the next possible lower value.
Factor R (N = 0,1,...13) is limited to 8192 (max. number of revolutions).
24
Jan 2005
Encoder Parameters/Attributes
6.2
Data Storage
The profile-specific operating parameters of the encoder are generally saved in an EEPROM.
Since, for Profibus DP, the parameter data (DDLM_Set_Prm) is re-transmitted for each start,
there will be only partial storage in the EEPROM.
The following data is stored in the EEPROM.
Parameter
"Offset value"
"Preset value"
Function
Preset button was pressed or the number of the 'Preset value' was
changed via the Protocol, to set a new position value.
Operating mode
Node ID
6.3
Encoder Attributes/Parameters
6.3.1
Fundamental Explanations
The properties (attributes) can be configured via a configuration tool or set to a default value by
the manufacturer.
The values are needed to define the behaviour of the encoder (producing or using process
data). This description only shows the typical (basic) attributes supported by an encoder, without reference to the configuration via the field bus protocol. Further information see (Parameterisation 8.3).
All parameter values with position details must lie within the overall working
area which, at the time, is defined by the CMR value.
If several parameters are changed online, there may be secondary effects.
The user needs to take this into account.
6.3.2
This attribute defines whether ascending or descending position values are output when the encoder shaft rotates clockwise (CW) or counter-clockwise (CCW), looking at the shaft end.
Jan 2005
25
Encoder Parameters/Attributes
6.3.3
If this parameter is set to ON (1), the physical (numerical) position value of the encoder is converted by the software to a scaled value. If the parameter is set to OFF (0), the scaling function is not active.
6.3.4
This parameter defines the number of steps per revolution produced by the encoder. The default factory setting corresponds with the physical resolution per revolution/span.
This value generates an internal scaling factor (ScF) as well as the manufacturer-specific parameter "Physical Resolution per Span" (PRS) according to:
scaling factor (ScF) = [CPR] / [PRS]
6.3.5
This parameter defines the number of steps over the total measuring range produced by the
encoder and corresponds with the scaled measuring range.
Due to the implementation of the Set-up scaling functions (see 6.1.3) this parameter is internally adapted by the system. The adapted value is always smaller
than or the same as the configured value.
6.3.6
Position Value
Current position value. The scaled numerical value is calculated according to the following
equation. If the Scaling Function Control is not activated, the value for ScF is set to one (1); the
value CMR also corresponds with PMR. The offset is determined by the configured preset
value.
Pos_Scal = (Pos_Phy - "Offset value") x ScF + "Preset value"
For the encoder types described, this parameter is used as process data, implemented as a basic part of the input data. -- (see DDLM_Data_Exch).
6.3.7
Preset Value
The preset function supports the adaptation of the datum from the encoder to the mechanical
datum of the system.
For the current mechanical position of the encoder, the preset value is set as the new, current
position value. The preset value and the resulting "offset value" (difference between the current
and the physical position value) are both automatically stored in the EEPROM.
For the encoder types described, this parameter is used as process data, implemented as a basic part of the input data. -- (see DDLM_Data_Exch).
The preset is not matched to the current measuring range if the scaling parameters (CPR, CMR) are changed. A numerical value outside the measuring range is
replaced by the default factory setting zero (0).
26
Jan 2005
Encoder Parameters/Attributes
Constant activation results in the current position value (process data) constantly
and repeatedly being set to the preset value.
Meanwhile, the input data (position value) in the Master Module remains unchanged.
The EEPROM in the encoder can be destroyed by this!
6.4
This part describes the individual data components which the encoder can support. Each of the
data components is allocated a certain processing mode.
Input data is produced by the encoder.
Output data is consumed by the encoder.
The individual data components are combined to a so-called data assembly and selected via
the configuration required.
Overview of the data components - (I: input, O: output)
I-1
I-2
I-3
UDINT
INT
UINT
Encoder profile
Manufacturer-specific
Manufacturer-specific
O-1
UDINT
Encoder profile
6.4.1
Position Value
The scaled numerical value is calculated according to the equation below. If the scaling function
is not active, the value for Scf is set to one (1), and the value CMR corresponds with PMR. The
offset value is stored in the EEPROM and always adapted by activating the preset function.
Pos_Scal = (Pos_Phy - "Offset value") x ScF + "Preset value"
Definition from the position value (4 bytes) with a maximum resolution of 'nn' bits. -- (2**nn).
Byte_1 (MSB)
31 30 29 28 27 26
Byte_2
25 24
Byte_3
23 22 21 20 19 18 17 16
Byte_4 (LSB)
15 14 13 12 11 10 09 08
07 06 05 04 03 02 01 00
Jan 2005
Byte_2
0
Byte_3
1
Byte_4 (LSB)
1
2
81,938D == [00.01.40.12]hex
27
Encoder Parameters/Attributes
6.4.2
Speed Value
The calculation of the speed value is based on the physical position value and is performed in
cycles of 50 ms.
To prevent short-time variations, an integration time of 1 sec. is used. For this, a mean value is
calculated from a data table of the respective last 20 position values. A new position value is entered in the same cycle.
The display format of the current value and limit values (minimum, maximum) are defined as
standard. A change in the general display format causes an adaptation of the limit values.
Overview of the different format settings (depending on the device type).
ATM60-P
ATM90-P
KHK53-P
Display format
RPM
RPM
01METpM (0.1 m/min.)
Changing the display format and limit value is not supported! -- The 'default' values apply!
The speed value is signed. Changes in direction of rotation or changes to the 'counting direction parameter affect the display value.
Example: Seen as INT value (signed 16-bit) in the "Big Endian" data format.
Byte_1
6.4.3
0
1
E
0
7
8
E
F
8
1
Byte_2 (LSB)
0
0
7
0
9
0
9
1
0
0
Format/value
0
RPM
6,000 (max.)
RPM
-6,000 (max.)
01METpM
01METpM
3,600 (max.)
-3,600 (max.)
Time Stamp
2-byte counter for external time measurement. The value is updated in time pulses of 1 ms.
Range of values of { 0...65,535 }, corresponding with 65,535 seconds.
Example: Seen as UINT value (16-bit) in the "Big Endian" data format.
Byte_1
0
F
28
0
F
Byte_2 (LSB)
0
0
F
F
Format/value
0
MS
65,535
Jan 2005
Encoder Parameters/Attributes
6.4.4
Preset Value
Byte_2
25 24
Byte_3
23 22 21 20 19 18 17 16
15 14 13 12 11 10 09 08
Byte_4 (LSB)
07 06 05 04 03 02 01 00
m x x x.x x
To activate the preset value, set bit_31 to one (1) (marked as m). The actual preset value is
predetermined as an nn-bit value. -- (here: 26)
The time needed for a valid activation is determined by the cycle time of the transmission, and
is dependent on the arrangement of all subscribers in the entire network.
After a valid activation of the preset value, the current position value is set to this value (see
display in module of the DP Master).
Disabling the function: - Set bit_31 to zero (0).
Example: Seen as UDINT value (81,938D) in the "Big Endian" data format.
Byte_1 (MSB)
8
0
Byte_1 (MSB)
0
0
Byte_2
0
Byte_3
1
Byte_2
0
Byte_4 (LSB)
1
2
Active
[80.01.40.12]hex
Byte_4 (LSB)
1
2
not active
[00.01.40.12]hex
Byte_3
1
Activation by Bit_31 in the master device can lead to a display format with negative numerical value!
Activation of a new preset value always results in a diagnostic message with low
priority being triggered. This detail is contained in the FDL header of the data exchange response message. The Master can then request a diagnostic message,
to obtain information on the 'offset' value of the encoder!
The preset function is not intended for dynamic adjustment processes. The function is meant for electronic adjustment during commissioning, to allocate a certain
position value to any mechanical shaft position of the encoder. In case of constantly recurring activation of the preset function, the corresponding memory locations in the EEPROM are destroyed, over time!
The use of the preset function leads to a change in the position value output. This
could cause an unexpected movement which may lead to damage of the system,
other objects or bodily harm.
Jan 2005
29
Device Integration/Projecting
Device Integration/Projecting
7.1
System Requirements
To integrate a Profibus DP slave into a system, the following requirements must be met:
Electronic data sheet for the device made available as a GSD/GSE file, by the device
manufacturer.
Class 1 Master module (PLC, PC).
Engineering system (Class 2 master module) with a network configuration tool.
System
Configuration
Configuration
Tool
SPS
Electronic Device
Data Sheets
(GSD-file)
7.2
Description
The GSD alone is sufficient for device integration, for data exchange between field devices and
automation systems. It is used and interpreted in the network configuration tool (CFG-X) a
projecting tool for the master engineering system. - The basic functionality is:
Simple text description of the device properties for DP communication.
30
Jan 2005
Device Integration/Projecting
C FG -X
E ngineering
S ystem
GSD
The configuration tool used produces a so-called parameter set for each subscriber in the network. This data set is stored in a file. This file thus is a logical image of the physical network and
is used by the Master PLC for the correct control of the complete system.
The following data must be configured/confirmed by the user:
Parameter data.
Configuration format for the data exchange (Data_Exchange).
Station address.
On the basis of all implemented subscribers, the configuration tool supplements the data set
with DP protocol-specific data of the complete network.
Using the DP-V0 protocol allows no changes of parameter values during cyclical data traffic.
7.3
According to the GSD specification, numerical values 32 bits in length are defined as "Unsigned32" (UDINT). This data format is not supported by all configuration tools, especially not
by the older ones. See example with COM Profibus V3.3 on the following pages (value mapping for measuring range [steps] and steps per turn).
To support correct parameterisation when using simple configuration tools, the numerical value
is divided into a High word (bits 31_16) and a Low word (bits 15_00).
The two individual values are formed according to the following procedure:
Conversion of the entire numerical value from decimal to hex. format.
-- { byte 1 to byte 4 }.
Conversion of the hex. value byte {1 and 2 } back to decimal. value 1 "....--(31_16)".
Conversion of the hex. value byte {3 and 4 } back to decimal. value 2 "....--(15_00)".
This type of mapping affects the following parameters:
Steps per measuring unit (for rotary encoders: also steps per rev.) -- (CPR).
Steps over the total measuring range (CMR).
Jan 2005
31
Device Integration/Projecting
The following examples show more details:
Whole numerical value (32-bit view)
{ (01.CA x 1.00.00) + 0.11.A0 }
Value 1 ".... --(31_16)"
Value 2 ".... --(15_00)"
Whole numerical value (32-bit view)
{ (00.0C x 1.00.00) + 0.00.00 }
Value 1 ".... --(31_16)"
Value 2 ".... --(15_00)"
01.CA.11.A0 (h)
458 (d)
4512 (d)
1.CA (h)
11.A0 (h)
00.0C.00.00 (h)
12 (d)
0 (d)
00.0C (h)
00.00 (h)
7.4
7.4.1
Module Configuration
32
Jan 2005
Device Integration/Projecting
7.4.2
Code sequence
Class 2 function
Additional diagnostics
Clockwise
Enabled
Enabled
Enabled
Scaling function
Reserved
SSA service
Disabled
DIP switch
Address source
SSA service
Disabled
Address source
Steps per turn - -(31_16)
Steps per turn - -(15_00)
DIP switch
Jan 2005
33
Device Integration/Projecting
7.4.3
Diagnostic functionality
34
Jan 2005
Device Integration/Projecting
For the max. encoder resolution, the factory (default) setting from the GSD file of 100 000 (d)
according to the physical resolution, must be retained.
The original numerical UINT32 value is mapped as a 2 word value.
Value (32-bit view)
{ (00.01 x 1.00.00) + 0.86.A0 }
Value ".... --(31_16)"
Value ".... --(15_00)"
00.01.86.A0 (h)
1 (d)
34 464 (d)
00.01 (h)
86.A0 (h)
Lower device resolutions can be set on request. For this, the measuring step parameter must
be set, within predetermined limits, to higher values.
Resolution (mm/step)
0.1 (default), = max.
1.0
10.0
Measuring step
100 000
1 000 000
10 000 000
For linear encoders, the setting of the Measuring Range parameter bytes 6/7 and 8/9 must
not be changed. A max. range of 224 and 16,777,216 steps, resp., must always be supported /
[01.00.00.00]h.
Within the factory (default) setting for the encoder resolution [Measuring Step parameter], a
measuring range of 1,677 metres max. is supported according to the equation below.
Max. measuring range:
Jan 2005
35
System Configuration
System Configuration
8.1
Master-Slave Communication
With the DP protocol (V0) supported by the encoder, a subscriber (DP slave) behaves according to the following flow diagram scheme (State Machine). The mode of operation of the State
Machine is fully defined in a hardware component (DP controller ASIC).
To start a data exchange with the slave the master must, during run-up, adhere to the following
order of telegrams:
DDLM_Slave_Diag (diagnostic request).
DDLM_Set_Slave_Adr (optional telegram, Master Class 2 only).
DDLM_Set_Prm.
DDLM_Chk_Cfg.
DDLM_Slave_Diag (diagnostic request to ensure initialisation).
DDLM_DATA_EXCH (cyclical data exchange)
Via a diagnostic telegram DDLM_Slave_Diag, the master can request an appropriate diagnosis
from the slave, at any time.
Further services may be activated via "Global Control Command (GCC)" telegrams.
36
Jan 2005
System Configuration
8.2
Stipulations/Definitions
The term "octet", in the Profibus literature (profile definitions), designates a "BYTE" within a
Profibus DP data telegram. The following allocation applies:
Octet
BYTE
8.3
1
0
2
1
3
2
...
...
n
n-1
Parametrisation
In the 'Wait_Param' state, the parameterisation telegram generates an identification with the
master. The number and format of the telegram data result from the definition in the GSD file
and are checked by the slave, through the DP controller and the application software, resp.
The acknowledgement will be a response telegram to the master. The next state within the
'State Machine' is achieved only by recognising a valid telegram.
8.3.1
The DP-specific standard data (octet-1..7) is relevant to all DP slaves. This data is generated by
means of a projecting tool using the GSD file. The telegram data is checked directly in the DP
controller (ASIC) of the slave.
Service DDLM_SET_Prm
Octet
1
2
3
4
5
Type
BYTE
BYTE
BYTE
BYTE
BYTE
BYTE
BYTE
(*n1)
(*n2)
(*n3)
Explanation
DP protocol-specific allocations.
WD_Fact_1
WD_Fact_2
TSDR
Device ID, high byte
-- Device 'Ident_Number' (high)
Device ID, low byte
-- Device 'Ident_Number' (low)
Group ID -- 'Group_Ident' number
Value (default)
(*n1)
(*n1)
(*n2)
(*n3)
(*n3)
Defines the time of the Watchdog timer (10 ms based). The overall time results from:
{ 10 ms x WD_Fact_1 x WD_Fact_2 }.
Earliest slave response time in { TBit }. -- (11 x TBit <--> max. TSDR).
Ident. number of the slaves (2 bytes, allocated by PNO)
Jan 2005
37
System Configuration
8.3.2
Device-Specific Data
Allocation and content of this data (octet-8..n) are predefined via the GSD file and can be
changed by projecting. Format and content are checked after receipt of the complete telegram
by the application software.
Service DDLM_SET_Prm
Octet
8
9
Type
BYTE
BYTE
(p1)
(p1)
10..11
12..13
14..15
16..17
(x1)
(m1)
(m2)
(p1)
(p2)
8.3.3
UINT16
UINT16
UINT16
UINT16
Explanation
Spec_User_Prm_BYTE (x1)
Operating mode
Bit 7
Selection node address source (m1)
Bit 6
Activation of the 'SSA' service (m1)
Bit 5..4 Reserved
Bit 3
Scaling function (ON, OFF).
Bit 2
Commissioning diagnostics control (m2)
Bit 1
Class 2 functionality (ON, OFF).
Bit 0
Code sequence (0: ascending, 1: descending)
Measuring units per rev. (CPR). -- (31-16)
Measuring units per rev. (CPR). -- (15-00)
Total measuring range (CMR). -- (31-16)
Total measuring range (CMR). -- (15-00)
Value (Default)
[00]h
[0E]h
0
0
0
1
1
1
0
[00.00]h
[20.00]h
[20.00]h
[00.00]h
(p2)
(p2)
(p2)
(p2)
Defines the system behaviour of the DP_Controller ASIC. Not adjustable in the config. tool.
Manufacturer-specific function. Not defined in the encoder profile.
Value has no meaning for ATM60-P/ATM90-P rotary encoders. Function is always enabled.
For linear encoders of the KHK53-P type, the function is optionally adjustable (default
setting = enabled (1)) see following pages.
For the ATM90-P, the functions of bit 1 and bit 2 are interchanged.
Device-dependent see below.
Operating Mode
CW
CCW
clockwise ascending
Default setting
counter-clockwise ascending
Setting per telegram is only possible if setting by hardware via DIP switch S1-(8)
is OFF.
The view to determine the counting direction is device-dependent:
For the ATM90-P: looking at the baseplate; for the ATM60-P: looking at the shaft; and for the
KHK53-P: beginning from the first measuring element (X0001).
38
Jan 2005
System Configuration
8.3.3.2 Class 2 Functionality
This attribute controls the Class 2 functionality regarding diagnostic data and operating mode.
0
1
Disable
Enable
Default setting
Mode Class 1 resets any scaling enabled. The encoder then uses the default setting for the scaling parameter.
Disable
Enable
not enabled
enabled
Default setting
OFF
ON
Default setting
OFF
ON
DIP switch
EEPROM
Default setting
A change of the value to "EEPROM" may cause the allocation of a new address
for this subscriber at next power-up. This depends on which value was parameterised before (Set_Slave_Address) and stored in the EEPROM. -- The default
address is "1".
Jan 2005
39
System Configuration
A reset of the address source to "DIP switch[es]" can only be implemented via a
further telegram. If the subscriber address stored in the EEPROM is no longer
known, valid communication with the device cannot be established via the DP
master. -- (see Error Correction 9.4.3.4).
8.3.4
Device
Word_Hi
00.00
00.00
3B.9A
Number of steps over the total measuring range. Represented by 2 words { high, low }.
Min. value (h)
Word_Hi
Word_Lo
00.00
00.01
00.00
00.01
Device
ATM60-P
ATM90-P
KHK53-P
40
Jan 2005
System Configuration
8.4
Configuration
In the 'Wait_Config' state, the configuration telegram defines the format for the cyclical data traffic (I/O data for every network subscriber).
All formats supported by the slave are defined in the GSD file with the keyword "Module". Using
the configuration tool, at least one of these modules must be selected for projecting the device
to be integrated.
According to the encoder profile, the encoder supports the data consistency with a max. of one
(1) module.
The general ID format (specified with '1' byte) is used.
The modules are defined by number and content of the ID formats.
One (1) ID format (byte) per module is specified in the GSD file.
Specification of the general ID format (byte):
Bit 7
Bit 6
Bit 5 | 4
Bit 3...0
The specification only defines the data length (in word and bytes) produced or consumed by a
network subscriber, however not the content of the input/output data. Definition and allocation of
the data assemblies (data components) for the individual modules are based on the application,
and are defined by a profile or by the manufacturer. -- see Data Assemblies (6.4).
Number and content of the transmitted ID formats, and the length of the INPUT/OUTPUT data
resulting from the content, are checked by the slave and acknowledged as positive or negative
responses. The next state within the 'State Machine' is reached only when a valid telegram is
recognised.
The following modules can be selected via the ID format in the Chk_Cfg telegram.
Service DDLM_Chk_Cfg
Module
Assembly
ID format
IN_04
IO_04
1
2
3
4
5
6
IN_06
IO_06
IN_08
IO_08
(c1)
(c1)
(c2)
(c1)
(c2)
(c2)
Value
(hex)
D1
F1
(Default)
D2
F2
D3
F3
Jan 2005
41
System Configuration
8.5
The data is exchanged by means of default SAP in the Profibus telegram header. The master
sends the output data to the slave and receives (if existing) the input data in return. In this
mode, the telegram header consists of 9 bytes. The amount of nett data is limited to 244 bytes
max.
The data telegram to be transmitted between master and slave, is defined in a 'DDLM_Chk_Cfg'
telegram previously initiated by the master.
WORD_1
Byte_1
Byte_2
Output_Data 1
Input_Data 1
WORD_2
Byte_3
Byte_4
Output_Data 2
Input_Data 2
.......
.......
.......
.......
.......
WORD_n
Byte_n-1
Byte_n
Output_Data n (*1)
Input_Data n
8.5.1
The configuration of the 'output data' is reduced, as is the data component 'Preset
value. The content of Word_3, Word_4 remains unused, although the protocol transmits the complete data set.
DDLM_Data_Exchange. Data Assembly (A1). Module IN_04
42
Jan 2005
System Configuration
8.5.3
WORD_3
Byte_5
Byte_6
Speed (I-2)
(Bit 15..8) (Bit 7..0)
Byte_1
Byte_2
WORD_3
Byte_5
Byte_6
Speed (I-2)
(Bit 15..8) (Bit 7..0)
WORD_1
WORD_2
Byte_1
Byte_2
Byte_3
Byte_4
Preset value (O-1)
(Bit
(Bit
(Bit 15..8) (Bit 7..0)
31..24)
23..16)
Byte_1
Byte_2
Byte_3
Byte_4
WORD_3
8.5.5
Byte_1
Byte_2
Jan 2005
WORD_3
Byte_5
Byte_6
Speed (I-2)
(Bit 15..8) (Bit 7..0)
Byte_1
Byte_2
WORD_4
Byte_7
Byte_8
Time stamp (I-3)
(Bit 15..8) (Bit 7..0)
Byte_1
Byte_2
43
System Configuration
8.5.6
WORD_3
Byte_5
Byte_6
Speed (I-2)
(Bit 15..8) (Bit 7..0)
WORD_1
WORD_2
Byte_1
Byte_2
Byte_3
Byte_4
Preset value (O-1)
(Bit
(Bit
(Bit 15..8) (Bit 7..0)
31..24)
23..16)
Byte_1
Byte_2
Byte_3
Byte_4
WORD_3
44
Byte_1
Byte_2
WORD_4
Byte_7
Byte_8
Time stamp (I-3)
(Bit 15..8) (Bit 7..0)
Byte_1
Byte_2
WORD_4
(*1 see 8.5)
Jan 2005
Diagnostic Information
Diagnostic Information
9.1
If the special Profibus diagnostic function is to be used, using a Siematic S7 control program, a
diagnostic address needs to be set.
The special Profibus diagnostic function uses the OB82 component and thus organises the
CPU behaviour of the control. This component is run through once a DP slave makes a diagnostic request (setting or resetting of events). Within the OB82, the complete diagnostic data of
the slave is read out through the SFC13 functional component.
If the OB82 component is not present, and a diagnostic request is received from the slave, the
CPU of the control goes to the operating mode 'STOP'.
Profibus DP offers a comfortable and multi-layered facility for processing diagnostic messages
due to error conditions.
9.2
Diagnostic Messages
Assembly (Ax)
Class
No - (0)
Yes - (1)
Yes - (1)
X
1, 3, 5
2, 4, 6
1
1
2
(*a1)
Length of diagnostic
data
(bytes)
10
10
59 / 63 (*a1)
Jan 2005
45
Diagnostic Information
9.3
Standard Diagnostics
9.3.1
Type
BYTE
BYTE
BYTE
BYTE
BYTE
BYTE
Explanation
Status-1
Status-2
Status-3
Master address
Device ID (device 'Ident_Number') - (high byte)
Device ID (device 'Ident_Number') - (low byte)
(d1)
(d1)
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Master_Lock
Parameter_Fault
Invalid_Slave_Response
Not_Supported
Ext_Diag
Cfg_Fault
Station_Not_Ready
Bit 0
Station_Not_Existent
9.3.2
Value (Default)
Status-2
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Deactivated
Reserved
Synch_Mode
Freeze_Mode
WD_ON
State
Stat_Diag
Bit 0
Prm_Req
(p-1)
If, for the KHK53-P, the Commissioning Diagnostics Control is deactivated (0), the
master is not allerted by the slave to retrieve diagnostic data. The diagnostic data,
however, is ready in the appropriate registers if the master itself wants to collect the
diagnostic data. Further explanations see Sections 9.4.3 to 9.4.3.3.
46
Jan 2005
Diagnostic Information
9.3.3
Status-3
Bit 7
Ext_Diag_Overflow
Bit 6..0 reserved
9.3.4
Master Address
Bit 7..0 Master address after parameter setting. -- Value before parameterisation: [FF]h.
9.4
9.4.1
Octet
7
Type
BYTE
8
9
BYTE
BYTE
Explanation
Diagnostic header -- contains diagnostic data
length
Alarms
Operating state according to the Operating Mode
Bit 7..4 Reserved
Bit 3
Status of the scaling function (On, Off)
Value (Default)
10 / 63
1
1
0
(s1)
Bit 2
Bit 1
Bit 0
10
11..14
BYTE
UINT32
15..16
UINT16
9.4.2
0
1
Diagnostic Header
The header information shows the length of the diagnostic data (including the header byte) in
hex format. Octets 7 to 16 = user diagnostic data.
9.4.3
Alarms
Alarms are triggered when a serious error occurs in the encoder system. The message is deleted when the master has read the complete diagnostic data. The error display, too, will then
no longer be present.
Each correct detail within the supported alarms/additional alarms also triggers the alarm-specific
Commissioning Diagnostics Alarm Bit.
Jan 2005
47
Diagnostic Information
Bit 7..5
Bit 4
Bit 3
Bit 2..1
Bit 0
Not allocated
EEPROM memory error
Commissioning Diagnostics Alarm
Not allocated
Error in the position value
Value '1'
-See detail
Device error
-See detail
The following applies to all alarms and warnings: True logic (value '1' means reference to an error).
9.4.3.1 Commissioning Diagnostics Alarm
Applicable (TRUE) if one of the supported alarms (incl. additional alarms) or warnings displays
an error.
This error leads to the provision of external diagnostic data 'Ext_Diag'. See DP Standard Diagnostic Status-1 (0).
9.4.3.2 EEPROM Memory Error
An EEPROM error which is found through reading out the general encoder parameters, when
the encoder is used again following power-off.
9.4.3.3 Error in the Position Value
There can be different reasons for this error message:
EEPROM error which is found during reading operations of encoder parameters relating to
position (e.g. when reading out the EEPROM after switching the encoder off and on again).
The correct position cannot be determined using the algorithm for position calculation, because the scanner in the encoder supplies no valid signals.
The distance between 'reading head and 'material measure is outside the permitted position tolerance (for linear encoders).
This error triggers a 'Stat_Diag'. See DP Standard Diagnostic Status-2 (0).
The DP communication is in the Data_Exchange mode; the encoder, however, provides no valid
data. The red LED is illuminated.
This state continues for as long as the existing cause of error is present.
9.4.3.4 Error Correction Measures
These measures only lead to a result when the EEPROM data is inconsistent. For this, the
EEPROM content must be re-configured to the factory setting (default values).
Turn off operating voltage.
Set node (device) address to zero (0) (DIP switch).
Turn operating voltage back on, keeping the preset pushbutton (under the screw cap of the
connection adapter) pressed for 2 seconds approx.
Wait for about 10 seconds. The EEPROM is now re-configured.
Turn off operating voltage and re-set to original node address.
Turn operating voltage back on and check the device for faulty behaviour.
48
Jan 2005
Diagnostic Information
9.4.4
Operating Status
9.4.5
If, during configuration, the diagnostic control of the Operating Mode for the linear
encoder KHK53-P was disabled {(0) set} then, in case of a position error, the master is not allerted by the slave to retrieve a diagnostic data set. Thus, the control
(PLC) remains in a trouble-free state.
However, the diagnostic data is formed, ready in the slaves corresponding output
registers, and could be retrieved at the DP masters request (until the fault condition for the position error no longer exists).
A position error can, for instance, be triggered by briefly exceeding the positional
tolerance (excessive distance between measuring element and reading head). A
fault message at the control, due to this event, is however not always wanted.
Device Identification
Ident_Number (hex)
59.52
00.FE
05.F6
Encoder type
1 (rotary, absolute)
1 (rotary, absolute)
2 (linear, absolute)
For rotary encoders, the parameter shows the max. number of measuring steps per revolution.
The ATM60-P supports a resolution of { 8,192 } steps/rev.
The ATM90-P supports a resolution of { 2,048, 4,096 or 8,192 }
steps/rev.
For linear encoders, this parameter shows the smallest measuring step supported by the encoder (max. physical resolution), which is given in nanometres (nm).
The KHK53-P supports a resolution of 0.1 mm. This corresponds to the value
100,000.
9.4.7
For rotary encoders, this parameter shows the max. number of revolutions which can be distinguished.
The ATM60-P supports a resolution of { 8,192 } revolutions.
The ATM90-P supports a resolution of { 2,048, 4,096 or 8,192 } revolutions.
This parameter is irrelevant to linear encoders -- Display [FF.FF](h).
Jan 2005
49
Diagnostic Information
9.5
9.5.1
Octet
7
8...16
Type
BYTE
17
18..19
20..21
22..23
24..25
26..27
28..31
32..35
36..39
40..43
BYTE
UINT16
UINT16
UINT16
UINT16
UINT16
UINT32
UINT32
UINT32
UINT32
44..47
UINT32
48..57
58..59
ASCII
60
61
62..63
BYTE
BYTE
UINT16
9.5.2
Explanation
Diagnostic header (data length)
-- see Class 1 diagnostic data (9.4.1 ff) -Additional alarms
Supported alarms
Warnings
Supported warnings
Profile version
Software version
Operating time is not supported
Offset value
Manufacturers offset value is not supported
Counts per Revolution (steps per rev.) Customerspecified. Measuring units/rev.
Steps (number of counts) over the total Measuring
Range -- (CMR)
Serial number 10 characters
-- reserved --- manufacturer-specific -Station address stored in the EEPROM
Encoder status, acc. to 'Operating Mode
DP controller status
Value (Default)
63
0
00.19 hex
00.01 hex
01.10 hex
01.01 hex
FF.FF.FF.FF hex
0
0
1
Diagnostic Header
The header information shows the length of the diagnostic data (including the header byte) in
hex format. Octets 7 to 63 = user diagnostic data.
9.5.3
Additional Alarms
50
--
Jan 2005
Diagnostic Information
9.5.4
Supported Alarms
The settings control the display behaviour of the parameters 'Additional Alarms' and 'Alarms'.
Bit 15..8
Bit 7..0
Bit 7..5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
9.5.5
--Yes
Yes
--Yes
Warnings
Warnings show that non-significant parameters of the encoder system are outside the tolerance. Contrary to the alarms, warnings do not state that there are incorrect position values.
The display is deleted after the master has read complete diagnostic data set and the triggering
error signal no longer exists.
Each true display within the supported warnings triggers an alarm-specific bit (Commissioning
Diagnostics Alarm). -- see (Alarms 9.4.3).
Bit 15..7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
9.5.6
Supported Warnings
Jan 2005
-------Yes
51
Diagnostic Information
9.5.7
Profile Version
Shows the implemented encoder profile version (1.10), divided into two numbers.
Octet 24
Revision number
01hex
9.5.8
Octet 25
Index number
10hex
Software Version
Shows the implemented encoder software version (rr.nn), divided into two numbers.
Octet 26
Revision Number
rrhex
9.5.9
Octet 27
Index Number
nnhex
Operating Time
Gives the number of hours that the encoder was in operation since first commissioning or since
last power-up. The value is shown as units of [0.1 hours].
The function is not supported. Display value FF.FF.FF.FF hex..
9.5.10 Offset Value
The offset value is calculated by the PRESET function and displaces the actual position value
by the value calculated. The offset value is automatically stored in the EEPROM, after each
operation, either by the PRESET pushbutton or by setting the preset value via the protocol.
9.5.11 Counts per Revolution -- [CPR]
This scaling parameter shows the number of configured, distinguishable steps per revolution.
The factory setting (default) corresponds with the physical resolution per span.
For rotary encoders the value range (hex) is specified as:
Octet 40
00
00
Octet 41
00
00
Octet 42
00
20
Octet 43
01
00
min.
max.
For linear encoders this parameter shows the measuring step (= physical resolution to which
the encoder is configured) in nanometres (nm). -- (see also 8.3.4).
Based on the max. physical resolution of 0.1 mm, which the KHK53-P supports, the resolution
can be reduced by increasing the 'measuring step value.
Specification of the data range (hex):
52
Octet 40
00
00
Octet 41
01
0F
Octet 42
86
42
Octet 43
A0
40
0.1 mm
1. 0 mm
3B
9A
CA
00
1.0 m
Jan 2005
Diagnostic Information
9.5.12 Number of counts per Measuring Range -- [CMR]
This scaling parameter shows the number of distinguishable steps over the total measuring
range and corresponds with the scaled measuring range.
For rotary encoders the data range (hex) is specified for:
Octet 44
00
04
Octet 45
00
00
Octet 46
00
00
Octet 47
01
00
min.
max.
The linear encoder KHK53-P always supports a max. range of 16,777,216 steps. This corresponds with a resolution of 2**24 or [01.00.00.00] in hex format.
9.5.13 Serial Number
The encoder serial number is given as an ASCII string with ten (10) characters. If the number is
not used, the string only contains asterisks (*) --- hex code: [2A].
9.6
This part is contained in the Class 2 diagnostics (table 9.5.1 from entry manufacturer-specific)
as an extension of 4 bytes.
9.6.1
Station Address
Gives the device address number (station or device address number) which is stored in the
EEPROM and must not match with the setting shown for the external DIP switches.
9.6.2
Encoder Status
Displays the encoder status. Bit no. 0-3 corresponds with the parameter value 'Operating
Mode. The remaining bits are used for internal settings.
The value is different for the individual encoder types and corresponds with few
exceptions to diagnostic octet 9 (operating status).
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2 (m1)
Bit 1 (m1)
Bit 0
(m1)
The ATM90-P provides these bits swapped, according to the Set_Param telegram.
Jan 2005
53
Diagnostic Information
9.6.3
DP Controller Status
Identifies the general status of the implemented DP controller (SPC3 Asic Register #04,05).
Further details see Controller Manual. The figures below result from the normal operating state
of the controller.
Allocation for the rotary encoders ATM60-P, ATM90-P.
Bit 15..12
Bit 11..8
Bit 7..6
Bit 5..4
Bit 3..0
10
10
0101
00
10
10
0101
54
(0)
(1)
(2)
(3)
(4)
(5)
(6)
(7)
(8)
(9)
12 MBaud
6 MBaud
3 MBaud
1.5 MBaud
500.0 kBaud
187.5 kBaud
93.75 kBaud
45.45 kBaud
19.20 kBaud
invalid
Jan 2005
10
10.1
Mounting
10.2
Screening
Jan 2005
55
Strip sheathing
56
Jan 2005
Jan 2005
57
10.3
X1
X1
1
2
3
4
5
6
7
8
9
Signal
US (24V)
GND
B
A
B
A
2P5
2M
RTS
Description
Operating voltage 10-32 V
0 V (Gnd)
B line Profibus DP (out)
A line Profibus DP (out)
B line Profibus DP (in)
A line Profibus DP (in)
+5 V (potential separated)
0 V (potential separated)
Request to Send (2)
(1)
(1)
Figure 103: Pinout ATM 60 with Bus Link Adapter Cable Fitting.
(1)
(2)
58
Jan 2005
US
3
Profibus DP (OUT)
3
4
5
5
1
Profibus DP (IN)
1
2
3
4
5
Signal
nc
A
nc
B
Screen
1
2
3
4
Signal
US (24V)
nc
GND
nc
Description
Operating voltage (10-32) V
1
2
3
4
5
Signal
2P5
A
2M
B
Screen
Description
+5 V (potential separated) (1)
A line Profibus DP
0 V (potential separated) (1)
B line Profibus DP
Housing potential
US
Profibus DP (OUT)
Description
A line Profibus DP
B line Profibus DP
Housing potential
0 V (ground)
Figure 104: Pinout ATM 60 Direct with Bus Link Adapter Screw-in System M12.
(1)
Jan 2005
59
Signal
US (24V)
GND
B
A
B
A
2P5
2M
RTS
Description
Operating voltage 10-32 V
0 V (Gnd)
B line Profibus DP (out)
A line Profibus DP (out)
B line Profibus DP (in)
A line Profibus DP (in)
+5 V (potential separated) (1)
0 V (potential separated) (1)
Request to Send (2)
(2)
60
Jan 2005
US
Signal
RTS
A
nc
B
2M
2P5
US
Signal
US (24V )
GND
RTS
nc
5
4
1
3
5
2/4/6
/7
5
4
Description
Request to Send (2)
A line Profibus DP
B line Profibus DP
0 V (potential separated) (1)
+5 V (potential separated) (1)
Description
Operating voltage (10-32) V
0 V (Gnd)
Request to Send (2)
Figure 106: Pinout ATM 90 Direct with Screw-in System M14 without Bus Link
Adapter.
(1)
(2)
Jan 2005
61
Signal
US (24V)
GND
B
A
B
A
2P5
2M
RTS
Description
Operating voltage 10-32 V
0 V (Gnd)
B line ProfiBus DP (out)
A line ProfiBus DP (out)
B line ProfiBus DP (in)
A line ProfiBus DP (in)
+5 V (potential separated) (1)
0 V (potential separated) (1)
Request to Send (2)
Figure 107: Pinout Linear Encoder KHK53 with Bus Link Adapter
(1)
(2)
10.4
62
Jan 2005
LED-1
S3
1 2 3 4 5 6 7 8
S2
S 1 (7-1)
S 1 (8-8)
S2
Bus termination
S3
S1
Status information
OFF ON
LED-1
LED-2
Figure 108: Device Handling in the Network 'ATM 60' (DIP Switch in the Bus Link
Adapter).
Switch settings
8
2
S2
7
6
5
S3
S1
S 1 (7-1)
S 1 (8-8)
S2
Bus termination
S3
3
2
1
OFF ON
LED-1
Status information
LED-2
LED-1
LED-2
Figure 109: Device Handling in the Network 'ATM 90' (Aperture for DIP Switch in the
Encoder).
In the version with a bus link adapter (ATM 90), the switches S1 and S2 are also inside the bus
link adapter.
Jan 2005
63
S2
S1
1 2
1 2 3 4 5 6 7 8
S 1 (7-1)
S 1 (8-8)
S2
Bus termination
ON
OFF
Status information
Front Side
LED-1
LED-2
LED-1
LED-2
Figure 1010: Device Handling in the Network 'KHK53' (DIP Switch in the Bus Link
Adapter).
DIP-6
25
0
0
...
1
1
DIP-5
24
0
0
...
1
1
DIP-4
23
0
0
...
1
1
DIP-3
22
0
0
...
1
1
DIP-2
21
0
0
...
1
1
DIP-1
20 (lsb)
0
1
...
0
1
Address
0
1
...
126
127
ON
OFF
DIP
64
Jan 2005
Address table
decimal
binary
decimal
binary
decimal
binary
decimal
binary
0000000
32
0100000
64
1000000
96
1100000
0000001
33
0100001
65
1000001
97
1100001
0000010
34
0100010
66
1000010
98
1100010
0000011
35
0100011
67
1000011
99
1100011
0000100
36
0100100
68
1000100
100
1100100
0000101
37
0100101
69
1000101
101
1100101
0000110
38
0100110
70
1000110
102
1100110
0000111
39
0100111
71
1000111
103
1100111
0001000
40
0101000
72
1001000
104
1101000
0001001
41
0101001
73
1001001
105
1101001
10
0001010
42
0101010
74
1001010
106
1101010
11
0001011
43
0101011
75
1001011
107
1101011
12
0001100
44
0101100
76
1001100
108
1101100
13
0001101
45
0101101
77
1001101
109
1101101
14
0001110
46
0101110
78
1001110
110
1101110
15
0001111
47
0101111
79
1001111
111
1101111
16
0010000
48
0110000
80
1010000
112
1110000
17
0010001
49
0110001
81
1010001
113
1110001
18
0010010
50
0110010
82
1010010
114
1110010
19
0010011
51
0110011
83
1010011
115
1110011
20
0010100
52
0110100
84
1010100
116
1110100
21
0010101
53
0110101
85
1010101
117
1110101
22
0010110
54
0110110
86
1010110
118
1110110
23
0010111
55
0110111
87
1010111
119
1110111
24
0011000
56
0111000
88
1011000
120
1111000
25
0011001
57
0111001
89
1011001
121
1111001
26
0011010
58
0111010
90
1011010
122
1111010
27
0011011
59
0111011
91
1011011
123
1111011
28
0011100
60
0111100
92
1011100
124
1111100
29
0011101
61
0111101
93
1011101
125
1111101
30
0011110
62
0111110
94
1011110
126
1111110
31
0011111
63
0111111
95
1011111
127
1111111
Jan 2005
65
CW
CCW
ascending
descending
The setting 'ON' always has priority over the setting via software. Only the DIP
switch setting 'OFF' permits a change by telegram.
The view for determining the counting direction is device-dependent:
The preset function is not intended for dynamic adjustment processes. The function is meant for electronic adjustment during commissioning, to allocate a certain
position value to any mechanical shaft position of the encoder. In case of constantly recurring activation of the preset function, the corresponding memory locations in the EEPROM are destroyed, with time lapsing!
The use of the preset function leads to a change in the position value output by
the encoder. This could cause an unexpected movement which may lead to
damage of the system, other objects or bodily harm.
66
Jan 2005
10.5
Status/Display Information
Bus activity
(C-1)
Jan 2005
Zustand
OFF
Erklrung
Device is not or not sufficiently supplied with voltage.
ON
OFF
ON
Valid data communication only means that master and slave can communicate with
one another via telegrams. It does not mean that the data within the remote telegrams is also correct --- e.g. incorrect position value, incorrect offset, ... .
67
Technical Description
11
Technical Description
11.1
The absolute rotary encoders ATM 60-P/ATM 90-P have a total resolution of 26 bits. The singleturn position value is transmitted with 13 bits (8192 steps/rev.). The number of revolutions in the
multi-turn range also is 13 bits (8192 rev.). The revolutions are determined via a gearbox
mechanism.
The Profibus DP interface is an integral part of the encoder. The encoder is configured as a
slave, with cyclical data transmission mode (DP-V0).
The encoder functionality is implemented by the profile for encoders.
11.2
The KHK53-P is a real absolute length measuring system with a resolution of 100 m and supports a measuring length of up to 1700 m.
A non-contact reading head determines the absolute position from a series of scale sections
(material measures) fitted along the measurement path.
The reading head itself consists of a number of magnetoresistive sensors, which can always
evaluate the position of at least three permanent magnets (fitted inside the material measure
elements) to always determine from their coded relative distances the absolute position.
The material measure elements are made from an aluminium sections. These are mounted at
fixed intervals in a row, using a mounting aid, until the required measuring length is achieved.
The reading head moves parallel along the material measure elements.
The distance between the reading head and a material measure is nominally 25 mm .
The Profibus DP interface is an integral part of the encoder. The encoder is configured as a
slave, with cyclical data transmission mode (DP-V0).
The encoder functionality is implemented by the profile for encoders.
11.3
68
Jan 2005
Technical Description
11.4
Profibus DP interface
Electrical interface
RS485 according to EN 50170-2 (DIN 19245, 1-3),
DC isolated via opto-coupler[s].
Protocol
Profibus DP, with 'profile for encoders' (07hex)
Address setting (node number)
0...127
Address setting (node number)
Data transmission rate (baud rate)
9.6 kBaud - 12 MBaud Data transmission rate (baud
rate)
Electronic adjustment
Via PRESET pushbutton or protocol
Status information
Operating voltage (green), bus activity (red).
Bus termination
Via DIP switch. -- (for terminal only).
(1)
Electrical connection
PG-9 or metric cable fitting (3x).
(2)
M14 screw-in system (3x).
(3)
M12 screw-in system (3x)
(1)
(2)
(3)
Jan 2005
69
Technical Description
List of Figures
Figure 41: Protocol Architecture ...........................................................................................................................14
Figure 42: Master/Slave Principle of the SRD Service..........................................................................................15
Figure 43: Topology of Profibus DP......................................................................................................................17
Figure 45: Cabling (9-Pin D-Sub Connector) and Bus Termination. .....................................................................18
Figure 71: Device Integration................................................................................................................................30
Figure 72: GSD Implementation ...........................................................................................................................31
Figure 73: Module Configuration...........................................................................................................................32
Figure 74: Parameter Data Operating Mode......................................................................................................33
Figure 75: Parameter Data Scaling....................................................................................................................33
Figure 76: Parameter Data Operating Mode......................................................................................................34
Figure 77: Parameter Data Scaling....................................................................................................................34
Figure 81: DP State Machine................................................................................................................................36
Figure 101: Screen Connection at the Bus Link Adapter with Cable ATM60-P/ATM90-P/ KHK53-P. ..................56
Figure 102: Screen Connection with Screw-in System ATM90-P. ........................................................................57
Figure 103: Pinout ATM 60 with Bus Link Adapter Cable Fitting. ......................................................................58
Figure 104: Pinout ATM 60 Direct with Bus Link Adapter Screw-in System M12. .............................................59
Figure 105: Pinout ATM 90 with Bus Link Adapter. ..............................................................................................60
Figure 106: Pinout ATM 90 Direct with Screw-in System M14 without Bus Link Adapter. .................................61
Figure 107: Pinout Linear Encoder KHK53 with Bus Link Adapter .......................................................................62
Figure 108: Device Handling in the Network 'ATM 60' (DIP Switch in the Bus Link Adapter). ..............................63
Figure 109: Device Handling in the Network 'ATM 90' (Aperture for DIP Switch in the Encoder). ........................63
Figure 1010: Device Handling in the Network 'KHK53' (DIP Switch in the Bus Link Adapter). .............................64
Figure 1011: DIP Switch S1 Setting......................................................................................................................64
70
Jan 2005
Technical Description
Notes
Jan 2005
71
915 040 103 526/Issue: Jan. 2005 Index: Printed in Germany Subject to change without prior notice The specified product features and technical data do not represent any guarantee 01 A4Stg 2c int22
Contact:
Australia
Phone +61 3 9497 4100
1800 33 48 02 tollfree
E-Mail [email protected]
Belg ium/ Luxemb ourg
Phone +32 (0)2 466 55 66
E-Mail [email protected]
Brasil
Phone +55 11 5091-4900
E-Mail [email protected]
Cesk Republika
Phone +420 2 57 91 18 50
E-Mail [email protected]
China
Phone +852-2763 6966
E-Mail [email protected]
Danmark
Phone +45 45 82 64 00
E-Mail [email protected]
Deutschland
Phone +49 (0)2 11 53 01-250
E-Mail [email protected]
Espaa
Phone +34 93 480 31 00
E-Mail [email protected]
France
Phone +33 1 64 62 35 00
E-Mail [email protected]
Great Brit ain
Phone +44 (0)1727 831121
E-Mail [email protected]
India
Phone +91 (11) 2696 7651
E-Mail [email protected]
It alia
Phone +39 011 79 79 65
E-Mail [email protected]
Japan
Phone +81 (0)3 3358 1341
E-Mail [email protected]
Korea
Phone +82-2 786 6321/4
E-Mail [email protected]
Ne derlands
Phone +31 (0)30 229 25 44
E-Mail [email protected]
Norge
Phone +47 67 81 50 00
E-Mail [email protected]
sterreich
Phone +43 (0)22 36 62 28 8-0
E-Mail [email protected]
Polska
Phone +48 22 837 40 50
E-Mail [email protected]
Republika Slowenija
Phone +386 (0)1-47 69 990
E-Mail [email protected]
Russia
Phone +7 95 775 05 30
E-Mail [email protected]
Schweiz
Phone +41 41 619 29 39
E-Mail [email protected]
Singapore
Phone +65 6744 3732
E-Mail [email protected]
Suomi
Phone +358-9-25 15 800
E-Mail [email protected]
Sverige
Phone +46 8 680 64 50
E-Mail [email protected]
Trkiye
Phone +90 216 388 95 90 pbx
E-Mail [email protected]
Ta i w a n
Phone +886 2 2365-6292
E-Mail [email protected]
U SA
Phone +1 937-454-1956
E-Mail [email protected]