LIMIT

LIMIT

PROGRAM LIMIT_DEMO
 VAR
     REAL1,REAL2: REAL;
  END_VAR
 REAL2:= LIMIT(IN:=REAL1, MN:= 0, MX:=10); //LZE VOLAT I JAKO REAL2:= LIMIT(REAL1, 0, 10)
END_PROGRAM

Limits the output value in the ranges from MN (minimum) to MX (maximum). The function can be also described as MIN(MAX(IN,MN),MX).

InputType Description
IN ANY_ELEMENTARYInput value
MN ANY_ELEMENTARYMinimum value
MX ANY_ELEMENTARYMaximum value
OutputType Description
ANY_ELEMENTARYOutput value

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