HI!!
I'm initalization 3 global variables type struct in main.c This struct is defined in PID.h :
typedef struct { int dState; /* Last position input */ int iState; /* Integrator State */ int iMax,iMin; /* Maximum and Minimun allowable integrator state */ int pGain, iGain, dGain; /* integral, proportional & derivative gain */ }SPid ;
Is it correct to do it??:
SPid iA = {0,0,10000,-10000,1,1,0}; SPid iB = {0,0,10000,-10000,1,1,0}; SPid iC = {0,0,10000,-10000,1,1,0};
because my program work so well without this initialization but i need it for to do other task.
OK, everythings working ok. The problem was in the global initialitazion.
Thanks