Replies: 5 comments 19 replies
-
@philippleidig any insights on this? |
Beta Was this translation helpful? Give feedback.
-
In my opinion a GVL doesn't really make sense when using an OOP-approach for the rest of the software. I would propose to do it directly in the function block. This way if multiple instances exist, the IO is already defined. When doing it inside a function block it can still be put into a struct to give it a specific place and for reusing IO declaration. Might also be easier when mocking the IO during testing? I have not much experience with that. |
Beta Was this translation helpful? Give feedback.
-
Here is a brief description of a model that we use. Two levels of abstractions:Components abstraction level (CAL)
This approach make it possible to write and test the PLC program without prior knowledge about specific hardware installation. Hardware abstraction level (HAL)Program structure that replicates physical structure/organization of the hardware IO and different components interfaces (different bus systems). Linking CAL and HALAssignment of hardware linked variables to component is done in dedicated method (IntializeComponents()), that is called at the beginning of the PLC cycle (or prior to code that uses the components). Pros and consPros
Cons
Propositions / Questions
Any feed back is warmly welcomed Thanks! |
Beta Was this translation helpful? Give feedback.
-
I think the most successful thing is that the component itself has its own error diagnosis. |
Beta Was this translation helpful? Give feedback.
-
@SankariNL @dhullett08 @SankariNL @jozefchmelar @philippleidig Here is my proposal and few additional points:
I'd really like to make a decision next week, thanks! |
Beta Was this translation helpful? Give feedback.
-
There are several option that can be seen:
We used GLV and STRUCs organized in the same hierarchy as physical hardware. It is not a bad solution. However I guess this requires more in depth discussion.
Beta Was this translation helpful? Give feedback.
All reactions