Technical data
ASTi ACE Studio Components Reference Guide Rev. M DOC-01-TELAS-CRG-4
Copyright © 2014 Advanced Simulation Technology inc. 93
5.11. Latch
Summary: The Latch Component takes an input value and holds the number for a
specified time. The input can also be held indefinitely.
Description: The Latch Component is used for holding a control value inside the
model for use by other components. This allows an input, which varies over time,
to be stored temporarily and sent elsewhere in the model. The Latch is ideal for
sampling a rapidly changing control value such as the Random Number math
function, or for building state logic into the model in conjunction with the
Incrementer component.
The component reads the Input value and sets it as the output value. The component
will then hold that value for the duration of LatchTime. After LatchTime expires, a
new Input value will be taken and again used as the Output. Alternatively, setting
LatchTime to 0.0 will hold the Input value indefinitely once the Enable flag is set to
TRUE.
Control Inputs
Enable
Type Default Value
boolean FALSE
Description: Causes the component to hold and store the current
input value. When Enable is FALSE, the output is always equal to
the input. As soon as Enable turns TRUE, the Input value will be
held as the Output value, even if Input changes state. If LatchTime is
0.0, the Output will not change until Enable turns FALSE.
Modifier: XOR
Modifier_default: FALSE
Input
Type Default Value
float32 1.0
Description: The control value to be latched and held. Enable must
be TRUE for the input to be stored.
Modifier: Multiply
Modifier_default: 1.0
Control Outputs
Output
Type Default Value
float32 1.0
Description: The result of the Latch. If Enable is FALSE, this value
is equal to the Input. Otherwise, Output is equal to the value of Input
at the time that Enable is set to TRUE. If LatchTime is non-zero and
Enable is held to TRUE, the Output will re-latch after the duration of
LatchTime. This will continue to happen as long as Enable is TRUE.
Internal Parameters
LatchTime
Type Default Value
float32 0.0
Description: The time, in seconds, for the component to hold the
input value before latching a new value. If Enable goes FALSE
before LatchTime has completed, the Output will revert to the Input.
A LatchTime of zero will cause the component to store the Input
value as long as Enable is TRUE.










