XenoGuard Documentation

Maximum

Actions » Programming » Number Operation » Comparison » Maximum


The action Maximum retrieves the highest value after comparing two numbers and stores the number in Result of the result list. The following number types are allowed: Floating PointSigned Number, and Unsigned Number.



[-] Hide
  1. Open the Programming node in the Workspace Explorer.
  2. Open the Number Operation node.
  3. In the Comparison node, select the Maximum action.

Parameters:

The action has the following input parameters:


NAME DESCRIPTION
Number Type
Specifies the data type to be used for a number

Allowed Context Scopes
 [Fixed, Local, Global]
Allowed Values [Floating Point, Signed Number, Unsigned Number]
Number 1
The first number to be compared

Allowed Context Scopes
 [Fixed, Local, Global]
Allowed Context Types [Variable, Parameter, Enum]
Number 2
The second number to be compared

Allowed Context Scopes
 [Fixed, Local, Global]
Allowed Context Types [Variable, Parameter, Enum]

Results:

The action returns the following results:


NAME
DESCRIPTION
Result Contains the highest value after comparing the two numbers

Allowed Context Scopes [Fixed, Local, Global]
Allowed Context Types [Variable, Parameter]

Warning The number type set in the action Maximum determines the data type of its Result even if the variables and/or parameters that were set for the numbers 1 and 2 are of different data types.

Example 1 (Finds the highest value after 2 tests):

This example compares the value of two local SpinTest 1 and SpinTest 2 variables with a Text data type. The Maximum action retrieves the number with the higher value and sets its data type as a Signed Number. The result of comparing the two numbers is then output via Write Text.

See other comparison operations:

Minimum
Between