Server Method Definitions Tab
Use
On the Server Method Definitions tab you can add new method definitions to the server and adjust or delete existing definitions.
Procedures
Creating Method Definitions
-
To create new methods, choose Add New Method.
The Add Methods to Server dialog box appears.
-
You have the following options:
-
Create Method Definition Manually
In this case, you can manually create a method for the direct destination system call. Enter a unique method name in the dialog box that then appears.
-
Load Method Definitions from Assembly
You can load predefined methods from an assembly. To do so, select an appropriate assembly from the dropdown list. When you create methods from an assembly, in the next step you can choose for which methods you want a method notification to be created. Only methods with an assigned method notification are active and are visible and executable for connected OPC UA clients. (See also: Enhanced Method Processing (EMP).)
-
Maintaining Method Definitions
On the Server Method Definitions tab you can edit methods for direct destination system calls after creation. To do so, click on the method you want and in the detail screen on the right, maintain the input parameters, output parameters, and descriptions.
If the data type of the input parameter or output parameter is an array, you can also specify the intended length of the array in the Array field. The OPC UA clients that connect with the PCo OPC UA server are informed of the given array length of the parameter. The default value for the array length, 0, means that the array can have any length at runtime. For array lengths other than 0, the OPC UA server checks at runtime whether the actual array length of the input or output parameter corresponds to the specified length.
By selecting the Asynchronous checkbox, you can define whether you want the method to be run asynchronously at runtime:
-
Checkbox is not selected.
In this case, the method is executed synchronously. PCo directly triggers the actions linked with the method notification such as execution of the EMP implementation and the destination system call configured there and then waits until these actions are completed. Only then is control returned to the caller of the method. The output parameters of the method are filled with the assigned output variables of the destination system call or of the EMP implementation.
-
Checkbox is selected.
In this case, PCo also triggers execution of the method notification by calling the method, but returns process control directly to the caller of the method. The caller does not then have to wait for the end of method processing. You can also define output parameters for asynchronous methods, but these cannot be supplied from the output variables of the destination system call or the EMP implementation. Instead, PCo returns the initial value of the output parameter data type in each case to the caller.
As soon as you have selected the Asynchronous checkbox for a method, the Message Delivery tab appears for the relevant method notification. You can then make the settings specifically for this method notification. (See also: Message Delivery Tab.)
For an asynchronous method call, PCo generates a notification message that is placed in the queue for notification messages and is delivered in a background process.
The settings described for the Notification Processing tab also apply to placing the method notification in the queue for message notifications. (See: Notification Processing Tab.)
You can use asynchronous methods, for example, to inform the SAP ME system about the completion of an operation without receiving the information about the next operation that is to be executed, because this is already determined in the process flow.
Icons
Below is an overview of the icons that are provided for maintaining the server methods:
|
Icon |
Description |
|---|---|
|
Add New Method |
You choose this icon to add a new method. |
|
Delete Selected Method or Node |
Choose this icon if you want to delete a selected method. After a confirmation prompt, generated method notifications are deleted. If you want to remove an assembly from the configuration, select the node for the assembly and choose this icon. The assembly and all assigned method notifications are also deleted. |
|
Duplicate Selected Method |
The selected method is copied. It gets a new name and internally a new ID so that it can be identified as a standalone method during browsing via an OPC UA client. The parameters of the original method are adopted and any existing method notifications are also copied. |
|
Change Method Name |
Choose this icon if you want to change the method name. This function has no effect on method notifications that have already been created; in other words, they retain their original name. However, you can change the name of the method notification via the Management Console. |
|
Create Notification for Selected Method |
Choose this icon to create a method notification for the method. The system proposes a name derived from the method name that you can change later. Output expressions are generated automatically for the notification from the input parameters of the method. Method definitions that are from an assembly of enhanced method processing (EMP) are only displayed on this tab and cannot be changed. However, you can choose the icon Create Notification for Selected Method to create method notifications for selected methods and activate the method this way. |
|
Navigate to First Assigned Method Notification |
Choose this icon to navigate to the first method notification that is assigned to the method. |
|
Display Related OPC UA Destination Systems |
Choose this icon to call a where-used list for the selected method. The where-used list finds destination systems within your own PCo installation that can call this method via the OPC UA server of the agent instance. Moreover, there might be callers of the method from external clients; these are not included in the where-used list, however. |
|
Reload Method Definitions from Assembly |
Choose this icon to compare the OPC UA server configuration with a new version of the EMP assembly. New methods can be loaded and the description of existing methods can be adjusted. |