You are here: Core Reference > Coding > Logic > MAX

MAX

Function Name

MAX

Description

Outputs the same value as its greatest input.

Arguments

Input 1 - Input n {ANY}

For more information on the data types for the inputs and outputs, see Data Type Hierarchy.

Returns

Output {ANY}.

The MAX function outputs the same value as its greatest input. The output is of the same type as the input.

Example:

Function Block Diagram - MAX:

In this example, the inputs are constant values. The MAX function outputs the same value as its highest input. In this case, it has inputs of 2, 5, and 8 and so it outputs 8.

ST Program - MAX:

The syntax for a MAX function in an ST Program is:

  • Output := MAX (Input 1, Input n);

Where Output, Input 1 and Input n are defined as variables earlier in the ST program.


ClearSCADA 2015 R2