Is there any way to get the memory size occupied by a particular function block or a structure of data in Codesys?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Is there any way to get the memory size occupied by a particular function block or a structure of data in Codesys?
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.
Great, this will be enough for me!
Thank you for the idea.
Hi,
why not just using ```
SIZEOF(...)
```?