Documente Academic
Documente Profesional
Documente Cultură
Digital drive systems and feedback loops with position encoders for measured value acquisition require fast data transfer with high
transmission reliability from the encoders. Further data such as drive-specific parameters, compensation tables, etc. must also be
made available. For high system reliability, the encoders must be integrated in routines for error detection and have diagnostic
capabilities.
The EnDat interface from HEIDENHAIN is a digital, bidirectional interface for encoders. It is capable both of transmitting position values
from incremental and absolute encoders as well as transmitting or updating information stored in the encoder, or saving new information.
Thanks to the serial transmission method, only four signal lines are required. The data are transmitted in synchronism with the clock signal
from the subsequent electronics. The type of transmission (position values, parameters, diagnostics, etc.) is selected by mode commands
that the subsequent electronics send to the encoder. The EnDat 2.2 interface, a purely serial interface, is also suited for safety-related
applications up to SIL 3.
Benefits of the EnDat interface
DR. JOHANNES HEIDENHAIN GmbH • Only one cable with HMC 6: the Hybrid Safety system
develops and manufactures linear and Motor Cable contains the lines for the • EnDat 2.2 was conceived for safety-
angle encoders as well as rotary encoders encoder, the motor and the brake related machine designs up to SIL 3
with EnDat interface in a large range of • Small motor or system dimensions • Two independent position values for
variants for a wide range of applications. through compact connecting elements error detection
HEIDENHAIN products are used in high- • No cost for additional sensors and wiring: • Two independent error messages
precision machine tools as well as in plants EnDat 2.2 transmits additional data (limit • Checksums and acknowledgments
for the production and processing of switch, temperature, etc.) • Forced dynamic sampling of error
electronic components. • Faster configuration during installation: messages and CRC formation by
Datum shifting through offsetting by a subsequent electronics
The EnDat interface provides everything value in the encoder
needed to reduce system cost and at the Support for state-of-the-art machine
same time improve your technical standard. Improved quality designs
Extensive diagnostic possibilities, the • Higher system accuracy through specific • Suitable for direct drive technology
support of safety strategies and the capability optimization in the encoder thanks to high resolution, short cycle
of storing operating and plant conditions in • High contouring accuracy, especially for times and commutation information
the encoder support state-of-the-art CNC machine tools: Position value • Cyclic sampling every 25 µs with full
machine designs and ensure high quality formation in the encoder enables shorter “read and write” mode
and availability. cycle times without affecting the • Position values available in the subsequent
computing time of the CNC electronics after only approx. 10 µs
Cost optimization • Online diagnostics allow planning of
• A single interface for all absolute and Higher availability machine operation and support the
incremental encoders • Automatic commissioning of the system service technician on site
• Simple subsequent electronics with axis possible: all necessary information • Plant and operating statuses can be
EnDat receiver chip and standard can be stored in the encoder (electronic stored in the encoder
components ID label)
• Simpler, more economical voltage • High system reliability through purely
supply, since remote sensing is not digital data transmission
required • Diagnostics of the encoders through
• Simple connection technology: standard monitoring messages and warnings that
plug connections (M12, 8-pin), simple can be evaluated in the subsequent
shielded standard cables and low wiring electronics
complexity • High transmission reliability through
cyclic redundancy checking
Miniature connecting
element, M12, 8-pin
Connecting element,
e.g. M12, D-sub
Further information:
For further information on implementing
EnDat or additional documents, see
www.endat.de
2
– The bidirectional interface
3
Clock frequency
The clock frequency is variable between
Cable length in m
100 kHz and 2 MHz, depending on the cable
length (max. 150 m). With propagation-delay
compensation in the subsequent electronics,
either clock frequencies up to 16 MHz are
possible or cable lengths up to 100 m. For
EnDat encoders with order designation
EnDat x2, the maximum clock frequency is
stored in the encoder memory. For all other
encoders, the maximum clock frequency
is 2 MHz. Propagation-delay compensation
is provided only for order designations Clock frequency in kHz
EnDat 21 and EnDat 22; for EnDat 02, see EnDat 2.1; EnDat 2.2 without propagation-delay compensation
the note below. EnDat 2.2 with propagation delay compensation (by the EnDat master)
EnDat01 2 MHz (see diagram Under certain conditions, cable lengths up to 300 m are possible after consultation with HEIDENHAIN
EnDatT titled “Without delay
EnDatH compensation”)
EnDat21 2 MHz
Position values Additional data
EnDat02 2 MHz or The position value can be transmitted with or Depending on the type of transmission
8 MHz or 16 MHz without additional data. It is not transmitted (selection via MRS code), one or two
(see note) to the subsequent electronics until after additional data can be appended to the
the calculation time tcal has passed. The position value. The additional data supported
EnDat22 8 MHz or 16 MHz computing time is determined for the highest by the respective encoder are saved in the
clock frequency allowed for the encoder, encoder parameters.
but at maximum 8 MHz. The additional data includes:
Transmission frequencies up to 16 MHz in
combination with large cable lengths place Only the required number of bits is Status information, addresses and data
high technological demands on the cable. transferred for the position value. The bit • WRN – warnings
The adapter cable connected directly to the number depends on the respective • RM – reference mark
encoder must not be longer than 20 m for encoder and can be read out from the • Busy – parameter request
reasons of transmission technology. encoder for automatic parameterization.
Greater cable lengths can be realized with Additional data 1
an adapter cable no longer than 6 m and Typical operating modes • Diagnostics
an extension cable. As a rule, the entire Operating mode EnDat 2.1: This mode is • Position value 2
transmission path must be designed for for encoders that provide additional • Memory parameters
the respective clock frequency. incremental signals. The absolute position • MRS-code acknowledgment
is read out once simultaneously with the • Test values
incremental position and both are used to • Temperature
Note on EnDat02 calculate the position value. Otherwise, the • Additional sensors
EnDat02 encoders can feature a pluggable position value in the control loop is formed
cable assembly. In choosing the version on the basis of the incremental signals. Additional data 2
of the adapter cable, the customer also Only EnDat 2.1 mode commands are used. • Commutation
decides whether the encoder will be • Acceleration
operated with incremental signals or without Operating mode EnDat 2.2: This mode is • Limit position signals
them. This also affects the maximum for purely serial encoders. The position • Asynchronous position value
possible clock frequency. For adapter value is read out from the encoder in each • Operating status error sources
cables with incremental signals, the clock control cycle. EnDat 2.2 mode commands • Timestamp
frequency is limited to 2 MHz; see also are typically used to read out the position
EnDat01. For adapter cables without value. EnDat 2.1 mode commands are
incremental signals the clock frequency typically used to read and write parameters
can be up to 16 MHz. The exact values are after switch-on.
stored in the encoder’s memory.
In the EnDat 2.2 interface, additional data
can be requested in the closed control loop
in addition to the position, and functions
can be executed (for example, read/write
parameters, reset error messages, etc.).
4
Memory areas Absolute encoder Subsequent electronics
The encoder provides several memory
areas for parameters. These can be read Incremental 1 VPP A*)
signals *)
from by the subsequent electronics, and »PP B*)
EnDat interface
some can be written to by the encoder
manufacturer, the OEM, or even the end
user. The parameter data are stored in a
permanent memory. This memory allows Absolute
only a limited number of write accesses position value
and is not designed for the cyclic storage
of data. Certain storage areas can be
secured with a write-protect (resettable
only by the encoder manufacturer). Parameters of the encoder
Operating Operating Parameters manufacturer for *) Depending on
parameters status of the OEM device
Parameters are saved in various memory EnDat 2.1 EnDat 2.2
areas, e.g.:
• Encoder-specific information
• Information of the OEM (e.g. “electronic Functional safety—basic principle
ID label” of the motor) EnDat 2.2 strictly supports the use of
• Operating parameters (datum shift, encoders in safety-related applications. The
instruction, etc.) standards DIN EN ISO 13 849-1 (successor
• Operating status (alarms or warnings) to EN 954-1) as well as EN 61 508 and
EN 61 800-5-2 are used as basis. These
Monitoring and diagnostic functions standards describe the assessment of
of the EnDat interface make a detailed safety-related systems, for example based
inspection of the encoder possible. on the failure probabilities of integrated
• Error messages components and subsystems. The modular
• Warnings approach helps manufacturers of safety-
• Online diagnostics based on valuation related systems to implement their complete
numbers (EnDat 2.2) systems, because they can begin with
• Mounting interface prequalified subsystems.
Further information:
“Functional Safety” under www.endat.de
Z0 = 120
Incremental signals
Depending on the
encoder (e.g. 1 VPP)
1 VPP
Further information:
FAQ: RS-485 Transceiver at www.endat.de
5
Data transfer
Cable length in m
the clock signal is on high level.
6
Selecting the transmission type
Transmitted data are identified as either For EnDat-2.1 and EnDat-2.2 mode
position values, position values with commands, encoders sometimes show
additional data, or parameters. The type of different processing times for position
information to be transmitted is selected values tcal (see the brochure Linear Encoders
by mode commands. Mode commands for Numerically Controlled Machine Tools –
define the content of the transmitted Specifications). If the incremental signals
information. Every mode command consists are evaluated for axis control, then the
of three bits. To ensure reliable transmission, EnDat 2.1 mode commands should be used.
every bit is transmitted redundantly Only in this manner can an active error
(inverted or double). If the encoder detects message be transmitted synchronously
an incorrect mode transmission, it transmits with the currently requested position value.
an error message. The EnDat 2.2 interface EnDat 2.1 mode commands should not
can also transfer parameter values in the be used for purely serial position-value
additional data together with the position transfer for axis control.
value. This makes the current position
values constantly available for the control
loop, even during a parameter request.
Mode bit
7
Position values
With the end of the data word, the clock Pulse width tHI 0.2 µs to 10 µs Pulse width fluctuation
must be set to HIGH. After 10 to 30 µs or HIGH to LOW max. 10 %
1.25 to 3.75 µs (with EnDat 2.2, the tLO 0.2 ms to 50 ms
assignable recovery time tm) the data line Up to 30 µs
falls back to LOW. Then a new data (with LC 1x3/4x3)
transmission can be initiated by starting
the clock.
8
Data packet with position value and additional data 1 and 2
Encoder saves
position value
Subsequent electronics
transmit mode command
Mode command Position value CRC Additional datum 2 CRC Additional datum 1 CRC
Error messages 1 and 2 Position value are assignable to each of the additional
The EnDat interface enables comprehensive The position value is transmitted as a data 1 and 2. These numbers are used to
monitoring of the encoder without requiring complete data word whose length select the additional data and are transmitted
an additional transmission line. An error depends on the resolution of the encoder. for acknowledgment (see next page). The
message becomes active if a malfunction Transmission begins with the LSB (LSB additional data supported by the encoder is
of the encoder might result in incorrect first). saved in the encoder memory.
position values. At the same time, the cause
of error is saved in the encoder. The composition of the position value The “Encoder transmit position value and
differs depending on the encoder model receive selection of memory area” mode
Errors include: (see EnDat specifications). At this point, command selects the information to be
• Light unit failure absolute encoders transmit the absolute transmitted, which is therefore possible in a
• Signal amplitude too low position value while incremental encoders closed loop. After the additional datum has
• Incorrect position value transmit the relative position value (see been selected, it is transmitted with the
• Power supply too high/low also “Position value 2” on the following next mode command (only numbers 8 to 13).
• Current consumption is excessive page). The additional datum is transmitted with
each position value until it is deselected
For reasons of security it is necessary to Additional data through the transmission of a special
generate a second, independently acquired An encoder with EnDat 2.2 interface can MRS code or until another additional datum
error message. It is transmitted with the transmit the position value together with is selected. When the encoder is switched
inverted value as error message 2. The up to two additional data. Sixteen possible on, at first no additional data is selected.
two error messages must be evaluated contents identified by unique numbers
separately from each other.
Example
Additional datum 1:
Rolling transmission of temperature 1 (Temp1: MRS code 0x4C) and
temperature 2 (Temp2: MRS code 0x4D)
Additional datum 1: Transmission of the operating status error sources (BZFQ: MRS code 0x59)
Mode command 9 (001001): “Encoder transmit position value and receive selection of memory area”
9
Additional data
30 bits
Depending on the type of transmission
(selection via MRS code), one or two
additional data can be appended to the Additional data 5 bits
position value. The additional data are each CRC
30 bits in length, with a LOW level as first bit.
Each additional datum is concluded with a
CRC that is formed from the respective
additional data without the first bit or the CRC.
Acknowledgment of
The additional data supported by the additional data 8 bits 8 bits data
respective encoder are saved in the encoder address or
parameters. data
10
Parameters
Memory areas
EnDat interface
protected.
Addressing
Block diagram of absolute encoder with EnDat 2.2 interface
Before transmission of parameters (reading
or writing), the corresponding memory range
must be selected. One or more “MRS
codes” are therefore assigned to the
respective memory areas (MRS Memory
Range Select).
Parameters of the encoder manufacturer Parameters of the OEM encoder. Other functions (cycle time, I/0,
This write-protected memory area contains In this freely definable memory area, the touch-probe status) are reserved for future
all data specific to the encoder, such as OEM can store his information, which applications.
encoder type (linear, angular, singleturn/ typically includes the “electronic ID label”
multiturn, etc.), signal periods, number of of the motor in which the encoder is For information on the model of temperature
position values per revolution, transmission integrated, with data on logistics, mechanics sensor (for example KTY 84, PT 1000, etc.),
format of absolute position values, direction and the electronics of the motor. The size the subsequent electronics can automatically
of rotation, maximum permissible speed, of the OEM area depends on the encoder. adjust to the motor temperature sensor and
accuracy dependent on shaft speeds, It is also possible to add service information correctly calculate compensation values.
support of error and warning messages, and operating data. This makes the
part number, and serial number. This following possible: The operating parameter area can be
information forms the basis for automatic • Unambiguous identification and protected against overwriting.
configuration. configuration of the drive system
• Avoidance of error-prone manual Operating status
A separate memory area contains the parameter input This memory area provides detailed error
parameters typical for EnDat 2.2, such as • Reduction of commissioning time messages or warnings for diagnostic
status of additional data, temperature, • On-site support by the service technician purposes. Here it is also possible to initialize
acceleration, support of diagnostic and certain encoder functions, activate write
error messages. Operating parameters protection for the OEM parameters and
This area is available to the customer for a operating parameters memory areas, and
datum shift, the configuration of diagnostics to interrogate their status. Once write-
and for statements. Furthermore, a protection has been activated, it cannot be
warning threshold can be defined for the rescinded.
temperature sensor integrated in the
11
Parameters of the encoder manufacturer
The meaning of the information contained The meanings of parameters are divided The additional data for EnDat 2.2 contained
in the parameters of the encoder into evaluation categories. On the basis of in the parameters of the encoder
manufacturer depends on the encoder. these categories, the user can make clear manufacturer depends in part on the
decisions on the use of parameters and respective encoder.
HEIDENHAIN encoders can be divided into their integration in the application software.
six groups. They are differentiated by the The additional data, additional functions,
type of encoder (word 14 of the EnDat 2.1 Evaluation categories: diagnostic values, and specifications that
parameters). • Required: the respective encoder supports are saved
It is essential for operation of the encoder in the assigned status words of these
Encoder types: that these parameters be considered. memory areas. Before interrogation of the
L Linear encoder • Depending on application: additional data, HEIDENHAIN recommends
ST Singleturn rotary encoder or angle Whether these parameters are to be reading out the supported information and
encoder considered depends on the customer's functions (typically for every initialization of
MT Multiturn encoder application. If, for example, no OEM range encoders). They are also shown in the
iL Incremental linear encoder with is used, then the parameter regarding encoders’ specifications.
external (EIB) or integral conversion of memory allocation for parameters of the
1 VPP to purely serial EnDat 2.2 OEM need not be considered.
iR Incremental rotational encoder with • Informative:
external (EIB) or integral conversion of These parameters are not required for
1 VPP to purely serial EnDat 2.2 encoder operation, but they give the user
T Touch probe additional information such as the model
number.
• Irrelevant:
If no encoder types were assigned to any
of the three other evaluation categories,
then the parameter is not required for
encoder operation and can be ignored.
information
application
purposes
Only for
encoder encoder
4 Mask 0 – – – – – –
5 Mask 1 – – – – – –
6 Mask 2 – – – – – –
7 Mask 3 – – – – – –
8 Version of the EnDat interface – – – – All “2” saved with EnDat 2.1 or 2.2
9 Memory allocation for parameters of – – – – Depends on encoder; flexibly
10 the OEM All programmable. Memory pointer to
first free address
11 Memory allocation for compensation – – – – – Reserved for encoder manufacturer
12 values
13 Number of clock pulses for transfer – – – – Setting the correct clock number for
of the position value (transmission All position transmission
format)
14 Encoder type – – All – – Defines the units of the parameters
15 Signal period(s) per revolution for nm – – – iL, iR: For calculating the smallest
16 incremental output signals All1) display step (LSB) or the correct display
value for negative traverse direction
All: For EnDat-compliant datum shift
17 Distinguishable revolutions – – MT – – Required for correct calculation of the
(only for multiturn rotary encoders) position
18 (Nominal) increment of reference mm Signal periods – – iL iR –
marks
19 Position of the first reference mark mm – – – iL –
1)
Except touch probe
12
Parameters of the encoder manufacturer for EnDat 2.1 (continued)
Unit for
Depends on
information
application
purposes
Word Contents Linear Rotary/Angle Remark
Required
Only for
encoder encoder
13
Parameters of the encoder manufacturer for EnDat 2.2
Unit for
Depends on
information
application
Required
purposes
Word Contents Linear Rotary/ Comment
Only for
encoder Angle
encoder
14
Transmission of parameters
Fundamentals Selection of MRS code EnDat 2.1 mode commands for the
Because saving the data in an EEPROM The MRS code must be set before transmission of parameters
consumes a maximum access time tac of transmission of a parameter word. The All mode commands have the same
up to 12 ms, it must be decided for each EnDat 2.1 parameter area is selected with structure and are distinguished by the
application whether the control loop should the corresponding EnDat 2.1. or EnDat 2.2 number of the mode command and the
be closed during the reading or writing of mode command. For the EnDat 2.2 data content. Within the respective mode
parameters. EnDat 2.1 mode commands parameter area, the appropriate EnDat 2.2 command, the data are transmitted from
are designed for an open control loop mode command is required. the subsequent electronics to the encoder
during access to the parameters. EnDat 2.2 and then, after the access time tac, data
mode commands are designed operation are transmitted as acknowledgment from
in the closed control loop. the encoder to the subsequent electronics.
If multiple values (parameters) are read
from or written to a memory area, the
MRS must be selected only once.
Communication: Communication:
Subsequent electronics encoder Encoder subsequent electronics
EnDat 2.2 mode commands for the “transmission supplement” can then also
transmission of parameters transmit the MRS code, address and
Reading and writing in the closed control parameters to the encoder. The additional
loop is possible with EnDat 2.2 mode data and the transmission supplement
commands. The access time tac to the provide the following:
EEPROM is synchronized through what is • Additional data:
termed the “busy bit” that is transferred Data content from reading of parameters
with each EnDat additional datum. First, and acknowledgments
the position value and (if selected) additional • Transmission supplement:
data are transmitted with each of the mode MRS code, address and parameters
commands to make communication in the Schematic representation of reading
closed control loop possible. A following access with EnDat 2.2 mode commands:
Acknowledgment of MRS code Position value + Acknowledgment of MRS code (selection of additional datum and readout)
Cyclical request on busy bit = “0”; Position value + Any additional data
(max. tac = 12 ms)
Reading out of LSB data and Position value + Addressing of the additional datum “acknowledgment of LSB“ and
acknowledgment read-out of data content + acknowledgment of read address
Reading out of MSB data and Position value + Addressing of additional datum “acknowledgment of MSB“ and
acknowledgment read-out of data content + acknowledgment of read address
15
Diagnostics
16
Configuration
Cycle time
Setting the cycle time with which the
higher-level control transmits EnDat requests.
Reserved for future applications.
17
Interface
Voltage supply and switch-on
Encoder reset
“Encoder receive reset” mode command
18
Connection technology
Implementation of EnDat
HEIDENHAIN offers various aids for imple- EnDat master EnDat error injector
menting the EnDat interface in subsequent The EnDat master controls communication The simulation of a faulty data transmission
electronics (see also “Implementation” with EnDat encoders from HEIDENHAIN. can be useful for test purposes. The EnDat
section at www.endat.de): It allows simple transmission of position error injector enables manipulation of an
data and additional data to the higher-level EnDat transmission in a closed loop. A
EnDat Demotool software application. The EnDat master can be special PWM 20 version forms the basis
The EnDat Demotool software requires a integrated by means of a micro controller for the error injector.
PWM 20 as hardware basis. The EnDat (µC or SoC) or an FPGA (Field Programmable
Demotool software supports you when Gate Array) or ASIC. Documentation
implementing the EnDat interface: • EnDat Specifications
• Communication with EnDat encoders on The µC solutions are used if the intended • EnDat Application Note
the basis of mode commands clock frequencies are relatively low. • EnDat Seminar
• Logging of EnDat command sequences Integration in an FPGA, ASIC or SoC is • FAQ and implementation at
• Provides a reference when integrating of chosen primarily for high transmission www.endat.de
the EnDat master into the control loop frequencies with purely serial data transfer. • Technical Information: EnDat
Several variants are available for integration: • EnDat-Master at www.endat.de
• MAZeT: Diverse versions for FPGA
• Texas Instruments: C2000, Sitara, etc.
• Renesas: RZ/T1
• Hilscher: nextX 90
• HEIDENHAIN: Demo code for µC and
EIB 74x
19
Overview of encoders
This Product Information supersedes all previous editions, which thereby become invalid.
The basis for ordering from HEIDENHAIN is always the Product Information document
DR. JOHANNES HEIDENHAIN GmbH edition valid when the order is made.
Dr.-Johannes-Heidenhain-Straße 5
83301 Traunreut, Germany
{ +49 8669 31-0
| +49 8669 32-5061 For more information:
E-mail: info@heidenhain.de
• HEIDENHAIN encoder brochures
www.heidenhain.de • www.endat.de
• Description of the master component (www.mazet.de)
• Detailed interface specifications (upon request)