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.

Corrupted lab project 01 Motor Ware

Other Parts Discussed in Thread: MOTORWARE

Hi all,

I managed to corrupt my Motor Ware Lab 01 project, rather not go in to "how". But somehow I managed to save it also.

So when I try to compile, of course I get an error. Real good way to learn, however. I thought perhaps someone could make available a good copy of it so I could get back at it. :)

If not, perhaps some help with the actual problem. Might as well just go ahead and put the info in place, If Chris gets this he will probably make me do the extra work and learn from it. :)

I managed some how to mis-configure my motor file.


#35 #error directive: No motor type specified    hal.c    /proj_lab01    line 600, external location: C:\ti\motorware\motorware_1_01_00_12\sw\solutions\instaspin_foc\boards\drv8301kit_revD\f28x\f2806xF\src\user.h  

Line 600 is just a fall through error. Below is "My_Motor" defined so I missed it somewhere.

#elif (USER_MOTOR == My_Motor)
#define USER_MOTOR_TYPE                 MOTOR_Type_Pm
#define USER_MOTOR_NUM_POLE_PAIRS       (2)
#define USER_MOTOR_Rr                   (NULL)
#define USER_MOTOR_Rs                   (0.3918252)
#define USER_MOTOR_Ls_d                 (0.00023495)
#define USER_MOTOR_Ls_q                 (0.00023495)
#define USER_MOTOR_RATED_FLUX           (0.03955824)
#define USER_MOTOR_MAGNETIZING_CURRENT  (NULL)
#define USER_MOTOR_RES_EST_CURRENT      (3.0)
#define USER_MOTOR_IND_EST_CURRENT      (-0.5)
#define USER_MOTOR_MAX_CURRENT          (20.0)
#define USER_MOTOR_FLUX_EST_FREQ_Hz     (20.0)

//#define USER_MOTOR hobby_4p5T
#define USER_MOTOR My_Motor                 // It is uncommented here for use
//#define USER_MOTOR small_hobby
//#define USER_MOTOR Belt_Drive_Washer

Anyone got a clue?

Thanks, in advance.

David

  • you need to enumerate it above as well, ex:

    #define My_Motor                    104

    Other than that I can's see why it would error.  I usually get this because of a typo in USER_MOTOR or the name, but yours looks ok.

     

  • Do you mean this?

    //! \brief Define each motor with a unique name and ID number
    // BLDC & SMPM motors
    #define Estun_EMJ_04APB22           101
    #define Anaheim_BLY172S             102


    #define My_Motor                    223


    #define hobby_3p5T                  105
    #define hobby_4p5T                  106
    #define small_hobby                 107
    #define teknic_2310P                108
    #define hobbywing_ezrun_8p5T        109
    #define eflite_helicopter_420       110
    #define Bodine_34B3FEBL             114
    #define Pittman_elcom_5233B599      115
    #define medical_instrument          117

    Which is above this.

    //#define USER_MOTOR hobby_3p5T
    //#define USER_MOTOR hobby_4p5T


    #define USER_MOTOR My_Motor


    //#define USER_MOTOR small_hobby
    //#define USER_MOTOR Belt_Drive_Washer_IPM

    David

  • yes, that looks fine.

    I don't know what you did (you said things got messed up)

    but it sounds like the project settings got changed.  I would delete the proj_lab01 from CCS (right click, delete) and then re-import.

     

    I'm very sorry that you are having such simple problems.  These projects all import and build with no issues. I use them every day.

     

    May want to come to the InstaSPIN forum also...

    http://e2e.ti.com/support/microcontrollers/c2000/f/902.aspx

     

  • Ok, Thanks for the offer on the InstaSPIN forum, I'll do that.

    I'm ok with the problem thing, thanks for the kind words. Actually that was the first thing I did, delete, re-download, same problem. So I think I might be better off just reinstalling MotorWare and doing it again.

    I appreciate you looking at my code and confirming it as looking ok, means at least I knew where to look, and that's a good thing I'm learning.

    Thanks for your time Chris, I'll be back :)

    David

  • Ok, You won't believe this:

    I don't think it was the cause of the problem BUT, all I did was....

       //#define             There were several "define's in a row, all indented some, so I went and indented

       //#define             the one that wasn't just to make look neater. When I closed the project to delete it

    #define                I was if I wanted to save it because changes had been made. So I thought, You don't suppose....

       //#define             Yep, I saved it, opened, compiled it, and no errors. Go figure........

       //#define             I live a strange life.........

                                Did I read somewhere where defines had to be indented....?????

       #define               Anyway, just posted this in case it helps someone.