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

Calling FB Multiple Times

ndzied1
2008-03-03
2008-03-05
  • ndzied1 - 2008-03-03

    I am trying to help someone troubleshoot a system and noticed that they have the same instance of a function block called 3 times in a ladder diagram POU.

    Are their any inherent problems with doing this? I have always called a FB only once and changed the input variables as required to do what I needed.

    This is also in a POU with a pretty fast cyclic call rate.

    Thanks,

     
  • Ralph Holz - 2008-03-05

    The code inside the FB is execute 3 times in this case. But there is no general problem in doing this.

    Sometimes it is senseful to call the same instance twice during a PLC cycle. But mostly it is simply a fault of the programmer who didn't understand the idea of building instances.

    Regards

    Ralph

     

Log in to post a comment.