Commit 1cd5969c authored by Claes Sjofors's avatar Claes Sjofors

CompPIDMode, set value limit fix

parent 9c3050f4
......@@ -207,10 +207,10 @@ void CompModePID_Fo_exec( plc_sThread *tp,
}
}
if ( co->SetVal < co->MinOut)
co->SetVal = co->MinOut;
else if ( co->SetVal > co->MaxOut)
co->SetVal = co->MaxOut;
if ( co->SetVal < co->MinSet)
co->SetVal = co->MinSet;
else if ( co->SetVal > co->MaxSet)
co->SetVal = co->MaxSet;
/* Transfer to outputs */
o->SetVal = co->SetVal;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment