Professional Documents
Culture Documents
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 through
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.
Power supply
CLOCK 16 MHz
Miniature connecting
element, M12, 8-pin
Connecting element,
e.g. M12, D-sub
2
Compatibility of EnDat 2.2 > 2.1
for example, to transfer what is termed ’ Absolute position values after reference run of incremental encoders
Description of Function
The EnDat interface transmits position 2. Parameter reading and writing is
values or additional physical quantities in an possible both as a separate function and
unambiguous time sequence and serves to in connection with the position value.
read out from and write to the encoder’s Parameters can be read or written after
internal memory. the memory area is selected.
1. Position values can be transmitted with 3. Reset functions serve to reset the
or without additional data. The additional encoder in case of malfunction. Reset is
data types are selectable via the possible instead of or during position
Memory Range Select (MRS) code. value transmission.
Other functions such as parameter
reading and writing can also be called 4. Test commands and values are used
after the memory area has been for forced dynamic sampling in safety-
selected. Through simultaneous related controls. The significance of the
transmission with the position value, error message is inverted in order to
additional data can also be requested of monitor its generation.
axes in the feedback loop, and functions
executed with them.
3
Data Transfer
2T Mode command 2T
Clock pulse
transmitted to
the encoder
Clock pulse at
encoder
Mode
0 0 0 1 1 1 S F1 D D D D CRC CRC CRC CRC CRC
Data at
encoder
0 0 0 1 1 1 S F1 D D D D CRC CRC CRC CRC CRC
Data at subs.
electronics tD
S = start, F1 = error, D = data
Start counter
4
Selecting the Transmission Type
Transmitted data are identified as either The time absolute linear encoders need for
position values, position values with calculating the position values tcalf
additional data, or parameters. The type of sometimes differs depending on whether
information to be transmitted is selected EnDat-2.1 or EnDat-2.2 mode commands
by mode commands. Mode commands are transmitted (see catalog: Linear
define the content of the transmitted Encoders for Numerically Controlled
information. Every mode command Machine Tools – Specifications). If the
consists of three bits. To ensure reliable incremental signals are evaluated for axis
transmission, every bit is transmitted control, then the EnDat 2.1 mode
redundantly (inverted or double). If the commands should be used. Only in this
encoder detects an incorrect mode manner can an active error message be
transmission, it transmits an error transmitted synchronously with the
message. The EnDat 2.2 interface can also currently requested position value.
transfer parameter values in the additional EnDat 2.1 mode commands should
data together with the position value. This not be used for purely serial position-value
makes the current position values transfer for axis control.
constantly available for the control loop,
even during a parameter request.
Mode bit
5
Position Values
The encoder then transmits the absolute Mode command Position value CIRCLE
position value, beginning with the LS. Its
length varies depending on which encoder S = start, F1 = error 1, F2 = error 2, L = LS, M = MSB
Diagram does not include the propagation-delay compensation
is being used. The number of required
clock pulses for transmission of a position
value is saved in the parameters of the
encoder manufacturer. Without delay compensation With delay compensation
The data transmission of the position value Clock frequency fc 100 kHz ... 2 MHz 100 kHz ... 16 MHz
is completed with the Cyclic Redundancy
Check (CIRCLE). Calculation time for
Position value tcalf Typical of EnDat 2.2 encoders: † 5 µs
This is followed in EnDat 2.2 by the Parameter tac Max. 12 ms
additional data 1 and 2, each also
concluded with a CIRCLE. The content of Recovery time tm EnDat 2.1: 10 to 30 µs
the additional data is determined by the EnDat 2.2: 10 to 30 µs or 1.25 to 3.75 µs (fc ‡ 1 MHz)
selection of the memory area and is (parameterizable)
transmitted in the next sampling cycle for
additional data. This information is then tR Max. 500 ns
transmitted with every sample until a
selection of a new memory area changes tST – 2 µs to 10 µs
the content.
Data delay time tD (0.2 + 0.01 x cable length in m) µs
With the end of the data word, the
clock must be set to HIGH. After 10 to Pulse width tHI 0.2 to 10 µs Pulse width fluctuation HIGH
30 µs or 1.25 to 3.75 µs (with EnDat 2.2 to LOW max. 10 %
parameterizable recovery time tm) the data tLO 0.2 to 50 ms
line falls back to LOW. Then a new data to 30 µs (with LC)
transmission can be initiated by starting
the clock.
6
Data packet with position value and additional data 1 and 2
Encoder saves
position value
Subsequent electronics
transmit mode command
Mode command Position value CIRCLE Additional datum 2 CIRCLE Additional datum 1 CIRCLE
Typical command sequence when transmitting a position value with additional data:
Encoder transmit position value and receive Mode command Position value MRS Random
▲
▲
desired additional data)
Encoder transmit position value and receive Mode command Position value 01000111 Random
selection of memory area (acknowledgment 001 001 Acknowledgment content
▲
▲
of the MRS code) request for MRS
code
Encoder send position value with additional Mode command Position value Additional datum 1
data (acknowledgment) 111 000 MRS acknowledg-
▲
ment
Errors include:
• Light unit failure
• Signal amplitude too low
• Error in calculation of position value
• Power supply too high/low
• Current consumption is excessive
7
Additional data
30 bits
One or two additional data can be appended
to the position value, depending on the
type of transmission (selection via MRS Additional data 5 bits
code). The additional data are each 30 bits CIRCLE
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.
The additional data supported by the
Acknowledgment of
respective encoder is saved in the encoder additional data 8 bits 8 bits data
parameters. address or
The additional data includes status data
information, addresses, and data:
8
Parameter
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. On or more
“MRS codes” are therefore assigned to
the respective memory areas (MRS ƒ
Memory Range Select).
9
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 in the assigned status words of these
Encoder types: encoder that these parameters be memory areas. Before interrogation of the
L Linear encoders considered. additional data, HEIDENHAIN recommends
W Angle encoders (rotational) • Depending on application: reading out the supported information and
D Rotary encoders (rotational) Whether these parameters are to be functions (typically for every initialization of
E EIB external interface box for considered depends on the customer's encoders). They are also shown in the
conversion of 1 VPP to pure serial application. If, for example, no OEM encoders’ specifications.
EnDat 2.2 range is used, then the parameter
IL Incremental linear encoder with integral regarding memory allocation for
conversion of 1 VPP to purely serial parameters of the OEM need not be
EnDat 2.2 considered.
i Incremental rotational encoder with • Informative:
integral conversion of 1 VPP to purely These parameters are not required for
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.
Informative
application
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; program flexibly.
10 the OEM All Memory pointer to first free address
11 Memory allocation for compensation – – – – – Reserved for encoder manufacturer
12 values
13 Number of clock pulses for transfer of – – – – Setting the correct clock number for
position value (transmission format) All position transmission
14 Encoder model – – All – – Defines the units of the parameters
15 Signal period(s) per revolution for nm – – – E, IL, i: for calculating the smallest
16 incremental output signals All display step (LS) or the correct display
value for negative traverse direction
All: for EnDat-compliant datum shift
17 Distinguishable revolutions (only for – – WD – – Required for correct calculation of the
multiturn encoders) position
18 (Nominal) increment of reference mm Signal periods – – E IL i –
marks
19 Position of first reference mark mm – – – IL Not supported by EIB
10
Parameters of the encoder manufacturer for EnDat 2.1 (continued)
Unit for
Depends on
Informative
application
Word Contents Linear Rotary/angle Remark
Required
encoder encoder
11
Parameters of the encoder manufacturer for EnDat 2.2
Unit for
Depends on
Informative
application
Required
Word Contents Linear Rotary/ Remark
encoder angle
encoder
12
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 following “transmission supplement” can
transmission of parameters then also transmit the MRS code, address
Reading and writing in the closed control and parameter to the encoder. The
loop is possible with EnDat 2.2 mode additional data and the transmission
commands. The access time tac to the supplement 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) • Transmission supplement:
additional data transmitted with each of the MRS code, address and parameters
mode commands to make communication Schematic representation of reading
in the closed control loop possible. A access with EnDat 2.2 mode commands:
Acknowledgement of MRS code Position value + Acknowledgement of MRS code (selection of additional data and readout)
Cyclical request on busy bit = “0”; Position value + Any additional data
(max. tac = 12 ms)
Reading out of LS data and Position value + Addressing of the additional datum “acknowledgment of LS“ and read-
acknowledgment out of data content + acknowledgment of read address
Reading out of MSB data and Position value + Addressing of additional datum “acknowledgment of MSB“ and read-out
acknowledgment of data content + acknowledgment of read address
13
Diagnostics
Implementation of EnDat
HEIDENHAIN offer various aids for EnDat master Documentation
implementing the EnDat interface in The EnDat master controls communication • EnDat Specifications
subsequent electronics (see also with EnDat encoders from HEIDENHAIN. • EnDat 4
“Implementation” section under It allows simple transmission of position • EnDat Seminar
www.EnDat.de): data and additional data to the higher-level • FAQ and implementation at
application. The EnDat master can be www.EnDat.de
EnDat Demotool software integrated by means of a micro controller • EnDat Technical Information
As its hardware basis, the EnDat Demotool (µC) or an FPGA (Field Programmable Gate • Description of the EnDat master
software needs a PWM 20 (IK 215 is Array) or ASIC. component at www.mazet.de
possible, but not recommended). The
EnDat Demotool software supports you The µC solutions are used if the intended
when implementing the EnDat interface: clock frequencies are relatively low.
• Communication with EnDat encoders on Integration in an FPGA or ASIC is chosen
the basis of mode commands primarily for high transmission frequencies
• Logging of EnDat command sequences with pure serial data transfer. Several
• Provides a reference when integrating of variants are available for integration in
the EnDat master into the control loop an FPGA or ASIC.
• EnDat master, standard
• EnDat master, safe
• EnDat Master, reduced
• EnDat Master, light
15
Interface
Power Supply and Switch-On
Read out the “number of clock pulses for transfer of the position
value.” (Parameters of encoder manufacturer, word 13)
16
Input Circuitry of the Subsequent Electronics
Data (measured values or parameters) can Data transfer Encoder Subsequent electronics
be transferred bidirectionally between
position encoders and subsequent
electronics with transceiver components in
accordance with RS-485 (differential
signals), in synchronism with the clock
signal (CLOCK) produced by the
subsequent electronics.
Dimensioning
IC1 = RS 485 differential line receiver and
driver
C3 = 330 pF
Z0 = 120 −
Incremental signals
depending on
encoder
Connection Technology
17
Safety System
18
The EnDat 2.2 interface supports the Independent individual CIRCLE Reliable position value acquisition requires
following individual safety-relevant generation for position values and that the subsequent electronics initiate
functions: additional data these functions and evaluate the data
Separate CIRCLE values are generated for correctly. More detailed information can be
the individual data packets of a transmission found in the Technical Information “Safety-
Two mutually independent position (position value, additional data 1 and 2). Related Position Measuring Systems” and
values for error detection the package of measures for the safe
In addition to the position value, the Highly dynamic data acquisition and control.
additional data includes a separately transmission
generated position value to be used for Short cycle times for data acquisition
comparison in the subsequent electronics. including transmission make the necessary
position-value comparisons and monitoring
Two mutually independent error of transmission functions possible.
messages
The error messages are generated
independently of each other and are
transmitted at different active levels.
Position 1 EnDat
master
(protocol and cable)
Interface 2
Position 2
Catalog of measures
Two independent Serial data transfer Position values and error bits via
position values two processor interfaces
Internal monitoring Monitoring functions
Protocol formation Efficiency test
19
Overview of Encoders