Maximum
This function block finds the largest value among a configurable set of numeric inputs and returns both that value and its position.
π₯ Inputs
Values
One or more numeric values (provided as individual inputs or a list). The number of available input sockets can be adjusted using the control below.
π€ Outputs
Number
The highest numeric value found among the provided inputs.
Index
The position (zero-based index) of the highest value within the provided inputs.
πΉοΈ Controls
Input size
Choose how many numeric inputs are available (for example, from 2 up to the configured maximum). Changing this adjusts how many values you can feed into the block.
π¨ Features
Dynamic input sizing β easily change how many numeric inputs the block accepts to match your data layout.
Dual outputs β returns both the maximum value and its corresponding index so you can use either result in downstream logic.
Works with lists or individual value sockets when available.
π Running mechanism
When the flow runs, the block examines the connected numeric inputs and determines the maximum value and its position. Only active/connected inputs are considered. If multiple inputs share the same maximum value, the index for the first occurrence is returned.
π Usage Instructions
Set the number of inputs with the
Input sizecontrol to match how many values you will provide.Connect numeric sources (or a list of numbers) to the
Valuesinputs.Read the
Numberoutput to get the maximum value andIndexto get its position.Feed those outputs to other blocks to drive logic, visualization or logging.
π‘ Tips and Tricks
Use
Get Elementto extract a specific value from a list before or after theMaximumblock when working with batched data.Combine with
Batch ProcessingandGet Batch Sizewhen working on large lists or streaming data to lower memory usage and control how values are fed to the block.Send numeric outputs to
Scopeto visualize live value streams and easily spot trends or spikes.To compute a range, use
Minimumalongside this block and thenSubtractthe results to get maxβmin.Store results with
Data Memoryif you need to freeze or hold a maximum value for later comparison.
π οΈ Troubleshooting
No valid result: ensure at least one numeric input is connected.
Unexpected index when values tie: the returned
Indexcorresponds to the first occurrence of the maximum.Non-numeric inputs will prevent meaningful results β verify source blocks provide numbers.
Last updated
Was this helpful?