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.

svgen_dq.h

Other Parts Discussed in Thread: CONTROLSUITE

Hi

I want to ask few question for my understanding i hope some one can answer  in some files such as  svgen_dq.h  for motor control application

1) why argument to function (of function pointer calc)  field is left empty(if left empty  function expects an integer while later we pass pointer to structure as argument to this function)

void (*calc)();     // Pointer to calculation function  ,      declared as member of SVGENDQ structure

 

2) Why a pointer    SVGENDQ_handle   to structure is declared which is never used while its declared as

typedef SVGENDQ *SVGENDQ_handle 

 

 

3)   Pointer to function which is a member of strucutre SVGENDQ  is initialized here as     (void (*)(Uint32))svgendq_calc  i dont understand this syntax please help, i thought only svgnedq_cal        as name of function was enough.

   #define SVGENDQ_DEFAULTS { 0,0,0,0,0,0,0,0,0,0,15,{1,5,4,6,2,3}, \
(void (*)(Uint32))svgendq_calc }

 

4)Document svgen_dq.pdf  in  \DMC\c28\v32x\lib\doc  on  page 3 shows that   svgendq_calc receives a pointer to structure so in my understanding its prototype may  be like

void svgendq_calc(SVGENDQ *);  but it is void svgendq_calc(SVGENDQ_handle);     


Regards

Shakeel

  •   we stopped using that version a couple years ago, the latest are in controlSUITE and in macro format

    C:\ti\controlSUITE\libs\app_libs\motor_control\math_blocks\v3.1

    I do have a new version (non-macro)  as well if you really need to use a function

  • hi chris

    Thanks for answer, though i did not find exact answer to my question, but i got to know about new library. I am working with ccs 3.3 and bios 5.33.06. can i use new libraries with my existing setup by just replacing the old ones as you mentioned about control SUITE, and non macro version. Please help me how can i migrate to new libraries and what should be the motivation to move on to new libraries.

    Shakeel

  • you can use either library, there is nothing wrong per se with either, just that the new ones are "supported" by TI applications engineers.

    if you downloaded controlSUITE you will also notice that there are MANY motor control kits with several different motors and techniques shown in each one. Each of these use the motor_lib so they should provide a good reference for you.  Each or the motor_lib modules has documentation that is usually pretty good. Some of these are being updated  over the next 6 months and you will also see motor_lib applied to other MCU families at TI shortly.

     

  • Hi Chris,

    I have some code that uses the non macro versions of the digital motor control library.  I could not find these available in the present control suite. Could you help me by providing some link to the previous versions that used function pointers.


    Regards.

  • are you talking about the pre-controlSUITE download for DMC_LIB?

    Look under Legacy Motor Control Solutions
    www.ti.com/.../applications.page