EnDat Interface Encoder Data Acquisition Design

Abstract: The EnDat interface is a digital, full-duplex synchronous serial data transmission protocol designed by HEIDENHAIN specifically for encoders. It has the advantages of high transmission speed, powerful functions, simple connection, and strong anti-jamming ability. It is an encoder and grating. The universal interface for data transmission. This article describes the features, functions, timing and data transmission, and OEM data storage of the EnDat interface. At the same time, it introduces the subsequent circuit design scheme for encoder data acquisition and the principles and principles based on the FPGA module design.


I. Overview

The absolute encoder uses natural binary, cyclic binary (Gray code) or PRC code to photoelectrically convert the physical reticle on the code wheel, converts the rotation angle of the connecting shaft into a corresponding electrical pulse sequence and outputs it as a digital quantity. It has the advantages of small size, high precision, digital interface and absolute positioning. It is widely used in radar, turntables, robots, CNC machine tools and high-precision servo systems and many other fields. The data output of the absolute encoder is based on synchronous serial output. The EnDat interface is a digital, full-duplex synchronous serial interface designed for HEIDENHAIN encoders. Not only can it transmit position values ​​for incremental and absolute encoders, but it can also transfer or update the information stored in the encoder or save new information. Since the serial transmission method is used, only four signal lines are needed. Under the excitation of the clock of the subsequent electronic device, the data information is transmitted synchronously. The data type (position value, parameter, diagnostic information, etc.) is determined by the choice of mode command sent by the subsequent electronic device to the encoder.

Two EnDat interface introduction

Characteristics of the EnDat interface

High performance and low cost: The universal interface is suitable for all incremental and absolute encoders, more economical power consumption, small size and compact connection, fast system configuration, zero point can be floated according to the offset value.

Better signal quality: Special optimization within the encoder improves system accuracy and provides better contour accuracy for the CNC system.

Better practicality: automatic system configuration; digital signals improve the reliability of the system; monitoring and diagnostic information is conducive to the safety of the system; redundancy code verification is conducive to reliable signal transmission.

Improve the security of the system: two independent location information and error information bits, data checksums and responses.

Suitable for advanced technology development: (high resolution, short control cycle, fastest 16M clock, safety design concept) suitable for direct drive technology.

Figure 1 EnDat interface encoder data acquisition schematic

2. EnDat2.2 encoder performance improvement

Transmission position values ​​and additional information can be transmitted simultaneously: The type of additional information can be selected by storing the address selection code.

The encoder data storage area includes encoder manufacturer parameters, OEM manufacturer parameters, operating parameters, and operating status to facilitate system configuration.

The EnDat2.2 encoder implements all-digital transmission. The incremental signal processing is completed inside the encoder (built-in 14Bit subdivision), which improves the quality and reliability of signal transmission and enables higher resolution.

Monitoring and diagnostic functions, alarm conditions include: light source failure, insufficient signal amplitude, incorrect position calculation, too low or high operating voltage, too high current consumption, etc.; providing a warning signal when some extreme values ​​of the encoder are approached or exceeded .

A wider voltage range (3.6~14V) and transmission rate (16M).

3. Timing and OEM data storage

A data packet is transmitted during each frame of synchronous data transmission. The transmission cycle starts from the first falling edge of the clock and the measured value is stored, and the position value is calculated. After two clock pulses (2T), the subsequent electronic device sends the mode command "encoder transmission position value" (with or without additional information).

After calculating the absolute position value (tcal---see Fig. 2), the encoder starts to transfer data from the start bit to the subsequent electronics. The subsequent error bits F1 and F2 (which only exist in the EnDat2.2 command) are For all monitoring functions and group signals of fault monitoring services, their generation is independent of each other and is used to indicate encoder failure that may result in incorrect location information. The exact cause of the failure is stored in the "operational" memory area and can be queried by subsequent electronic devices.

From the lowest bit, the absolute position value is transmitted and the length of the data is determined by the encoder type used. The number of clock pulses required to transmit the position value is stored in the encoder manufacturer's parameters. The transmission of position value data ends with a cyclic redundancy check code.

Fig. 2 Position value transmission without additional information

If the position value has additional information, immediately after the position value is additional information 1 and 2, they also end with a CRC. The content of the additional information is determined by the selected address of the memory area and then transmitted in the subsequent sampling period. This information is transmitted during subsequent transmissions until a new memory area is selected. At the end of the data word, the clock signal must be set high. After 10us to 30us or 1.25us to 3.75us (EnDat2.2 programmable recovery time tm), the data line goes back low and then new data transfer can begin with the new clock signal.

Figure 3 Location Transmission with Attachment Information

At the same time, the encoder provides different memory areas for the parameters, which can be read by subsequent electronic devices. These areas can be written by the encoder manufacturer, the OEM manufacturer or even the end user. Some specific areas can be write protected. Different series of encoders support different OEM storage areas and different address ranges. Therefore, each encoder must read the allocation information of the OEM memory area. For this reason, subsequent electronic circuits should be programmed based on relative addresses and cannot use absolute addresses.

Three EnDat interface follow-up electronic device circuit design

The user can design the interface circuit to collect and process the data according to the EnDat interface protocol and circuit electrical characteristics. At the same time, HEIDENHAIN also provides a specific data processing chip for the user to choose. If the user designs the circuit by himself, the electrical characteristics of the EnDat interface must be followed, and the protocol of the EnDat interface needs to be mastered to ensure that the timing requirements and data frame format of the protocol are strictly followed. If the data processing chip provided by HEIDENHAIN is used, the design can be simplified. The user only needs to configure the register of the FPGA and send the instruction according to the instruction format acceptable by the chip, so that the desired data can be obtained.

By following the RS-485 (differential signal) standard transceiver elements, the data (position values ​​and parameters) can be transmitted bi-directionally between the encoder and the subsequent electronic devices under the excitation of a synchronous clock issued by a subsequent electronic device.

Four FPGA+ Software Macros

HEZEHAN's partner MAZet provides EnDat software macros for Xilinx's Virtex and Spartan series and Altera's Acex and Cyclone series. According to customer requirements, MAZet can also provide customized soft cores. The soft core implements all the functions of the EnDat interface. The user can perform 8-bit or 16-bit data transmission with the microcontroller through the 6-bit address line and the 16-bit data line. The following is the module diagram and circuit design of FPGA.

Figure 4 FPGA module diagram

Figure 5 Encoder and subsequent circuit connection module diagram

Five conclusions

HEIDENHAIN's EnDat interface has been widely used in many industries, and it has now been upgraded to a new level. The clock frequency of the bidirectional EnDat 2.2 interface has now been increased to 16 MHz to meet the direct drive of these high dynamic performance applications, especially in the electronics industry. Increasing the clock frequency from 8 MHz to 16 MHz will not only greatly reduce the read position. The time required for information can also significantly shorten the cycle of the control loop. At the same time, simple and economical system design provides customers with convenience, powerful functions and versatility, and forward-looking security design concepts to guide the continuous development of coding control technology.

references

[1] EnDat position encoder bidirectional digital interface HEIDENHAIN data sheet

[2] High Security Control Technology HEIDENHAIN Technical Information

[3] EnDat Interface Technical Manual HEIDENHAIN Technical Information