Skip to content

"Dropping" Function / Function Blocks onto "EN" Pin

I am very glad to see EN / ENO pins are FINALLY exposed; now many functions can finally be used in ladder.

How can you "drop" a function/function block onto a rung with the EN pin connected? For example, I can drag/drop a MOVE onto the rung, but it always connects to the first input pin (instead of EN pin).

Without the ability to drop on the EN pin, PLCNext seems to "prevent" you from using blocks like "ADD" in a rung of ladder.

Comments

  • I can drop an ADD block or a MOVE block on to a Ladder (LD) code sheet, and if I move it close enough to the end of an open rail, the end of the rail automatically connects to the EN input on the block. I am not sure what I am doing differently?

    I can email you a video showing this behaviour, if you want (please let me know).
  • As far as I understand the problem you cannot add functions to an existing ladder rung because the EN is not evaluated as a valid input.
    In case of the ADD function it seems to prevent it because a BOOL (ladder rung) cannot be connected to an ANY_MAGNITUDE (ADD.IN1).
    It is even more cumbersome when you try to add functions to ladder rungs in NOLD worksheets.
  • I'm still not sure what the problem is (sorry).
    I would love to post a screen shot or video, but here's a description of what I did:
    • Create a new code sheet of type LD.
    • Add a left power rail.
    • Add a Contact and create the variable.
    • Add an ADD function, with the output of the Contact connected to the EN input on the ADD block.
    • Assign the two inputs of the ADD function as 1 and 2 (constants).
    • Assign the output of the ADD function to a new variable called "sum".
    • Add a Coil and connect the ENO output of the ADD function to the input of the Coil.
    • Add a right power rail connected to the output of the Coil.
    This builds OK.

    What am I missing?
  • |
    | |
    ( )
    |
    ^
    Insert the ADD via drag and drop or intellisense

    @Martin PLCnext Team I would expect that the ADD can be added directly on existing ladder rungs and it automatically connects the EN/ENO pins.

    That's my take on it but maybe I did not understand Steve's problem at all.
  • Damn.... drawing ladder rungs does not work well... The upper post was meant to include a beautifully designed ladder rung. Try to add a function on an existing connection
  • Ah, OK, I see the issue.

    If you drop a new Contact somewhere else on the page, that also cannot be dragged on to an existing rung.

    A solution would be for the tool bar at the top to include a blank "function" object, that you can insert into an existing rung like you can do with the "contact" object on the toolbar. Then after inserting the blank function into an existing rung, you could pick the function name, maybe from a drop-down list.

    I will raise this as a feature request with the developers.

    In the mean time, it is possible to drop the function somewhere else on the page, and then connect the EN and ENO on the function into the existing rung with a bit of messing.
  • You can already add any object to existing connections by pressing SHIFT when dragging but it is not smart enough to detect that EN/ENO can be connected to the rung. It simply tries to connect the first regular input/output which fails for the ADD because the data types don't match.
  • Ooh, interesting. (you can tell I'm not a ladder programmer. :wink: )
    I will add that comment to the feature request.
    Thanks!
  • Sorry for the delay in response; I was wrapped up in other problems.
    Martin: I was able to replicate what you did. Normally, I use the NOLD instead of LD.

    As @DivisionByZero mentioned, the problem comes when you try to drop a block (e.g., ADD) onto an existing rung and connect the EN pin. When you use NOLD, it always creates a full rung and it appears you cannot insert the EN/ENO into an existing rung.
  • OK, thanks for the clarification.
    I have linked this discussion to the Feature Request for the developers, so that should capture all the issues mentioned here.
  • Dear @steve.windham
    dear @DivisionByZero ,

    I'm glad to tell you that we changed the behavior of the grafical editor for PLCnext Engineer version 2022.3, so that you are able to easily connect the EN/ENO formal parameter in the way you mentioned it.
    Thnaks a lot for your feedback and your help to improve our software.

    Kind regards
    Carsten.
  • @Carsten PLCnext Team -- thank you for the update. It will help to simplify the usage. I look forward to the release.
This discussion has been closed.