COMP_MAXMIN
COMP_MAXMIN function block is used for comparing a given value (VAL) with minimum (MIN) and maximum (MAX) threshold values, and provides outputs for the comparison result (OUT), percentage calculation (PERC), and status determination (STAT). It can be used for checking if a value is within a specified range, calculating the percentage of a value with respect to a range, and determining the status of a value based on the specified thresholds. It finds applications in industrial automation for tasks such as limit checking, percentage calculations, and status determination based on threshold values.
Inputs
VAL: This is an input parameter that represents the current value to be compared.
MIN: This is an input parameter that represents the minimum threshold value for comparison.
MAX: This is an input parameter that represents the maximum threshold value for comparison.
PARAM: This is an input parameter that represents an additional parameter for the comparison process.
Outputs
OUT: This is an output that represents the result of the comparison operation. It could be a boolean value (e.g., true or false) indicating whether the VAL is within the specified range defined by MIN and MAX.
PERC: This is an output that represents the percentage of VAL with respect to the range defined by MIN and MAX. It could be calculated as (VAL - MIN) / (MAX - MIN) * 100.
STAT: This is an output that represents the status or condition of the comparison. It could be a discrete value (e.g., “Below Min”, “Within Range”, “Above Max”) indicating the position of VAL with respect to MIN and MAX.