PLCgen: Separate functions for reading input and writing output
Due to being able to write output based on algebraic variables, writing output in the Main OB results in very long equations, containing all the terms of the algebraic variable. This results in a out of memory error for the maximum size of an program block.
A solution to this is to make a separate function for writing outputs, which is called in the main. This could also be extended for separate functions for reading input (and perhaps also uncontrollable loop and controllable loop).
You might reach a point where the function itself will become too large, but for now this change will solve our current problem.
Addresses #679
Edited by Dennis Hendriks