User defined FB ?

Insight
2011-01-13
2011-01-27
  • Insight - 2011-01-13

    Hi all,

    I think there must be a way to combine several function blocks in a sort of user defined block. For example, the combination of the attachment to be made on a block with the required number of inputs and outputs to be used repeatedly.
    If yes - where in the HELP I can find a description of how this can be done. Even a keyword to search what will be helpful.[attachment=0]CoDeSys01.PNG[/attachment]

    Thanks in advance

    IMG: CoDeSys01.PNG

     
  • shooter - 2011-01-17

    if you make a new POU you can set it if it is a program a function block (your user block) and as a function.
    when you make it and you press F11 you can use your own block wherever you want it.

     
  • Insight - 2011-01-19

    [quote="shooter"]if you make a new POU you can set it if it is a program a function block (your user block) and as a function.
    when you make it and you press F11 you can use your own block wherever you want it.[/quote]

    10x U.
    I tried this option - added a new POU (type "function block"), but when I insert this newly created unit, it appears only as a block without any inputs and outputs. How do I define this block, so that it appears with the necessary inputs and outputs? May be I have to define them on some specific way, but HELP doesn't say nothing about this.... or I can't find it?!

     
  • ndzied1 - 2011-01-25

    You need to define the inputs and outputs for the function block.

    VAR_INPUT and VAR_OUTPUT define the inputs and outputs to your user defined function block. See the help information for how to do this. It is in there.

    IMG: VAR.PNG

     
  • Insight - 2011-01-27

    [quote="ndzied1"]You need to define the inputs and outputs for the function block.

    VAR_INPUT and VAR_OUTPUT define the inputs and outputs to your user defined function block. See the help information for how to do this. It is in there.
    [attachment=0]VAR.PNG[/attachment][/quote]

    Great, that's exactly what I needed. Good job Chicago
    10x U very much!!!

     

Log in to post a comment.