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

Built-In Function(/Block) RisingEdge(/Edge) Not Working

Built-In Function(/Block) RisingEdge(/Edge) Not Working

Hello,

I need this RisingEdge function or block to give an one-time signal to my controller when the criteria from the ongoing measurement reaches to a certain value. The reason for that is because my hydronic system is slow responding (criteria reached: controller appoint a new set-point: wait for the new steady-state condition).

Attached picture: I modelled a simple system with boolean step source-block as input to the RisingEdge block. When the step response changes from false to true the RisingEdge has to react with one time true signal, right? But not. Can you please help me solving this issue?

http://i64.tinypic.com/293eo2o.jpg

Regards.
Hakan

Re: Built-In Function(/Block) RisingEdge(/Edge) Not Working

Hello Hakan,

I assume that the function does work well, but it is not visible in the plot view. The output is only a "One Shot", which means that its change from 0 to 1 and back to 0 happens for a very short time only. Can you try to connect the output to the S port of a Modelica.Blocks.Logical.RSFlipFlop? If it works, you should see the output of the FlipFlop change to 1 permanently.

Re: Built-In Function(/Block) RisingEdge(/Edge) Not Working

Briant wrote:


Hello Hakan,

I assume that the function does work well, but it is not visible in the plot view. The output is only a "One Shot", which means that its change from 0 to 1 and back to 0 happens for a very short time only. Can you try to connect the output to the S port of a Modelica.Blocks.Logical.RSFlipFlop? If it works, you should see the output of the FlipFlop change to 1 permanently.

I checked your message late so couldn't check RSFlipFlop. But by chance I could find the built-in block that I have been in need; that is (Modelica.Blocks.MathInteger.)TriggeredAdd so no need to deal with textual coding any more (except solving this integer input issue -I need Real- but may be not necessary).

So this TriggeredAdd exactly solves my need since it catches the moment when the condition reached(RisingEdge) and provides a new output value with this trigger (the condition satisfaction) continuously.

Thank you Briant.

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