latch
Save value of an expression
Syntax
Description
latch(
saves the value of
x
)x
when the test step is entered and returns that value of
x
. The latch(x)
statement reevaluates the next
time the step is entered.
Examples
Use latch to Save a Value
Save the value of the torque in the variable latch_val
.
latch_val = latch(torque)
Tips
latch
signal generation statements can be used in the Test Sequence and Test Assessment blocks.latch
signal generation statements cannot be used in Stateflow® charts.