Exercise 11 - Simulation
You use the Simulator to validate the dynamic behavior for part of the design.
1. Open the statechart 'REAR_DEFOG_RELAY_MGMT_BHVR' and select Tools > Simulation. The Simulation Execution window opens. Refer to the following figure.
2. Select Displays > Monitors from the Simulation Execution window. The Monitor window allows you to add model elements into the form to edit and/or view their value.
3. Select Edit > Add from the Simulation Monitor window. The Element Selection for Monitor window opens.
4. Click All for the element type and then click Filter.
5.
Note: Arrange the statechart, Simulation Monitor, and Simulation Execution windows within your system monitor so that they are all assessable. Minimize any other open windows.
6. Click GoStep from the Simulation Execution window. The default transition within the statechart is highlighted. Select GoStep again. You should notice that you are now only in the default state. If you continue to select GoStep, no steps are taken.
7. Click on the Value field for the Name 'RDEFOG_ON_STATUS' in the Simulation Monitor window. You should see that the value changes from FALSE to TRUE.
8. Click GoStep again and view the changes within the statechart.
9. Click on the value for 'LOAD_SHED_IN' and change the value. Click GoStep again. This should place you into the 'RD_RELAY_OFF' state.
10. The trigger that takes you from the 'RD_RELAY_OFF' state to the 'RD_RELAY_ON' state is based upon the passage of time. Click AutoRun to start simulating as in real-time mode.
11. The model should now be transitioning to and from the states 'RD_RELAY_OFF' state to the 'RD_RELAY_ON'. Click Pause icon to temporarily halt the simulation execution.
12. Select File > Restart Simulation to restart the simulation from the Simulation Execution window.
13. Using the previous methods, simulate and study the model using different scenarios of the simulation. Also try using the various Step Operations provided by Rational Statemate and notice the effect on the simulation.