The following behavior i have in my PLC next Engineer (2021.1), I work with IEC/ST
Maybe it is helpfull to share or has someone a solution.
In a task (1sec/cyclic) i have three program's who are processed sequentially after eachother.
There is also a global structure defined (called ISF0) and all the programs have access tot this global structure without problems
A FB that I made has also a reference to this global structure.
If i use the FB in a program 1 then there is no problem
If a use this FB again but now in program 2 then i get a CILG001 error
If i change in de FB the ISF0 usage from external to local, than the error disappears (but ofcourse the FB wont work)
If i put the code from de FB directly in the program (what i do now as a work -around) then there als no problem
an the code can reach this global structure.
So in this specific FB a external reference to a shared structure couses this error.
I dont see what the problem is in my code. A reference to a shared structure in global memory is not illegal because
several other FB work the same way. What is the problem? Is this a compiler bug because: CILG0001: Internal Error
seems to me as a code for the PLCnext Engineer developers en not for PLC program developers?.
(otherwise: give a beter description because it cost me hell of job to find the problem ?)
Marco van Os, GeoComfort Netherlands