SPRAD03 March   2022 AM2431 , AM2431 , AM2432 , AM2432 , AM2434 , AM2434 , AM6411 , AM6411 , AM6412 , AM6412 , AM6421 , AM6421 , AM6422 , AM6422 , AM6441 , AM6441 , AM6442 , AM6442

 

  1.   Trademarks
  2. System Overview
  3. Hardware Prerequisites
  4. Hardware Configuration
  5. HW Pinouts, Default Jumpers, and Connections
  6. Schematics
  7. Jumper Settings and Descriptions
  8. LEDs
  9. Software Architecture
  10. Actuation and Feedback Timing
  11. 10Benchmark Results
    1. 10.1 Motor Control R5F Processing Time
    2. 10.2 Trigger/Capture Point to R5F ISR Entry
  12. 11Detailed Demo User's Guide
    1. 11.1 Step 0. Getting the Software and Building
    2. 11.2 Step 1. Getting Started With the Hardware
    3. 11.3 Step 2. Configure ROQ437 EnDat2.2 Encoder for Faster EnDat 2.2 Recovery Time (only needs to be done once the first time you use the ROQ437 encoder)
    4. 11.4 Step 3. Open Loop Iq Control (BUILDLEVEL == OPEN_LOOP_IQ_ID)
    5. 11.5 Step 4. Closed Loop Iq/Id Control (BUILDLEVEL == CLOSED_LOOP_IQ_ID)
    6. 11.6 Step 5. Closed Loop Speed Control (BUILDLEVEL == CLOSED_LOOP_SPEED)
    7. 11.7 Step 6. Closed Loop Position Control (BUILDLEVEL == CLOSED_LOOP_POSITION)
  13. 12Build Using MCU+SDK 08.00.00.21 & CCS 10.3.1
  14. 13Summary
  15. 14Appendix A: Detailed Motor Control R5F Processing Time
  16. 15References

Step 2. Configure ROQ437 EnDat2.2 Encoder for Faster EnDat 2.2 Recovery Time (only needs to be done once the first time you use the ROQ437 encoder)

The ROQ437 defaults to a slower EnDat2.1 recovery time between position latches. EnDat2.2 enables a faster recovery time but we need to set a non-volatile bit one time in the ROQ437 before running the rest of the demo to reduce the recovery time. This is a workaround for now that can be incorporated into the demo code at a later time.

Explanation from the Heidenhain documentation (https://www.heidenhain.us/wp-content/uploads/Bidirectional_Interface_for_Position_Encoders-1.pdf): The extended EnDat interface version 2.2 is compatible in its communication, command set and time conditions with the previous version 2.1, but also offers significant advantages. It makes it possible, for example, to transfer additional information with the position value without sending a separate request for it. The interface protocol was expanded and the time conditions were optimized as follows: Increased clock frequency (CLOCK) (16 MHz), Optimized calculating time (position value acquisition within 5 µs), Minimized dead time (recovery time) (1.25 µs to 3.75 µs), Expanded power supply range (3.6 V to 5.25 V or 14 V at the encoder)

  • Plug in all of the hardware to connect the EnDat2.2 encoder into the slot closest to the TMDS243GPEVM
  • Import into CCS the 'endat_diagnostic' example from the MCU+ SDK located at '%SDK_INSTALL_DIR%\examples\motor_control\endat_diagnostic'
  • Build the example and load it into MAIN_Cortex®_R5_0_0
  • Setup the terminal in Code Composer Studio™ (CCS) to view the diagnostic output (my port is COM6 below but yours may differ):
    GUID-20211108-SS0I-QFQL-PGDD-V2FZFN7J767S-low.png Figure 11-5 COM Port for Diagnostic Output
  • Click 'Resume (F8)' to run the Diagnostic
  • Select 'y' for Multi channel configuration, select 'y' for select channel 0, and select 'n' for channel 1 and channel 2.
    GUID-20211108-SS0I-R1DK-8LSW-QKPGCNGJHKCT-low.png Figure 11-6 EnDat 2.2 Diagnostic Output
  • After these selections the diagnostics should communicate with the encoder and return ID, SN, and information about the resolution and propagation delay
  • Connect a logic analyzer to to the EnDat CLK, TX, and RX pin (these pins can be accessed on the right angle connector of the TIDA-00179 board as shown below)
    GUID-20211108-SS0I-BX32-D7LD-PTCWV7PZDTWM-low.png Figure 11-7 Measure EnDat CLK, TX and RX Pins
  • Select option '107' in the diagnostic and enter '8000' for the frequency in Hz. This causes the program to continuously request data from the encoder like that shown in Figure 11-8.
    GUID-20211108-SS0I-0BLF-CFND-KXZZ9CX0HX9B-low.png Figure 11-8 EnDat 2.2 Position Output
  • Run the logic analyzer while the simulated position loop is running and look at the recovery time on the RX signal (the time the RX signal is held high after the CLK stops):
    GUID-20211108-SS0I-74ZX-ZQMV-SPFXMK3ZJRPG-low.png Figure 11-9 RX Signal (Before Change)
  • To set the bit to enable EnDat2.2 recovery mode select diagnostic option: 10, parameter address: 3, and parameter value: 1
    GUID-988198EF-A292-4F6E-844B-F1B261074CFD-low.png Figure 11-10 EnDat 2.2 Recovery Mode Change
  • Then select diagnostic option '5' to reset the encoder in order for the setting to take effect
  • Re-run option 107 with 8000 as the frequency to ensure that the setting has been saved and that the recovery time is less than 3.75 µs:
    GUID-20211108-SS0I-RLLS-FBTD-H1B8ZDX2SKG4-low.png Figure 11-11 RX Signal (After Change)
  • If the recovery time is still around 20 µs, you may need to try the previous steps one more time (option 10, address 3, value 1, then option 5 to reset)

At this point, your encoder should be configured to run in EnDat2.2 recovery mode, which allows for the tight timings that is needed throughout the rest of the demo.