PLCgen: Error when compiling code for large model
Problem
In the tests for Sluis Linne we have created an ESCET model for a complete lockhead. This results in a generated PLC Main file of over 27.000 lines of code. When compiling, the following error is displayed:
We have tried manually moving part of the main OB to a separate function in order to reduce the size of OB1. This fixed the error shown above, but introduced an error when loading the compiled code onto the PLC:
Unfortunately, this error message does not specify what is going wrong. We are not yet sure if this second error is a result from our manual change to the code, or if something else is going wrong.
Our current question relates to the first error. Is the approach of moving part of the main OB to a separate function a feasible solution, or are other approaches more desirable. We'd appreciate anyone's input on this.
First steps to take
-
#923 (closed) PLCgen: generate edge selection variables based on absolute names of automata -
#934 (closed) PLCgen: use smallest integer representation possible for ranged integer and enum-typed variables/constants. -
#935 (closed) PLCgen: split generated MAIN
over multiple functions to prevent too large code
Other things to consider
- Reduce old-state variables duplication.
- Reorder variables to fit more bits in a byte.
Addresses #679