-
Notifications
You must be signed in to change notification settings - Fork 227
Open
Description
This two lines of code are made for DIRECT type of pid controller. What if user wants reverse type? Output will never step in other direction. We have to swap +'s and -'s.
//oscillate the output base on the input's relation to the setpoint
if(refVal>setpoint+noiseBand) *output = outputStart-oStep;
else if (refVal<setpoint-noiseBand) *output = outputStart+oStep;
To this:
//oscillate the output base on the input's relation to the setpoint
if(refVal>setpoint+noiseBand) *output = outputStart+oStep;
else if (refVal<setpoint-noiseBand) *output = outputStart-oStep;
Metadata
Metadata
Assignees
Labels
No labels