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
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,
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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,
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