Page 1 of 1

Chaneg event in simulation

PostPosted: Mon Mar 09, 2015 9:14 am
by baudouin.martin@gmail.com
Hi everybody,

I'm just testing the possibility to use the Change Event in a simulation. This is very simple for the moment. I just created a block called "System" and its main behavior is a state machine. It's got a value property called... "value". At the beginning, the "value" equals 0. I only draw the machine in the file attachment. When I start the simulation, the transition is always fired as if the "value" doesn't equal 2. Is my syntax correct ? Does MD understand my expression ? (I saw that the language was English...).

Thanks in advance.

Regards.

B. MARTIN

Re: Chaneg event in simulation

PostPosted: Mon Mar 09, 2015 9:15 am
by baudouin.martin@gmail.com
sorry for the wrong image. Here is the good one...

Re: Chaneg event in simulation

PostPosted: Tue Mar 10, 2015 3:51 am
by baudouin.martin@gmail.com
Hi,

I answer to my question. In fact, I have to write when(value1==2) in my event. I managed to do it work in a simulation. value1 is an attribut of a block. When I started a simulation with context, ce transition was not fired until I chnaged the value to 2. But when I'm trying now to do the same in a newer project, the transition is always fired whatever is the value ! I changed so many things that I don't know what I did to make it work before. Any ideas ?

Thanks.

Regards.

B. MARTIN

Re: Chaneg event in simulation

PostPosted: Mon Mar 16, 2015 8:42 pm
by arnon_l
Hello,

For CST 17.5, please make sure that the language of your change expression is "javascript", "js", or empty.
I think it is a cause of your problem.

Kind regards,