AVG

AVG

PROGRAM AVG_DEMO
   VAR
     REAL1,REAL2,REAL3,REAL4: REAL;
  END_VAR
 REAL4:= AVG(IN1:=REAL1, IN2:=REAL2, IN3:=REAL3);
END_PROGRAM

Returns the arithmetic average of all input values. The number of inputs may be higher than 2.

InputType Description
IN1 ANY_NUMInput value
IN2 ANY_NUMInput value
OutputType Description
ANY_NUMOutput value

  • © Energocentrum Plus, s.r.o. 2017 - 2024