Quote:
Originally Posted by j.cole
@Ether You can't simply put the encoder into the PID process variable you have to find the speed of the motor using the encoder and put that into there. Correct? Unless I'm missing something.
|
You have to scale the process variable (the encoder signal) and/or the setpoint so they have the same range and offset.
Examples:
If your process variable (encoder signal) has been scaled to represent RPM, then you have to scale your setpoint so it also is in RPM (and not, say, -/+1).
Or you can do it the other way. If your setpoint has been scaled so that it has the value +1 when you want MaxRPM, and it has the value -1 when you want -MaxRPM, then you should scale your encoder signal so that it outputs +1 when the device it is measuring is spinning at MaxRPM, and it outputs -1 when the device it is measuring is spinning at -MaxRPM.