Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

Oscat bumpless pid

2022-11-09
2022-11-18
  • aivarasutkus - 2022-11-09

    Hi.
    Im working with PID controller from oscat basic library 3.3.4.0
    I using CTRL_PID. When i turn it into manual mode change value and then set back into automatic, controler begins to control from last frozen value. How to implement bumpless transition? For some reason can't find any one doing smtg similar. I tried to overwrite internal y value, but i can't acces internal DB of this controller data type.
    Any ideas? Or any other pid controllers that have such function?

     
  • ignat - 2022-11-18

    OSCAT is an open library. So you can take source code from CTRL_PID and update in with overwriting function inside the block (not from outside like you tried already).

    1) right click on CTRL_PID and Browse -> Go to Definition
    2) Copy code to your new MY_CTRL_PID
    3) overwrite or initialize regulator output with man value when transition from one mode to another
    4) ...
    5) PROFIT!

    I know easier to say when make, but you have to when looking for such specifics.
    Honestly, was looking for such functionality too. Maybe you will be the one who publish your own library :)

    UPD1: did you check Codesys Utils Library ? I hear there was some updates for controllers (PID and etc.), maybe they have smth like this

     

    Last edit: ignat 2022-11-18
  • sgronchi - 2022-11-18

    Utils.PID provides bumpless transfer, however one could also look into Control Loop Library (awesome BTW).

     

Log in to post a comment.