zenon logic: Unexpected complex data in expression

zenon logic: Unexpected complex data in expression

In zenon version 8.20, it was possible to initiate and assign the function block in one line. This was not IEC compliant, therefore feature was removed in zenon 10.
Now the error message "Unexpected complex data in expression" is logged when using this syntax:


To be IEC compliant call it like in the documentation:

In zenon 11 since build 109317 we introduced a Compiler Flag that allows old projects to continue working.
To use it you have to adjust the project settings.
  1. Right Click on the Project Name > Options
  2. Advanced > Other Options
  3. Add the line "FLIKEFBCALL=ON" like shown in the Screenshot
  4. Compilation should work again
 
Only works when:
  • only if "variables in separate segment" option is enabled
  • only for FBs having only one output (the result)