eK:=M_Value-S_Value;
OUT_1:=INT_TO_REAL(Pre_OUT);
eK_0:=DINT_TO_REAL(eK);
OUT_0:=OUT_1+PID_P*(eK_0-eK_1)+PID_I*eK_0+PID_D*(eK_0-2.0*eK_1+eK_2);
IF OUT_0>OUTRange_Max THEN
OUT_0:=OUTRange_Max;
END_IF;
IF OUT_0<OUTRange_Min THEN
OUT_0:=OUTRange_Min;
END_IF;
eK_2:=eK_1;
eK_1:=eK_0;
PID_OUT:=REAL_TO_INT(OUT_0);
Pre_OUT:=PID_OUT;
žéʲôß@‚€(g¨¨)STÕZÑÔÔÚGx developerÀïÃæ¿ÉÒÔʹÓã¬ÔÚGx work2ÀïÃæ¾Í²»ÄÜʹÓÃÁË¡£
ÎÒ×Ô¼º°l(f¨¡)¬F(xi¨¤n)µÄÊÇGx developer ÀïÃæµÄ”µ(sh¨´)“þ(j¨´)׃Á¿Åcwork2µÄ”µ(sh¨´)“þ(j¨´)׃Á¿Óвî„e¡£
Çó´óÉñŽÍæ¡£ÎÒÏë°Ñ¸ÉßM(j¨¬n)work2ÀïÃæ