en-us_commands:reference:ipiditermlimit
This is an old revision of the document!
Table of Contents
IpidItermLimit()
IpidItermLimit() limits the minimum and maximum of the PID integral term.
void IpidItermLimit(uint8_t id, float iMin, float iMax)
Commands
| Command | Arguments | Return Value | Operation |
|---|---|---|---|
IpidItermLimit(id, iMin, iMax) | uint8_t id — PID loop number. Supports 0 ~ 255float iMinfloat iMax | void | Limits the minimum and maximum of the PID integral term. |
Example
bool IpidSet(uint8_t id, float kp, float ki, float kd, unsigned long sampleMs, float outMin, float outMax); float IpidRun(uint8_t id, float pv, float sv); void IpidReset(uint8_t id); void IpidReverse(uint8_t id, bool reverse); void IpidItermLimit(uint8_t id, float iMin, float iMax); float IpidOutput(uint8_t id);
Precautions
- PID output can directly affect field equipment. Begin testing with a low output range and small gains.
IpidRun()retains the previous output until thesampleMsinterval has elapsed. It may be called repeatedly inloop().- The integral term is automatically constrained by the output limits to reduce windup. Use
IpidItermLimit()if additional limits are needed. - The derivative term is calculated from the PV change to reduce abrupt jumps caused by setpoint changes.
IpidReset()resets the integral term, previous PV and previous output value.- Use the same
idfor only one control loop.
en-us_commands/reference/ipiditermlimit.1788785567.txt.gz · Last modified: by 127.0.0.1
