Replies: 1 comment
-
Hello to all, I am still stuck with the definition of the finite state machines in modelica. I copied and paste the state machine example given by the help and I have the same error as above. When the model is flattened, it appears 2 equations and 1 variable. model PruebaEstados block State1 block State2 State1 state1; equation end PruebaEstados; What am I doing wrong? |
Beta Was this translation helpful? Give feedback.
-
Hello
I have the following modelica clock. I define two states inside a model.
I would like to know whats wrong in the following model
model ClassicalDAB
parameter Real Ts;
inner Boolean[4] H1;
equation
initialState(State1);
transition(State1, State2, sample(0, Ts), immediate=false);
transition(State2, State1, sample(0, Ts), immediate=false);
end ClassicalDAB;
The error is as follows :
[51] 15:51:07 Translation Error
[CargadorInalambrico: 274:5-274:63]: Expected State2 to be a component, but found class instead.
[1] 15:51:14 Translation Error
[CargadorInalambrico: 272:5-272:25]: Expected State1 to be a component, but found class instead.
What is wrong with the definition? I followed the example given by Mr. Elmqvist . I would like also to know if the condition of transition given by sampling the clock is also correct. My idea is to do the transition at the edge of every clock.
Regards,
Javier
Beta Was this translation helpful? Give feedback.
All reactions