The Last Value (Enum) logic block holds the value that its input (Enumeration [Enum] type) had at the end of the previous execution of the control logic for use by the current execution. Use this block to compare the current value of a variable with the value from the last execution.
We do not recommend connecting multiple Last Value blocks. You cannot use Last Value blocks to create a moving average because the execution interval of the control logic is not periodic. If a signal requires filtering or you need a moving average, use the EWMA block.
We do not recommend using the Last Value blocks in an attempt to integrate a value. Use the Totalization (Analog Integration) block to integrate a value.
When the control logic completes its execution and a new change (value, reliability, or command) gets written to the input of a Last Value block (causing the current value of the input to change), the block requests to execute again immediately. If the logic is designed so that the input to the Last Value block changes every execution, an infinite loop is created resulting in impaired performance of the controller. Avoid configuring the Last Value block in this manner.
If this block does not operate continuously (that is, it is placed in the state section of a Hybrid Activity), it starts at its Default Value when re-enabled. One additional constraint is that connections from Hybrid Activity Inputs are not allowed to be made directly to the Input of Last Value block in one of its State Sections. You cannot directly connect an Input to a Last Value block within the State section of a Hybrid Activity.
For more Last Value information, see the Timing, Output Control Modules, and Timing, Setpoint Reset by OA sections. The following table describes the inputs and outputs of the Last Value (Enum) logic block.
Name |
Data Type |
Exposed for Connection by Default |
Description |
Default Value |
---|---|---|---|---|
Inputs |
||||
Input |
Enum |
Yes |
Passes the Default Value of this Input to the Present Value on the first execution after startup or being enabled. Otherwise, the Current Value of the Input is passed to the Present Value. |
1st Enum |
Outputs |
||||
Present Value 1 |
Enum |
Yes |
Indicates the output of the block. On the first execution, the Reliability of the Present Value is Reliable. On subsequent executions, the Reliability of the Present Value reflects the Reliability of the Input. The Present Value retains its previous value on internal error. |
1st Enum |
Properties |
||||
Include State Status |
Boolean |
N/A |
Indicates if the block passes or drops the command signature from the input. |
True |