Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

Use of blocks.sources.trapezoid

Use of blocks.sources.trapezoid

I'm a rank beginner in using OpenModelica. I've made a mechanics.translational model (called sls_m) with 2 springs, a damper, a fixation and a force,  and successfully simulated with a step force and with a sawtooth using blocks.sources.sawtooth. I've also successfully used blocks.sources.trapezoid with its default parameters (which create a square wave). However, when I start trying to turn it into a triangular wave by setting any of its parameters, I get the message 'Error: Variable rising not found in scope sls_m'. Can someone please tell me how I'm supposed to set these parameters, or where it's documented? Thanks. - Robert

Re: Use of blocks.sources.trapezoid

I believe this is related to https://openmodelica.org:8443/cb/issue/ … ation=true

While you think that you modify just one parameter, OMEdit modifies all of them. And some of the modifiers are now illegal because of Modelica scoping rules. You can work around this by going into the text view and removing the text that sets parameters that you did not modify (i.e. T_rising = rising, etc).

Re: Use of blocks.sources.trapezoid

That was exactly the problem and now my simulation is running fine! I'd seen the issue that you mention but hadn't understood the implications. Thanks very much for the quick reply.

There are 0 guests and 0 other users also viewing this topic
You are here: