In this section we complete a step-by-step simulation of the truth table.
1.
2. Go to the Monitor and generate an eventE1
. InitializeVAL_IN
to1
and set the conditionC10
toTRUE
.
3. Execute a GO Step.
Note: The Subroutine CALC1 Debug window appears.
4. Clicking mStep to execute a microstep.
The second row of the truth table is highlighted. The execution advanced to the second row of the truth table because the conditionsC2
,C5
,C10
in the model did not match the pattern in row 1 of the truth table. Remember, conditionC2
maps to the parameter multiplied-by-2, C5 maps to the parameter multiplied-by-5, etc.
5.
Note: In the output column of row 3, the output containsX_DATA*10
. The pattern of row 3 matches the current pattern of the model. SinceX_DATA
corresponds toVAL_IN
andY_DATA
corresponds toVAL_OUT
,VAL_OUT
is assigned toX_DATA*10
(or, ten times one).
6. Execute the Run-To-End from the Subroutine CALC1 Debug window. In the Monitor window,VAL_OUT
should change to 10.
7. Execute a Go Step. You are returned to State 1. At this point you can experiment with different values forC2
,C5
andC10
and observe their effect on the model.