Implementation of EnDat Interface Master Using Configurable Logic Block in MCU
Abstract
:1. Introduction
2. Relevant Background Knowledge
2.1. EnDat Protocol
2.2. CLB Structure and Functions
3. Design and Implementation
- (i)
- The interrupt service routine (ISR) of the enhanced pulse width modulator (EPWM) device sends an encoder data request signal to the EnDat interface master.
- (ii)
- According to the encoder data request, the EnDat interface master activates the master mode command enable (MCOM-EN), generates the EnDat clock (ENC-CLK), and sends the master mode command (MCOM) to the EnDat encoder slave through the data-out (DO) line of the RS-485 using the serial peripheral interface (SPI) device.
- (iii)
- In response to the ENC-CLK and MCOM from the master, the encoder slave returns the position data corresponding to the MCOM through the data-in (DI) line of the RS-485.
- (iv)
- As soon as the EnDat interface master receives the position data, it transfers the received data to the motor control program, and one cycle of the encoder data reading process is completed.
3.1. Hardware Structure and Operation
3.2. Clock Generation
3.3. Main FSM
4. Experiments and Results
4.1. Feed Drive Control System
4.2. EnDat Interface Verification
4.3. Control Performance of Feed Drive System
5. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Bosetti, P.; Bruschi, S. Enhancing positioning accuracy of CNC machine tools by means of direct meas-urement of deformation. Int. J. Adv. Manuf. Technol. 2012, 58, 651–662. [Google Scholar] [CrossRef]
- Kwon, Y.; Tseng, T.L.; Ertekin, Y. Characterization of closed-loop measurement accuracy in precision CNC milling. Robot. Comput.-Integr. Manuf. 2006, 22, 288–296. [Google Scholar] [CrossRef]
- Zha, C.L.; Wang, C.N.; Chen, S.J. Design of NC Machine Tools Self-Compensation System Based on FPGA. Appl. Mech. Mater. 2013, 278, 1442–1446. [Google Scholar] [CrossRef]
- Hubeatir, K.A.; Al-Kafaji, M.M.; Omran, H.J. A review: Effect of different laser types on material engraving process. J. Mater. Sci. 2018, 6, 210–217. [Google Scholar]
- Kim, J.; Guo, A.; Yeh, T.; Hudson, S.E.; Mankoff, J. Understanding uncertainty in measurement and accommodating its impact in 3D modeling and printing. In Proceedings of the 2017 Conference on Designing Interactive Systems, Edinburg, UK, 10–14 June 2017; pp. 1067–1078. [Google Scholar]
- Zhao, J.; Wang, H.; Zhao, J.; Pan, Z.; Yan, R. Precise positioning of linear motor mover directly from the phase difference analysis. IEEE/ASME Trans. Mechatron. 2020, 25, 1566–1577. [Google Scholar] [CrossRef]
- Sato, K. High-precision and high-speed positioning of 100 G linear synchronous motor. Precis. Eng. 2015, 39, 31–37. [Google Scholar] [CrossRef]
- Shi, Y.; Zhou, Q.; Li, X.; Ni, K.; Wang, X. Design and testing of a linear encoder capable of measuring ab-solute distance. Sens. Actuators A Phys. 2020, 308, 111935. [Google Scholar] [CrossRef]
- Gao, W.; Kim, S.W.; Bosse, H.; Haitjema, H.; Chen, Y.L.; Lu, X.D.; Knapp, W.; Weckenmann, A.; Estler, W.T.; Kunzmann, H. Measurement technologies for precision positioning. CIRP Ann. 2015, 64, 773–796. [Google Scholar] [CrossRef]
- Shriram, S.; Barkur, R.; Joshua, P.; Shanthibhushan, B. Work-in-Progress: FPGA Implementation of Synchronous Serial Interface for Hardware in Loop Simulation. In Proceedings of the 2017 IEEE Real-Time and Embedded Technology and Applications Symposium (RTAS), Pittsburgh, PA, USA, 18–21 April 2017; pp. 133–136. [Google Scholar]
- Wilkening, T.; Krah, J.O.; Goergen, H. Safety-Related Interfaces for Position Encoders-a Survey. In Proceedings of the PCIM Europe 2019, International Exhibition and Conference for Power Electronics, Intelligent Motion, Renewable Energy and Energy Management, Nuremberg, Germany, 7–9 May 2019. [Google Scholar]
- Ye, W.; Cai, C.; Wang, B.; Yang, P. Decoding of BISS-C Protocol Based on FPGA. In Proceedings of the 2019 Chinese Automation Congress (CAC), Hangzhou, China, 22–24 November 2019; pp. 288–291. [Google Scholar]
- Xiang, Q.; Li, L.; Zhu, L.; Chen, H. A Realization Method of Cooperative Robot Servo Based on BISS-C Encoder. In Proceedings of the 2020 Chinese Automation Congress (CAC), Shanghai, China, 6–8 November 2020; pp. 6444–6447. [Google Scholar]
- Texas Instruments. C2000 Position Manager EnDat22 Library Module, User’s Guide; Texas Instruments: Dallas, TX, USA, 2015. [Google Scholar]
- Texas Instruments. Universal Digital Interface to Absolute Position Encoders; Texas Instruments: Dallas, TX, USA, 2015. [Google Scholar]
- Heidenhain. EnDat 2.2-Bidirectional Interface for Position Encoders; Heidenhain: Traunreut, Germany, 2011. [Google Scholar]
- Liu, J.; Chen, S.; Zhang, G.; Shi, L. The development of a novel servo motor controller based on EtherCAT and FPGA. In Proceedings of the 2016 Chinese Control and Decision Conference (CCDC), Yinchuan, China, 28–30 May 2016; pp. 3174–3179. [Google Scholar]
- Zhao, B.; Zhang, H.; Zhang, T. Configurable and Modular Development of Multi-Channel Motion Control Encoder Feedback System. In Proceedings of the 2018 5th International Conference on Information Science and Control En-gineering (ICISCE), Zhengzhou, China, 20–22 July 2018; pp. 665–669. [Google Scholar]
- Hino, R.; Le Caer, T.; Le Mentec, F.; Fajardo, P.; Janvier, N. A position encoder processing unit. Power 2017, 5, 6x. [Google Scholar]
- Schmidt, T.; Krah, J.O.; Holtz, J. High-performance control architecture for automation drives based on a low-cost microcontroller in combination with a low-cost FPGA. In Proceedings of the PCIM Europe Digital Days 2021, International Exhibition and Conference for Power Electronics, Intelligent Motion, Renewable Energy and Energy Management, Online, 3–7 May 2021; pp. 1–8. [Google Scholar]
- Galicki, P. Application Report: How to Migrate Custom Logic from an FPGA/CPLD to C2000 Microcon-Trollers; Texas Instruments: Dallas, TX, USA, 2020. [Google Scholar]
- Peterka, J.; Nikitin, Y.R.; Bozek, P. Diagnostics of automated technological devices. MM Sci. J. 2020, 4027–4034. [Google Scholar] [CrossRef]
- Šegota, S.B.; Andeli´c, N.; Mrzljak, V.; Lorencin, I.; Kuric, I.; Car, Z. Utilization of multilayer perceptron for determining the inverse kinematics of an industrial robotic manipulator. Int. J. Adv. Robot. Syst. 2021, 18, 1729881420925283. [Google Scholar] [CrossRef]
- EnDat Interface from HEIDENHAIN: Proven Interface Technology Continuously Further Developed. Available online: https://endat.heidenhain.com/ (accessed on 29 November 2023).
- Texas Instruments. Designing with the C2000 Configurable Logic Block (CLB); Texas Instruments: Dallas, TX, USA, 2019. [Google Scholar]
- Tran, D.M.; Kim, K.; Choi, J.Y. CLB-Based Development of BiSS-C Interface Master for Motor Encoders. Electronics 2023, 12, 886. [Google Scholar] [CrossRef]
- Marcovitz, A.B. Introduction to Logic Design; McGraw-Hill Higher Education: New York, NY, USA, 2010. [Google Scholar]
- Nam, K.H. AC Motor Control and Electrical Vehicle Applications; CRC Press: Boca Raton, FL, USA, 2018. [Google Scholar]
Protocol | SSI | HiperFace DSL | BiSS-C | EnDat |
---|---|---|---|---|
Ownership | Sick | Sick | iC-Haus | Heidenhain |
Serial Bit Rate | 80 kHz to 2 MHz | 9.375 Mbps | 80 kbps to 10 Mbps | 100 kbps to 16 Mbps |
Max Cable Length | Vendor specific | 100 m | 100 m | 100 m |
Propagation Delay Compensation | Not supported | Supported | Supported | Supported |
PHY | RS-422 | RS-485 | RS-422 | RS-485 |
Power Supply | Vendor specific | 7 V to 12 V | 5 V to 30 V | 3.6 V to 14 V |
Current State | Next State | OUT | |||
---|---|---|---|---|---|
State | E1 | E0 | |||
Low | 0 | 0 | 0 | 0 | 0 |
0 | 0 | 1 | 1 | 1 | |
0 | 1 | 0 | 0 | 0 | |
0 | 1 | 1 | 1 | 1 | |
High | 1 | 0 | 0 | 1 | 1 |
1 | 0 | 1 | 1 | 1 | |
1 | 1 | 0 | 0 | 1 | |
1 | 1 | 1 | 0 | 1 |
Current State | Next State | |||||
---|---|---|---|---|---|---|
Status | ||||||
IDLE | 0 | 0 | 0 | 0 | 0 | 1 |
0 | 0 | 0 | 1 | 0 | 1 | |
0 | 0 | 1 | 0 | 0 | 1 | |
0 | 0 | 1 | 1 | 0 | 1 | |
TRANSMIT_DATA | 0 | 1 | 0 | 0 | 0 | 1 |
0 | 1 | 0 | 1 | 0 | 1 | |
0 | 1 | 1 | 0 | 1 | 0 | |
0 | 1 | 1 | 1 | 1 | 0 | |
WAIT | 1 | 0 | 0 | 0 | 1 | 0 |
1 | 0 | 0 | 1 | 1 | 1 | |
1 | 0 | 1 | 0 | 1 | 0 | |
1 | 0 | 1 | 1 | 1 | 1 | |
RECEIVE_DATA | 1 | 1 | 0 | 0 | 1 | 1 |
1 | 1 | 0 | 1 | 1 | 1 | |
1 | 1 | 1 | 0 | 0 | 0 | |
1 | 1 | 1 | 1 | 0 | 0 |
Parameter | Value |
---|---|
Manufacturer | Heidenhain |
Model Name | LC 416 |
Encoder Type | Linear |
Accuracy Grade | 5 m |
Measuring Length | 920 mm |
Compatible Interface | EnDat 2.1, EnDat 2.2 |
Measuring Step | 0.010 m |
Implementation Approach | Number of Components | PCB Size and Complexity | Power Consumption | Production and Maintenance Cost |
---|---|---|---|---|
Using MCU and external programmable device | Increased | Increased | Increased | Increased |
Using only MCU (Using integrated CLB and SPI) | Reduced | Reduced | Reduced | Reduced |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Kim, K.; Tran, D.M.; Choi, J.-Y. Implementation of EnDat Interface Master Using Configurable Logic Block in MCU. Electronics 2024, 13, 1101. https://doi.org/10.3390/electronics13061101
Kim K, Tran DM, Choi J-Y. Implementation of EnDat Interface Master Using Configurable Logic Block in MCU. Electronics. 2024; 13(6):1101. https://doi.org/10.3390/electronics13061101
Chicago/Turabian StyleKim, Kyungah, Duc M. Tran, and Joon-Young Choi. 2024. "Implementation of EnDat Interface Master Using Configurable Logic Block in MCU" Electronics 13, no. 6: 1101. https://doi.org/10.3390/electronics13061101