I have written a function block that uses a generic constant for the upper bound of an array. I wanted to have this array in the persistent memory area, thus I constructed my FB as follows:
Is is simply not possible to use a generic constant for the persistent array?
Thanks in advance.
Edit: It seems I can manually replace the uiArrayLength in the persisten list by the value 10 I used as the generic constant for this particular instance.
Last edit: Stefan Hamcke 1 hour ago
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I have written a function block that uses a generic constant for the upper bound of an array. I wanted to have this array in the persistent memory area, thus I constructed my FB as follows:
In my
PLC_PRGI declare an instance of said FBThis compiles just fine. When I let CODESYS fill my persistent list, it adds duplicate entries
so I manually delete the duplicate. When i now compile, I get errors
Is is simply not possible to use a generic constant for the persistent array?
Thanks in advance.
Edit: It seems I can manually replace the
uiArrayLengthin the persisten list by the value 10 I used as the generic constant for this particular instance.Last edit: Stefan Hamcke 1 hour ago