title: How to override a struct in a derived FB
body: <p>I'm stuck while designing a basic FB for our machine using OOP principles.</p>
  <p>A machine uses different modules like this:</p>
  <pre><code>module1 : BaseModuleFB;
  module2 : BaseModuleFB;
  </code></pre>
  <p>A module (some part of the machine) needs data to function (like positions, delays, etc.) This data will be stored in a recipe so grouping the data in a struct makes sence.</p>
  <pre><code>FUNCTION_BLOCK BaseModuleFB
  VAR
       Data : BaseModuleDataStruct;
  END_VAR
  </code></pre>
  <p>Now I have a different machine with some extra requirement. And also some extra data is needed. So I extend the module:</p>
  <pre><code>FUNCTION_BLOCK ModuleWithExtraFunctionFB EXTENDS BaseModuleFB
  VAR
       Data : ModuleWithExtraFunctionDataStruct;
  END_VAR
  </code></pre>
  <p>The code above will not compile because the variable Data is already in use in the base class.</p>
  <p>The Data structs look like this by the way:</p>
  <pre><code>TYPE BaseModuleDataStruct:
  STRUCT
      position1:INT;
  END_STRUCT
  END_TYPE
  
  TYPE ModuleWithExtraFunctionDataStruct EXTENDS BaseModuleDataStruct:
  STRUCT
      position2:INT;
  END_STRUCT
  END_TYPE
  </code></pre>
  <p>Another option I thought of was creating a property called <code>Data</code>.
  This property can be overritten by the derived class.</p>
  <p>But this approach also failed because you cannot change the type of the overridden property.</p>
  <p>Maybe someone has some nice ideas about this?
  Thanks.</p>