0

I have multiple subsystems each of which have State machines "Stateflow". One subsystem has FSM, inside one state there is a simulink function that is supposed to start "simulink model representing an ODE" when in that state , a solution is observed until it reaches a threshold , the value of which shall trigger a transition of a state in a different subsystem

I used the Simulink function inside the stateflow as indicated in numerous tutorial, but the error I'm getting is the following:

'MatlabFunInChart/Chart/VelocityProfile/Cart/Integrator' has sample time '0'. Only constant (inf) or inherited (-1) sample times are allowed in 'function call' subsystem 'MatlabFunInChart/Chart/VelocityProfile'.

It looks like I'm missing something inside the simulink model that has to do with the integration.

Any ideas ?

Sam Gomari
  • 733
  • 4
  • 13
  • 37
  • Are you using a continuous, or a discrete time integrator? – Captain Future Sep 30 '16 at 14:35
  • I suggest to try following: in your Simulink function (called by the Stateflow chart) put a model reference block. Save your algorithm containing the integrator in a separate Simulink model and associate it with the model reference block. Configure this model reference block to use fixed step solver. No you can change the sample time of the (discrete time) integrator. Change it to one of the values as suggested (inf or -1). – Captain Future Sep 30 '16 at 14:44
  • I'm using continuous integration – Sam Gomari Oct 01 '16 at 06:58

0 Answers0