POUs with the same name in two different devices do not work as advertised on documentation

sgronchi
2022-04-11
2022-04-12
  • sgronchi - 2022-04-11

    I have two display variant that share most of POUs.

    According to the documentation, "The POUs view includes objects that can be used throughout the project. Programming objects that are intended for a specific application must be inserted below the application object in the Devices view (device tree)."

    So I thought "Good, let's put PRGs with the same name but slightly different behaviours under different devices", but it seems that Codesys links (highlights in blue) only one of the couple, even though if I go into the Task and click "Change call" I can see that the called PRG belongs to the right Application.

    Is this the right approach? Am I missing something?

    Furthermore, is it a defined behaviour to have PRGs with the same interface (but different implementations) referenced by something in the POU dialog? A kind of duck-typing...

     
  • ludecus

    ludecus - 2022-04-12

    As i can see, the ApplicationA8 is activated and the ApplicationB6 is not. Therefore the compiler doesnt call those POUs.

     
  • sgronchi - 2022-04-12

    Thank you. I was sure I was forgetting something trivial πŸ˜…
    Last time I had multiple applications in the same project was 2019...

     

Log in to post a comment.