Extended DUTs And Var_In_Out

Alvxx1
2019-10-10
2019-10-11
  • Alvxx1 - 2019-10-11

    I think I've answered my own question now.

    In the extended function block (Level_Instrument_Manager), instead of using a call "Super^", I inserted the actual function block of it's parent and gave it an instance of "Super^". This then allowed my to interconnect the Var_In_Out and set the value as "Data", which the Level data type, but Codesys appears to be casting this to it's parent type and executing correctly. I'm assuming its truncating the memory of the Data variable so it can fit, because it's inherited it can only ever be larger, truncating to the parents length would be safe.

     

Log in to post a comment.