PID Library SetOutputLimits()?

Hello,

According to SetOutputLimits() Documentation SetOutputLimits(min, max) is such that min, max should be between 0-255. However, the PIDLibrary RelayOutputExample provides the line myPID.SetOutputLimits(0, WindowSize) where WindowSize is assigned to 5000.

I am wondering if anyone would consider elaborating or expanding any ideas or views I may be missing between the documentation and example discrepancy?

When running the example code windowStartTime increments and decrements within the 0-5000 range but I am unclear at what SetOutputLimits is expecting, what its units are, and what it is actually doing given that 5000 >> 255.

Thank you,

Wess

The 0-255 range recommendation is for default Arduino PWM outputs, on some Arduinos. The actual output range can be anything that makes sense to your controller.

You define the units of the PID output, again, something that makes sense considering your controller.