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

Get function block size

ert
2017-12-14
2017-12-15
  • ert - 2017-12-14

    Is there any way to get the memory size occupied by a particular function block or a structure of data in Codesys?

     
  • Anonymous - 2017-12-15

    Originally created by: scott_cunningham

    Way I know: Create an array of your function block - at least two elements. Define 2 pointers (“POINTER TO MyFb”). Set first pointer to ADR(FbInst[0]) and second pointer = ADR(FbInst[1]]). The difference will be the byte size.

     

    Related

    Talk.ru: 1

  • ert - 2017-12-15

    scott_cunningham hat geschrieben:
    Way I know: Create an array of your function block - at least two elements. Define 2 pointers (“POINTER TO MyFb”). Set first pointer to ADR(FbInst[0]) and second pointer = ADR(FbInst[1]]). The difference will be the byte size.

    Great, this will be enough for me!
    Thank you for the idea.

     

    Related

    Talk.ru: 1

  • singleton - 2017-12-15

    Hi,
    why not just using ```

    SIZEOF(...)

    ```?

     

Log in to post a comment.