You can assign visibility for Methods in their declaration, e.g.:
METHOD PRIVATE DoSomething: BOOL
I don't remember exactly in which CoDeSys version visibility of methods was implemented, but this works atleast with V3.5 SP1.
You cannot give access specifier for Actions, and therefore you cannot hide them with PRIVATE or INTERNAL ("PUBLIC" inside the Library, otherwise PRIVATE (i.e. hidden for application that includes the library).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Is there a Pragma Instruction to make an Action/Method private in a function block?
You can assign visibility for Methods in their declaration, e.g.:
METHOD PRIVATE DoSomething: BOOL
I don't remember exactly in which CoDeSys version visibility of methods was implemented, but this works atleast with V3.5 SP1.
You cannot give access specifier for Actions, and therefore you cannot hide them with PRIVATE or INTERNAL ("PUBLIC" inside the Library, otherwise PRIVATE (i.e. hidden for application that includes the library).
you can write a pragma above the method like this to hide it
{attribute 'hide'}
METHOD METH_XYZ : BOOL
VAR_INPUT
END_VAR