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
  • javi,
    forget about your task for a moment. first of all you need conversion tables - for example, if you want to maintain constants speed of a system using a PID controller, assuming you have a speed sensor, you would translate your speed error (that is, set point minus actual speed) to desired current (based on the known properties of your system - speed control valve of some kind) and then again, convert that to a duty cycle (based on the properties on a valve that regulate the speed). and of course, this must be done for as long as speed control is required, so that the system can make continuous adjustments!
    please note that you do not need a task to do this. if you choose to use one - do not terminate it unless you want to stop closed loop control.

Reply
  • javi,
    forget about your task for a moment. first of all you need conversion tables - for example, if you want to maintain constants speed of a system using a PID controller, assuming you have a speed sensor, you would translate your speed error (that is, set point minus actual speed) to desired current (based on the known properties of your system - speed control valve of some kind) and then again, convert that to a duty cycle (based on the properties on a valve that regulate the speed). and of course, this must be done for as long as speed control is required, so that the system can make continuous adjustments!
    please note that you do not need a task to do this. if you choose to use one - do not terminate it unless you want to stop closed loop control.

Children
No data