I currently learning about TwinCat OOP. I’ve gone through the OOP basic concepts and I’m trying to implement them on very basic code for conveyor control. At the moment, just the logic for start/stop etc.
I think I figured out the FBs part of the code and instantiated the objects for all my devices. I think this code organization works with these small amount of devices but once you start getting, 50 sensors, 50 conveyor belts, 20 Estops, I’m not sure if this might still be the best way to organize it.
I’ve added some variables to simulate the IO, like Push Buttons, senor inputs etc.
I’ve added some picture of my work as reference and I would gladly appreciate any feedback if there is a better way on organize this type of code. enter image description here