This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

InstaSPIN_FOC_F2806xM and custom user.h

Other Parts Discussed in Thread: MOTORWARE, INSTASPINUNIVERSALGUI

Hi

I am looking for some guidance and help with a new motor controller board.  

I recently purchased DRV8312-69M-KIT.  The kit comes with controlCARD TMDSCNCD28069MISO.  

I would like to use "C:\ti\guicomposer\webapps\InstaSPIN_FOC_F2806xM\InstaSPIN_FOC_F2806xM.exe" application to run my motor.  The gui loads with some default parameter settings.  I would like the GUI to be loaded with different set of parameters.  

I read somewhere that there is a user.h file that can be modified and loaded, but I have not been able to figure out how to do that correct.

Is there a How-To or a Guide as to how I can run the InstaSPIN_FOC_F2806xM.exe with a user.h parameters?

A quick response is highly appreciated.

Thanks in advance.

  • The GUI depends on the appProgram.out file to load it's information from. If you want to run MotorWare proj_lab2a with the GUI, you'll need to import and compile lab2a in Code Composer first. Once you have the proj_lab2a.out, you'll want to copy it to the GUI Composer webapp directory (i.e C:\ti\guicomposer\webapps\InstaSPIN_FOC_F2806xM), and rename it appProgram.out. When you run InstaSPIN_FOC_F2806xM.exe, it'll load using whatever settings were compiled into the .out file. If you want to use your own user.h settings, you'll need to set them in the Code Composer project before creating the corresponding .out file to be used by the GUI

    Sean
  • Hi Sean,
    Thanks for your response. I modified the user.h with my motor settings.

    modification to the user.h file
    #elif (USER_MOTOR == MY_OMID_MOTOR)
    #define USER_MOTOR_TYPE MOTOR_Type_Pm
    #define USER_MOTOR_NUM_POLE_PAIRS (7)
    #define USER_MOTOR_Rr (NULL)
    #define USER_MOTOR_Rs (2.49456048) // gMotorVars.Rs_Ohm
    #define USER_MOTOR_Ls_d (0.000240691341) // gMotorVars.Lsd_H
    #define USER_MOTOR_Ls_q (0.000240691341) // gMotorVars.Lsq_H
    #define USER_MOTOR_RATED_FLUX (0.021087043) // gMotorVars.Flux_VpHz
    #define USER_MOTOR_MAGNETIZING_CURRENT (NULL)
    #define USER_MOTOR_RES_EST_CURRENT (1.0)
    #define USER_MOTOR_IND_EST_CURRENT (-1.0)
    #define USER_MOTOR_MAX_CURRENT (3.0)
    #define USER_MOTOR_FLUX_EST_FREQ_Hz (20.0)


    Then I compiled the code using the CCS. C:\ti\motorware\motorware_1_01_00_16\sw\solutions\instaspin_foc\boards\drv8312kit_revD\f28x\f2806xF\projects\ccs5\proj_lab02a\Flash\proj_lab02a.out

    proj_lab02a.out was generated. Then it was renamed proj_lab02a.out to appProgram.out.
    I copied the appProgram.out to "C:\ti\guicomposer\webapps\InstaSPIN_FOC_F2806xM\appProgram.out".
    I opened "C:\ti\guicomposer\webapps\InstaSPIN_FOC_F2806xM\InstaSPIN_FOC_F2806xM.exe".

    The GUI composer loaded but all the fields were blank. Did I miss a step somewhere?

    A quick response is highly appreciated.
    Thanks
  • Please try using the Universal GUI instead of the InstaSPIN_FOC_F2806xM GUI, you can find that GUI here: www.ti.com/.../instaspinuniversalgui

    I was able to get that GUI to run without issue inside of CCS. This is the GUI our team recommends for use with InstaSPIN-FOC and -MOTION products

    Sean
  • Hi Sean

    I downloaded instaspinuniversalgui_v105.exe. I have installed the application in the following directory... "C:\ti\guicomposer\webapps\InstaSPIN_F2806xM_UNIVERSAL\InstaSPIN_UNIVERSAL.exe"

    below is the content of my directory

    "C:\ti\guicomposer\webapps\InstaSPIN_F2806xM_UNIVERSAL\app.css"
    "C:\ti\guicomposer\webapps\InstaSPIN_F2806xM_UNIVERSAL\app.html"
    "C:\ti\guicomposer\webapps\InstaSPIN_F2806xM_UNIVERSAL\app.js"
    "C:\ti\guicomposer\webapps\InstaSPIN_F2806xM_UNIVERSAL\app.json"
    "C:\ti\guicomposer\webapps\InstaSPIN_F2806xM_UNIVERSAL\appInitScript.js"
    "C:\ti\guicomposer\webapps\InstaSPIN_F2806xM_UNIVERSAL\appProgram.out"
    "C:\ti\guicomposer\webapps\InstaSPIN_F2806xM_UNIVERSAL\index.html"
    "C:\ti\guicomposer\webapps\InstaSPIN_F2806xM_UNIVERSAL\InstaSPIN_UNIVERSAL.exe"
    "C:\ti\guicomposer\webapps\InstaSPIN_F2806xM_UNIVERSAL\InstaSPIN_UNIVERSAL.ini"
    "C:\ti\guicomposer\webapps\InstaSPIN_F2806xM_UNIVERSAL\readme.txt"
    "C:\ti\guicomposer\webapps\InstaSPIN_F2806xM_UNIVERSAL\.settings"
    "C:\ti\guicomposer\webapps\InstaSPIN_F2806xM_UNIVERSAL\Images"
    "C:\ti\guicomposer\webapps\InstaSPIN_F2806xM_UNIVERSAL\.appsettings"



    I placed a appProgram.out here .. "C:\ti\guicomposer\webapps\InstaSPIN_F2806xM_UNIVERSAL\appProgram.out"

    when I execute "C:\ti\guicomposer\webapps\InstaSPIN_F2806xM_UNIVERSAL\InstaSPIN_UNIVERSAL.exe"

    I get the error message below

    HTTP ERROR: 404

    Problem accessing /gc/webapp0/InstaSPIN_F2806xM_UNIVERSAL/lib/davinci.gc_1_5/WebContent/gc/templates/program/index.html. Reason:

    Not Found
    Powered by Jetty://


    I am not sure what this error message means. Did I miss a steps somewhere?

    Please let me know.
    Thanks
  • When you run instaspinuniversalgui_v105.exe, please install it to the default directory (C:\ti). If it prompts you to uninstall other installs of GUI Composer, allow it to do so.

    Next, in Code Composer App Center, download the GUI Composer. Make sure that installs correctly. Also in CCS, Import whichever MotorWare project you are working on (i.e proj_lab2a) into the workspace.

    Go to the following directory: C:\ti\guicomposer\webapps. From here, please add InstaSPIN_F2806xM_UNIVERSAL to a .zip archive. You should then have InstaSPIN_F2806xM_UNIVERSAL.zip in your webapps folder.

    Back in CCS, select View->GUI Composer. You'll see "Import Project"; when you select that, it's going to ask for a .zip file. Point it to the InstaSPIN_F2806xM_UNIVERSAL.zip you created in the last step.

    Once you have the InstaSPIN-FOC MotorWare Instrumentation GUI up, build your project (i.e proj_lab2a) and enter debug mode. Select "Enable Real-Time Silicon Mode" from the top, followed by the "Resume (F8)" button. Select the GUI Composer tab from your debug code pane. In the top right, select "Preview" (the arrow icon). You should be able to run your labs from here.

    For proj_lab3b, which is the lab used to run a motor using the parameters you've set in your user.h, I was able to get the GUI to display the values I had in my user.h after selecting "Enable System" and "Run." Any time I change the user.h settings, recompile the project, enter debug mode, enter "Preview" in the GUI, and enable system and run, the GUI displays to me the values I changed in the user.h

    Sean
  • Hi Sean,
    Thanks for the information.

    The steps laid out in the previous email worked as expected. I do have a follow-up question along the same lines.

    Is there anyway to use the InstaSPIN_F2806xM_UNIVERSAL GUI Composer without having to flash the program every-time you run the program?

    I have a custom flash program that has my user.h settings and it load and runs correctly; but is there a way to load the program into flash once and then just run the application without re-flashing the board every-time?

    A quick response is highly appreciated.
    Thanks
  • I don't believe there is a way for the GUI to read/write data without entering a debug session, and no way to relaunch a debug session without loading a program. You may want to ask this question in the Code Composer forum as they are more knowledgeable about the Universal GUI

    Sean