Activity for Stefan Hamcke

  • Stefan Hamcke Stefan Hamcke modified a comment on discussion Engineering πŸ‡¬πŸ‡§

    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: FUNCTION_BLOCK FbWithGenericArrayLength VAR_GENERIC CONSTANT uiArrayLength : UINT := 10; END_VAR VAR PERSISTENT arr : ARRAY[1..uiArrayLength] OF INT; END_VAR In my PLC_PRG I declare an instance of said FB PROGRAM PLC_PRG VAR myFb : FbWithGenericArrayLength<10>; END_VAR This compiles just fine. When I let...

  • Stefan Hamcke Stefan Hamcke modified a comment on discussion Engineering πŸ‡¬πŸ‡§

    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: FUNCTION_BLOCK FbWithGenericArrayLength VAR_GENERIC CONSTANT uiArrayLength : UINT := 10; END_VAR VAR PERSISTENT arr : ARRAY[1..uiArrayLength] OF INT; END_VAR In my PLC_PRG I declare an instance of said FB PROGRAM PLC_PRG VAR myFb : FbWithGenericArrayLength<10>; END_VAR This compiles just fine. When I let...

  • Stefan Hamcke Stefan Hamcke modified a comment on discussion Engineering πŸ‡¬πŸ‡§

    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: FUNCTION_BLOCK FbWithGenericArrayLength VAR_GENERIC CONSTANT uiArrayLength : UINT := 10; END_VAR VAR PERSISTENT arr : ARRAY[1..uiArrayLength] OF INT; END_VAR In my PLC_PRG I declare an instance of said FB PROGRAM PLC_PRG VAR myFb : FbWithGenericArrayLength<10>; END_VAR This compiles just fine. When I let...

  • Stefan Hamcke Stefan Hamcke posted a comment on discussion Engineering πŸ‡¬πŸ‡§

    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: FUNCTION_BLOCK FbWithGenericArrayLength VAR_GENERIC CONSTANT uiArrayLength : UINT := 10; END_VAR VAR PERSISTENT arr : ARRAY[1..uiArrayLength] OF INT; END_VAR In my PLC_PRG I declare an instance of said FB PROGRAM PLC_PRG VAR myFb : FbWithGenericArrayLength<10>; END_VAR This compiles just fine. When I let...

1