Hello Saman,
I believe you're encountering this issue because there are some blocks (clock and derivative blocks) inside of the Simulink Based State "model" which are continuous time based. That's not allowed in charts containing events. As replacements, you could use the Digital Clock block and the Discrete Derivative block.
After replacing these blocks, you will probably run into model loop errors. At that point you can probably modify your design so that you have both charts combined into one chart having two top level states executed in Parallel ("Parallel" decomposition as opposed to "Exclusive"). You will probably need to convert your input/output events to local events to coordinate the communication between the two top level states. Moreover, you might have to change new_kappa scope to data store memory in order to access it inside of your Simulink based state.
