This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Global Var

HI!!

I declared 3 global var, i call it inside diferent task and every execution this var should be updates but not to do it.
I have a 8051 under evaluation board.
Maybe can be a problem of my small micro?
What do u think about this?

Thanks

Parents Reply Children
  • The data type is :

    typedef struct {
    
    real dState;            /* Ultima posicion             */
    real iState;            /* Estado del integrador       */
    real uMax,uMin;     /* Saturacion del actuador     */
    real Kp;                    /* Ganancia proporcional       */
    real Ti,Td;                     /* Cte, tiempo integral y derivativo        */
    real Ts,Tt;                     /* Periodo muestreo, Cte. tiempo tracking   */
    real Kwindup;           /* Cte. antireset windup                    */
    
    } SPid;
    
    

    The funtion implementation i think that is not important to resolve my problem. This is the top of the funtion:

    real UpdatePID (SPid *pid, real SP, real PV, unsigned int AUTO,real Uman) reentrant;
    


    real is int data type