# LGF_StoreMinMax (FB / 3.0.1)

Overview

Author: Siemens Digital Industries

## Short description

This function reads-in a value of a variable at each call and outputs the maximum and minimum value that has been read in since the first call.
The evaluation can be reset if necessary. The block supports the data type LReal.

### Block Interface

| LGF_StoreMinMax (FB) |
--- | --- | ---
LReal |  |  | value |  | minValue |  |  | LReal
Bool |  |  | reset |  | maxValue |  |  | LReal

### Input parameter

Identifier | Data type | Default value | Description
--- | --- | --- | ---
value | LReal | 0.0 | Value to be compared with min/max
reset | Bool | false | TRUE: The min/max history is reset and the evaluation starts over again.

### Output parameter

Identifier | Data type | Description
--- | --- | ---
minValue | LReal | Minimum value since first call or `reset`.
maxValue | LReal | Maximum values since first call or `reset`.

## Change log

Version & Date | Change description
--- | ---
| 1.0.0 | Siemens Industry Online Support
| 19.08.2015 | First released version
| 1.0.1 | Siemens Industry Online Support
| 02.01.2017 | Upgrade: TIA Portal V14 Update 1 Code optimization
| 1.0.2 | Siemens Industry Online Support
| 17.08.2018 | Upgrade: TIA V15 Update 2
| 1.0.3 | Siemens Industry Online Support
| 23.11.2018 | Upgrade: TIA V15.1
| 1.0.4 | Simatic Systems Support
| 09.10.2019 | Regions, comments and constants are added
| 3.0.0 | Simatic Systems Support
| 23.04.2020 | Set version to V3.0.0, harmonize the version of the whole library
| 3.0.1 | Simatic Systems Support
| 04.02.2021 | Insert documentation