From my understanding, you are facing an issue in switching between states inside the chart, at the rising edges of the respective clock signals. You can achieve the same using 'Edge Detector' blocks. This block will generate a value one, when it detects a change in value in its input. The detection criteria can be made 'rising', 'falling' or 'either' . You can input 'clk1' and 'clk2' to two different edge detector blocks and the output from the blocks can be used to switch between the states 'on' and 'off' in the stateflow chart.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/713132/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/713137/image.png)