makarovas
Hello!
This program compile fine in release (commit) 085636aea723a78bfade3fbc6151c551747e572e (debian armhf), but in actual release not work 🙁 please help.
 
TYPE
  datatype0 : STRUCT
    a : DINT;
    b : DINT;
  END_STRUCT;
  datatype1 : STRUCT
    cfg : datatype0;
    a : DINT;
  END_STRUCT;
END_TYPE

PROGRAM program0
  VAR
    c : datatype1 := (a := 1, cfg:=(a:=1,b := 1));
  END_VAR

  c.a := 1;
END_PROGRAM


CONFIGURATION Config0

  RESOURCE Res0 ON PLC
    VAR_GLOBAL
      LocalVar0 : DINT;
      LocalVar1 : datatype1 := (c:=(a:=1,b := 2));
    END_VAR
    TASK task0(INTERVAL := T#20ms,PRIORITY := 0);
    PROGRAM instance0 WITH task0 : program0;
  END_RESOURCE
END_CONFIGURATION
error:
    c : datatype1 := (a := 1, cfg:=(a:=1,b := 1));
 
 
good:
    c : datatype1 := (cfg:=(a:=1,b := 1));
Reply 0 0
thiagoralves
That commit was based on a much older version of MatIEC. This commit here updates MatIEC to the latest version. Most likely the newer MatIEC doesn't like your code for some reason. You can revert just the MatIEC files from the previous version and keep the newer runtime if you want your code to run.
Reply 0 0
Reply