Maximum Capture (MAXC)
This information applies to the CompactLogix 5370, ControlLogix 5570, CompactGuardLogix 5370, GuardLogix 5570, CompactGuardLogix 5380, CompactLogix 5380, CompactLogix 5480, ControlLogix 5580, and GuardLogix 5580 controllers.
The Maximum Capture (MAXC) instruction retains the maximum value of the input over time and allows the user to re-establish a maximum as needed.
Available Languages
Ladder Diagram
This instruction is not available in ladder diagram logic.
Function Block
Structured Text
MAXC(MAXC_tag);
Operands
Function Block
Operand | Type | Format | Description |
MAXC tag | MAXIMUM_CAPTURE | Structure | MAXC structure |
MAXIMUM_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. |
Structured Text
Operand | Type | Format | Description |
MAXC tag | MAXIMUM_CAPTURE | Structure | MAXC structure |
See Structured Text Syntax for more information on the syntax of expressions within structured text.
Description
The MAXC instruction executes this algorithm:
Condition | Action |
Reset is set | LastMaximum = Reset value Out = LastMaximum |
Reset is cleared | If In > LastMaximum then update LastMaximum.
Out = LastMaximum. |
Affects Math Status Flags
No
Major/Minor Faults
None specific to this instruction. See Common Attributes for operand-related faults.
Execution
Function Block
Condition/State | Action Taken |
Prescan | EnableIn and EnableOut bits are cleared to false. |
Tag.EnableIn is false | EnableIn and EnableOut bits are cleared to false. |
Tag.EnableIn is true | EnableIn and EnableOut bits are set to true. The instruction executes. |
Instruction first run | N/A |
Instruction first scan | Set request to initialize the Maximum value with the current input. |
Postscan | EnableIn and EnableOut bits are cleared to false. |
Structured Text
Condition/State | Action Taken |
Prescan | See Prescan in the Function Block table. |
Normal Execution | See Tag.EnableIn is true in the Function Block table. |
Postscan | See Postscan in the Function Block table. |
Examples
If Reset is set, the instruction sets Out=ResetValue. If Reset is cleared, the instruction sets Out=In when In> LastMaximum. Otherwise, the instruction sets Out= LastMaximum.
Function Block
Structured Text
MAXCTag.In := input_value;
MAXCTag.Reset := reset_input;
MAXCTag.ResetValue := reset_value;
MAXC(MAXCTag);
result := MAXCTag.Out;
Provide Feedback