Rule #8:
Not from scratch - Use Templates (Optional)
CODESYS provides a rich set of project templates.
They are a good starting point for successful library design.
With each CODESYS version a set of templates is provided, which are a good basis for setting up libraries following the guidelines described here.
CODESYS library (see: Common Libraries)
The standard use case. Each new library should developed out of this template.
CODESYS container library (see: Container Libraries)
This library can only contain documentation and a library manager.
CODESYS interface library (see: Interface Libraries)
This libray must not generate code.
External CODESYS library
A special use case for providing a IEC-Wrapper for external implemented functions or function blocks.
The recommended project structure is provided, and templates for the usage of an unique command interface for function blocks are available.
Function Blocks Design Patterns
One important part of this templates is a helpful collection of function blocks which implements different patterns of common behaviour models.