Detect data change to specified value in test step
hasChangedTo(
returns
u
,B
)true
if the value of u
changes to the value
B
. Otherwise, hasChangedTo
returns
false
.
Detect if x
has changed to a value of 10. This statement returns
true
when x
did not have value of 10 in the
previous time step and has a value of 10 in the current time step.
hasChangedTo(x,10)
hasChangedTo
statements can be used in the Test Sequence and Test
Assessment blocks and in Stateflow® charts.