SetWithinPLCopen motion icon

FunctionClosed A function calculates a result according to the current value of its inputs. A function has no internal data and is not linked to declared instances. - Force a value when inside an interval.

Inputs

IN : ANY Input
MIN : ANY Low limit of the interval
MAX : ANY High limit of the interval
VAL : ANY Value to apply when inside the interval

Outputs

Q : ANY Result 

Truth Table

In Q
IN < MIN IN
IN > MAX IN
MIN < IN < MAX VAL

Remarks

The output is forced to VAL when the IN value is within the [MIN ... MAX] interval. It is set to IN when outside the interval.