2014-06-25 12:49 AM
Hi,
I had a look at DoFullPID and DoPID functions in PID_C_stm32.c file and undrstood that variables like Error and Output are defined as uint16_t.I'm wondering how these variables deal with negative values? What if in: Error = Ref - In;Ref < In? What would be the value of Error? (see, it's unsigned, right?).Thanks in advance.2014-06-28 09:55 PM
2014-06-29 03:43 AM
Wouldn't it just wrap within the 16-bit number space like most other add/sub math?
2014-06-29 09:16 PM