Draining tanks example

This simple example illustrates the Watch State Chart Variable panel using the draining tanks model. In this model, the state machine controls the tank level.

1.    Click Examples > Applications > StateCharts.

2.    Click on stateChartTank.

 

3.    Click State Charts > Quick Watch to open the Watch State Chart Variables panel.

4.    Click  and select the variable named level.

5.    Click OK, or press ENTER.

The variable level is added to the Watch State Chart Variables panel.

6.    Repeat steps 3 – 5 to add the variable named state.

7.    Start the simulation.

8.    Click the On/Off button block to toggle pumping and draining states and visualize the water level in the plot, as well as monitor the level and state values in the Watch State Chart Variables panel