Why Does the ANY Type Variable Inherited from a Function Block Remain as a Null Pointer in Twincat?

 The reason why the ANY type variable inherited from the function block is always a null pointer

The ANY type variable is somewhat special in two aspects. Firstly, it can only be used as an input variable for a function block or function. Secondly, it cannot be passed as a parameter.

Moreover, the ANY type variable cannot inherit from a parent class through extension, resulting in it always appearing as a null pointer, for instance:




Solution: Avoid creating new function blocks through Extend, and instead, create an entirely new function block from the ground up.