PCo as OPC UA Server and as Web Server
You can configure agent instances of Plant Connectivity as OPC UA servers or as Web servers.
If it is started as an OPC UA server, the agent instance can receive and process method calls from OPC UA clients. If you run an agent instance as a Web server, the agent instance can provide methods in the form of service operations and make them accessible to Web service callers. In the Management Console, you can configure the actions that are to be executed by a client when a method is called. (See: OPC UA Server or Web Server.)
In principle, there are two ways of executing methods using a PCo server:
-
Method with direct destination system call
You can configure the method as a method with direct destination system call. To do so, you define the name of the method, the input parameters, and the output parameters manually. Then you assign to the method a method notification using which you can call exactly one destination system. (See also: Method Notification.)
At runtime, the method notification is executed when the method is called and the destination system defined there is called. If this destination system call delivers return values, these can be written back to the output parameters of the method and thereby be returned to the caller of the method.
-
Enhanced method processing (EMP)
You can load the assembly (DLL) of an enhanced method processing (EMP) to the PCo Management Console and activate and configure the methods defined there. The input and output parameters of the methods and the method names are already defined in the EMP assembly and cannot be changed. By creating a method notification you can activate individual methods of the EMP assembly and make them visible and executable for callers. The action that is to be executed when the method is called is defined for EMP methods in the implementation. Depending on the implementation of the EMP method, an additional destination system call needs to be configured.
At runtime, the method of the EMP implementation is executed by PCo and the results of the execution are written back, if necessary, to the output parameters of the method. If the EMP method requires a destination system call, this call is carried out at the appropriate place using the program logic in the EMP implementation. (See also: Enhanced Method Processing (EMP).)
Usage Options
Using the definition of a method with direct destination system call and usage of the multiple call destination system, you can run a defined sequence of steps if the method is called by a client. For example, you can use such methods to control processes at production plants for which individual parts of the plant need to be coordinated.
By using the assembly (DLL) Locking that is delivered as standard in EMP, you can use an agent instance as a lock server for a part of a plant that is needed by various production steps but can only process one request at a time.