Do you have an example about the event DSL function?

Category:
Dynamic Simulation
Answer

In the attached example a counter is implemented in DSL using the event function. This function creates in this case a parameter event over the same DSL model every time the argument "yo" changes sign from negative to positive.

The syntax of the event function is: event(1,yo,'name=this dtime=0.0 value=cadd variable=counter')

the variable named "counter" of the same DSL model ("this") will be set to value "cadd" within a dtime of 0.0 seconds. For more information refer to the User Manual section DSL Special Functions.

 

Tags
Back