RAMP_REAL FB is retaining my output value when i try to re use the FB

grant32
2024-07-29
2024-07-29
  • grant32 - 2024-07-29

    Hello,

    I'm relatively new to PLC programming. I am trying to creat a ramp down function, I have an example here of what I am using. I can get the function to work, the issue is that the OUT (variable3) value is being held by the FB so after I use it once it no longer works.

    In this example i set variable3 to 100 and the rest is as seen, over the course of a minute it ramped down to 10 (as desired). But when I deenergize TEST_START, set variable3 back to 100, and then re-energize TEST_START it immediately jumps back to the previously held value 10.

    The reset on this block just pauses the function and holds the last OUT. In my case I will need the function to start OUT at a set value, ramp down to the IN (variable2) value, and then accept a new OUT value to ramp down next time the block is energized.

    Hopefully this made sense, if anyone has any advice that would be awesome!

     
  • TimvH

    TimvH - 2024-07-29

    I think, that if you set the timebase to T#0s, that it will be reset.
    But you can also make your own ramp down with a Timer (make sure the PT time is not T#0s):

     

    Last edit: TimvH 2024-07-29

Log in to post a comment.