SPRUJH1 August   2025 F29H850TU

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. 1Introduction
    1. 1.1 Hardware Block Diagram
    2. 1.2 Software Flowchart
    3. 1.3 MCU Resources Used
  5. 2Running the Servo Drive With QEP on TI Hardware
    1. 2.1 Supported Hardware
    2. 2.2 Hardware Setup
      1. 2.2.1 LAUNCHXL-F29H85X Setup
      2. 2.2.2 DAC128S085EVM Setup (Optional)
      3. 2.2.3 BOOSTXL-3PHGANINV Setup
      4. 2.2.4 BOOSTXL-LMG2100-MD Setup
      5. 2.2.5 BP-AMC0106-LMG-MD
      6. 2.2.6 Motor Setup
    3. 2.3 Lab Software
      1. 2.3.1 Software Development Environment
      2. 2.3.2 Project Orginization
      3. 2.3.3 Configuration of the Software
      4. 2.3.4 Debug Interfaces
        1. 2.3.4.1 Datalogging
        2. 2.3.4.2 Digital to Analog Converters
    4. 2.4 Testing the Project in Incremental Steps
      1. 2.4.1 Watch Variables
      2. 2.4.2 Step 1 Hardware Setup Validation
        1. 2.4.2.1 Build, Load and Run Project
      3. 2.4.3 Step 2 Open Loop Control
        1. 2.4.3.1 Build, Load and Run Project
      4. 2.4.4 Step 3 Close the Current Loop
        1. 2.4.4.1 Build, Load and Run Project
      5. 2.4.5 Step 4 Close the Speed and Current Loop
        1. 2.4.5.1 Build and Load Project
  6.   References

Datalogging

The datalog software module supports logging into software buffers. These buffers can then be displayed using Code Composer Studio's graphing function.

The datalog library is documented the SDK documentation. <install>/docs/html_guide/index.html under Libraries.

  1. Add the symbol DATALOG_EN to the project's predefined symbols.
  2. Select the number of buffers, the size of the buffers, and the datatype in libraries/utilities/datalog_input.h.
  3. Call the setupDatalog() function in src_board/diagnostics.c:
    // Initialize Datalog
    datalogHandle = DATALOG_init(&datalog, sizeof(datalog), manual, 0, 1);
    DATALOG_Obj *datalogObj = (DATALOG_Obj *)datalogHandle;
    datalogObj->flag_enableLogData = false;
    datalogObj->flag_enableLogOneShot = false;
    ....
    datalogObj->iptr[0] = (float32_t*) &motorVars_M1.senseData.I_A.value[0];
    datalogObj->iptr[1] = (float32_t*) &motorVars_M1.senseData.I_A.value[1];
    datalogObj->iptr[2] = (float32_t*) &motorVars_M1.angleFOC_rad;   

    This function can be modified to output different signals. For this project, you can monitor the angle and the sensed current values as shown here.

  4. Start the datalog when appropriate. This can be either one-shot or continuous log.
    #if defined(DATALOG_EN)
        // datalog.flag_enableLogOneShot = true;
       datalog.flag_enableLogData = true;
    #endif  // DATALOG_ENABLE
  5. Send data to the datalog:
    #if defined(DATALOG_EN)
        DATALOG_update(datalogHandle);
    #endif  // DATALOG_ENABLE