Minimum Capture (MINC)
The Minimum Capture (MINC) instruction retains the minimum value of the input over time and
allows the user to re-establish a minimum as needed.
Available Languages
Ladder Diagram
This instruction is not available in ladder diagram.
Function Block
This instruction is not available in function block.
Structured Text
MINC(MINC_tag);
Operands
Structured Text
Operand | Type | Format | Description |
|---|---|---|---|
MINC tag | MINIMUM _CAPTURE | structure | MINC structure |
MINIMUM_CAPTURE Structure
Input Parameter | Data Type | Description |
|---|---|---|
EnableIn | BOOL | Enable input. If cleared, the instruction does not execute and outputs are not
updated. Default is set. |
In | REAL | The analog signal input to the instruction. Valid = any float Default = 0.0 |
Reset | BOOL | Request to reset control algorithm. The instruction sets Out = ResetValue as long
as Reset is set. Default is cleared. |
ResetValue | REAL | The reset value for the instruction. The instruction sets Out = ResetValue as long
as Reset is set. Valid = any float Default = 0.0 |
Output Parameter | Data Type | Description |
|---|---|---|
EnableOut | BOOL | Enable output. |
Out | REAL | The calculated output of the algorithm. |
See Structured Text syntax for more information on the syntax of
expressions within structured text.
Description
The MINC instruction executes this algorithm:
Condition | Action |
|---|---|
Reset is set | LastMinimum = ResetValue Out = ResetValue |
Reset is cleared | If In < LastMinimum then update LastMinimum. Out = LastMinimum. |
Affects Math Status Flags
No
Major/Minor Faults
None specific to this instruction. See Common Attributes for operand-related faults.
Execution
Structured Text
In Structured Text, EnableIn is always True during a normal scan. If the instruction is in
the control path activated by the logic, it executes.
Condition | Action |
|---|---|
Prescan | EnableIn and EnableOut bits are cleared to false. |
Normal Execution | EnableIn and EnableOut bits are set to true. The instruction executes. |
Postscan | EnableIn and EnableOut bits are cleared to false. |
Examples
If Reset is set, the instruction set Out=ResetValue. If Reset is cleared, the instruction set
Out=In when In < LastMinimum. Otherwise, the instruction sets Out= LastMinimum.
Structured Text
MINCTag.In := input_value; MINCTag.Reset := reset_input; MINCTag.ResetValue := reset_value; MINC(MINCTag); result := MINCTag.Out;
Provide Feedback