AnsweredAssumed Answered

STM32 PID Functions

Question asked by Inductive on Jun 25, 2014
Latest reply on Jun 30, 2014 by Inductive

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.