IF IIR_A <> DATA_val[1] THEN IIR_B:=1-IIR_A; DATA_val[1]:=IIR_A ; DATA_val[2]:=IIR_B;END_IF
IF IIR_B <> DATA_val[2] THEN IIR_A:=1-IIR_B; DATA_val[1]:=IIR_A; DATA_val[2]:=IIR_B;END_IF DATA_OUT_PUT:=IIR_A*DATA_IN_PUT+IIR_B*DATA_val[3]; DATA_val[3]:=DATA_OUT_PUT; 六、FIR滤波
IF REAL_20 = 0 THEN //初始化数组
FOR i:=1 TO DATA_NUM BY 1 DO
DATA_10:=0.0;
END_FOR;
REAL_20:=1;END_IF; FOR i:=1 TO DATA_NUM BY 1 DODATA_11:=DATA_30;END_FOR;FOR i:=1 TO DATA_NUM BY 1 DO DATA_12:=DATA_10;END_FORFOR i:=1 TO DATA_NUM-1 BY 1 DO DATA_10[i+1]:=DATA_12;END_FORDATA_10[1]:=DATA_IN_PUT;DATA_OUT_PUT:=0;FOR i:=1 TO DATA_NUM BY 1 DO