These design-patterns come from various sources all around the internet.
I decided to study and rework / translate them into Codesys V3.
The patterns are ideally suited for selfstudy purpose.
Any new contributions are heartly welcome!
Kudo's go out to the original posters!
No matter what fancy pattern you throw at it, keep it "simple and stupid" and ask yourself "do we really need it?".
Allthough design patterns may ease your life significantly, the simplest solution is always the best solution!
If you need any further reading on these topics, I suggest you visit the following page by gabr42, 'The delphi geek'.
It contains many many useful links on for OOP related topic. A SOLID (pun intended) starting point for all!
https://www.thedelphigeek.com/2019/04/deep-dive-into-design-patterns.html
Now, let's dive into some CODESYS patterns curated and collected from around the web;
The 'Patterns of Ladder Logic' translated to CODESYS 3 LD Function Blocks
Original Poster: Scott Whitlock: http://www.contactandcoil.com/patterns-of-ladder-logic-programming/
The 'Abstract Factory' Pattern, converted from TwinCAT3 to CODESYS 3
Original Poster: Stephen Henneken: https://stefanhenneken.wordpress.com/2014/11/16/iec-61131-6-abstract-factory-english/
The 'Builder' Pattern for CODESYS 3
Original Poster: Armando Rene Narvaez Contreras
https://forge.codesys.com/prj/designpatterns/code/HEAD/tree/Tags/The%20-Builder-%20Pattern/
The 'Command' Pattern, converted from TwinCAT3 to CODESYS 3
Original Poster: Stephen Henneken: https://stefanhenneken.wordpress.com/2016/12/07/iec-61131-3-the-command-pattern/
https://forge.codesys.com/prj/designpatterns/code/HEAD/tree/Tags/The%20-Command-%20Pattern/
The 'Decorator' Pattern for CODESYS 3
Original Poster: Armando Rene Narvaez Contreras
https://forge.codesys.com/prj/designpatterns/code/HEAD/tree/Tags/The%20-Decorator-%20Pattern/
The 'Observer' Pattern for CODESYS 3
Original Poster: Armando Rene Narvaez Contreras
https://forge.codesys.com/prj/designpatterns/code/HEAD/tree/Tags/The%20-Observer-%20Pattern/
The 'Proxy' Pattern for CODESYS 3
Original Poster: Armando Rene Narvaez Contreras
https://forge.codesys.com/prj/designpatterns/code/HEAD/tree/Tags/The%20-Proxy-%20Pattern
The 'Singleton' Pattern for CODESYS 3
Original Poster: Armando Rene Narvaez Contreras
https://forge.codesys.com/prj/designpatterns/code/HEAD/tree/Tags/The%20-Singleton-%20Pattern