In this article, we will explain the procedure and basis for creating an OPC UA method that communicates with a PLC from a laptop, for example, using an OPC client application. One example of such an application is a solution that can trace and log data from the PLC on an external computer. The UaExpert app provides these functionalities.
The system function blocks "OPC_UA_ServerMethodPre" and "OPC_UA_ServerMethodPost", which implement the OPC UA method, are the central components of an OPC UA method. The use of OPC UA on the PLC can be done in a simpler way that does not involve using methods. More on this will follow.
More details can be found here: Siemens page OPC UA Example project