#step=GS1
ACTION (P) :
 h := 0.1;
 u := 0.0;
 i := 0.0;
 e := 0.0;
 filter := 0.0;
END_ACTION;
#end
#step=GS2
ACTION (P) :
 iOld := i;
 eOld := e;
 filterOld := filter;
END_ACTION;
#end
#step=GS8
ACTION (P) :
 sampla := false;
END_ACTION;
#end
#step=GS3
ACTION (P) :
 e := real(bor) - real(y);
END_ACTION;
#end
#step=GS9
ACTION (P) :
 sampla := true;
END_ACTION;
#end
#step=GS10
ACTION (P) :
 i := iOld + h * e;
 filter := 0.8 * filterOld + 0.2 * e;
 d := (filter - filterOld) / h;
 u := KP * (e + i / TI + d * TD);
END_ACTION;
#end
#step=GS11
ACTION (P) :
 u := 32000.0;
END_ACTION;
#end
#step=GS12
ACTION (P) :
 u := 0.0;
END_ACTION;
#end
#step=GS5
ACTION (P) :
 uAna := ana(u);
END_ACTION;
#end
#step=GS6
ACTION (P) :
 uAna := 0;
END_ACTION;
#end
