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

  1. Set the number of inputs with the Input size control to match how many values you will provide.

  2. Connect numeric sources (or a list of numbers) to the Values inputs.

  3. Read the Number output to get the maximum value and Index to get its position.

  4. Feed those outputs to other blocks to drive logic, visualization or logging.

πŸ’‘ Tips and Tricks

  • Use Get Element to extract a specific value from a list before or after the Maximum block when working with batched data.

  • Combine with Batch Processing and Get Batch Size when working on large lists or streaming data to lower memory usage and control how values are fed to the block.

  • Send numeric outputs to Scope to visualize live value streams and easily spot trends or spikes.

  • To compute a range, use Minimum alongside this block and then Subtract the results to get maxβˆ’min.

  • Store results with Data Memory if 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 Index corresponds to the first occurrence of the maximum.

  • Non-numeric inputs will prevent meaningful results β€” verify source blocks provide numbers.

Last updated

Was this helpful?