Batch Mode Simulation : Simulating a Truth Table : Stepping through a Truth Table Simulation

Stepping through a Truth Table Simulation

In this section we complete a step-by-step simulation of the truth table.

1.
Execute a Go Step. A default transition is fired and we enter STATE_1.
2.
Go to the Monitor and generate an event E1. Initialize VAL_IN to 1 and set the condition C10 to TRUE.
3.
Execute a GO Step.
Note:
The Subroutine CALC1 Debug window appears.
Note:
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 conditions C2,C5,C10 in the model did not match the pattern in row 1 of the truth table. Remember, condition C2 maps to the parameter multiplied-by-2, C5 maps to the parameter multiplied-by-5, etc.
5.
Execute another mStep.

The simulation advances and row 3 is highlighted.
Note:
In the output column of row 3, the output contains X_DATA*10. The pattern of row 3 matches the current pattern of the model. Since X_DATA corresponds to VAL_IN and Y_DATA corresponds to VAL_OUT, VAL_OUT is assigned to X_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 for C2,C5 and C10 and observe their effect on the model.