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

Shortcut to autofill inputs/outputs in Structured Text?

standeven
2015-08-24
2015-08-29
  • standeven - 2015-08-24

    Hello,

    Is there a keyboard shortcut or other command to automatically type out the expected inputs and outputs of a function block in Structured Text? For example, when you declare a function box in Ladder Logic then all the inputs and outputs are listed in the box. Assigning variables to these inputs/outputs is then very easy, you just type next to them.

    However, in Structured Text, I have to call the function block and then look inside the function block to see the required inputs and outputs, and then return to where I called it and type them out manually. It's a pain!

    I'm hoping there is a better way that I just haven't discovered yet. Thanks everyone.

     
  • Anonymous - 2015-08-25

    Originally created by: scott_cunningham

    Use the input assistant (F2 key on my system). You can select the Function, Function Block, or Program you want to insert and it will insert with all I/O variables for you.

     
  • shooter - 2015-08-25

    minimize the number of i/o of a function block by using structures and types.
    obvious you can use F2 like mike says.
    another way is to use export to xml and use a editor like npp.
    if you have to repeat a lot think how to avoid it by making the structure of the program differently.
    and you can mix languages in most cases.
    i use ladder for safety.
    use sequence for state machines.
    cfc for calculations
    st for loops and decisions and for all rest.
    il for memory things (not often) as i love to keep it open like iec61131.
    have a look at w www.oscat.de w for nice examples.

     
  • standeven - 2015-08-27

    Thanks Scott, that's exactly what I was looking for.

    Shooter, your advice is helpful as always

     
  • shooter - 2015-08-27

    sorry scott

     
  • Anonymous - 2015-08-29

    Originally created by: scott_cunningham

    No worries, Shooter. Your tip is also important - imagine a FB with 100 input variables. Unmanageable.

     

Log in to post a comment.