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

Ladder: how to use second output of FB

neurot
2015-05-29
2015-05-29
  • neurot - 2015-05-29

    Hello,

    How can I use a second output on a Function Block in Ladder? I tried every key combination, tested all right-mouse commands,...
    Someone already advised Ctrl-A or "Assign" command, but this doesn't work.
    I'm not able to connect a relay "()" to the second output on a FB.
    http://s5.postimg.org/4s5arcp5j/Ladder.png
    The red line is the relay I want to connect. I use Codesys 2.3.

    Many thanks.

     
  • Anonymous - 2015-05-29

    Originally created by: scott_cunningham

    Coils are just BOOL variables. In V3, you can just type the name at the output pin (works, but you don't see the coil symbol). Not sure if this is the case in V2.3

    Example in V3:

    You can make a second rung with a contact "C2C3.Out2" and coil:

    You could also switch to FBD, which handles multiple inputs and outputs with ease (CoDeSys can even switch it: View -> View as function block diagram):

    IMG: v3.png

    IMG: v23.png

    IMG: fbd.png

     
  • neurot - 2015-05-29

    Both of your two first solutions seem to work, thanks a lot! I really searched hours for this.
    I use Wago controllers, and Wago only supports Codesys v2.3. I cannot understand a professional programming environment is still 10 years behind.

     
  • Anonymous - 2015-05-29

    Originally created by: scott_cunningham

    It is a big jump from V2.3 to V3. My company switched their product offering to V3 about 3 years ago - lots of great features and possibilities for the coder. But it also required a lot of work to support the platform switch. There are plenty of brands supporting V3, so if you get tired of waiting, vote with your wallet, as they say.

     
  • shooter - 2015-05-29

    Also in Version 3 you must have 1 and only 1 output.
    same btw for input this must be a boolean.
    It is something from IEC 61131. and i always try to program using standards.

    The solution is given above.
    and yes you can mix FBD with ladder, however it is not standard.
    I write my safety circuit always in ladder, that way i am sure of the settings.

     

Log in to post a comment.