Methods

Definition

A method is a key element of a service-oriented architecture for industrial applications. Using a method, a server provides an interface with which clients can call specific services or data from the server. The server defines the semantic of the method and which input and output parameters it has. It makes sure that when the method is called, the desired action is executed and that the output parameters are supplied after the action has run.

You can also run an agent instance as a server in PCo (see: PCo as OPC UA Server or PCo Web Server), and configure methods at this level. However, PCo also supports the calling of methods as a client of a remote server or within your own installation using the OPC UA destination system (see: OPC UA Destination System).

If you use PCo as a Web server, you can provide methods for callers in the form of service operations. Service operations of a remote server are accessible via the universal Web service destination system or within your own installation.

Example

Example 1

A robot offers a method RoboterExecuteJob with which the execution of a specific robot program can be triggered. A method like this could have the following interface:

Input Parameter

Description

inHandle

Unique ID for calling the robot program. This might be the serial number of the product being produced.

inJobNumber

Number of the robot program that is to be executed

Output Parameter

Description

outSuccess

True if execution was successful, False if not. An error number is issued at the same time.

outErrorNumber

Error code to which there can be a reaction in further processing

You can call such a method in a process-controlled way using PCo and receive and process the return value further after successful execution, for example, in the multiple call destination system.

Example 2

PCo offers a method CarrierArrived that is called by the transport system if a carrier has reached a specific position in the production plant:

Input Parameter

inHandle

Unique ID of the product on the carrier

inPos

ID of the position reached on the transport system

PCo can then start a configured process if this method is called at a specific position, for example, trigger a robot movement or start a drill.