PDA

View Full Version : reseting variable - what can produce in program execute



phoenix_1
- 5th November 2009, 20:25
At first look when my electronic work and in practice all is ok.
But I must know if I can find what it is?
If I have next variables in program:

setpoint var word

And when I reset as :



select case setpoint
case is >= 65534
setpoint = 0 ; reset setpoint
POSCNTH = 0
POSCNTL = 0
end select

At reset condition from 65534 to 0 case very very low shake in PID function on my controller.I know that becouse if I write next "case is >= 6250 "
case more frequently that thing.That extra small shake produced on hpwm -CCP1.
Here is full test code.
3772