L_IOSP - MethodCall
For the execution of Methods via OPC UA the corresponding objects have to be created in the OPC UA Nodeset as well as in the PLC project. In addition to this, both instances of the methods must then be mapped.
This generic function block represents an OPC UA Method in the IEC application, which can be mapped to an OPC UA Server Method.
This basic function block contains all the variables necessary for the handling of the method. In addition to this, it provides a few methods and properties that simplify its use.
|
|
|
|
L_IOSP_OpcUa_MethodCall |
|
|
|
|
|---|---|---|---|---|---|---|---|
|
BOOL |
– |
|
xExecute |
xDone |
|
– |
BOOL |
|
BOOL |
– |
|
xAbort |
xBusy |
|
– |
BOOL |
|
|
|
|
|
xAborted |
|
– |
BOOL |
|
|
|
|
|
eStatusCode |
|
– |
L_IOBP_StatusCodes |
|
|
|
|
|
|
|
|
|
Inputs
If the function block is mapped, this variable is internally connected to the OPC UA Server.
|
Name Data type |
Information/possible settings |
|
|---|---|---|
|
xExecute BOOL |
FALSEäTRUE |
The Method is called by an OPC UA Client. Request to execute the method logic in IEC application by OPC UA Server. |
|
xAbort BOOL |
FALSEäTRUE |
The Method is aborted by an OPC UA Client. Request to abort the method logic in IEC application by OPC UA Server. |
Outputs
If the function block is mapped, this variable is internally connected to the OPC UA Server.
|
Name Data type |
Value/meaning |
|
|---|---|---|
|
xDone BOOL |
TRUE |
Signals the OPC UA Server that the method logic in IEC application is done and the output variables are calculated. |
|
xBusy BOOL |
TRUE |
Signals the OPC UA Server that the method logic in IEC application is not finished. |
|
xAborted BOOL |
TRUE |
Signals the OPC UA Server that the method logic in IEC application is aborted. |
|
eStatusCode L_IOBP_StatusCodes L_IE1P_Error |
Signals the OPC UA Server the StatusCode for the method call. This StatusCode is send to the Client.Here you can find information on error or warning messages. |
|
Sub-Methods
This function block provides following methods for the method operation in the PLC application.
|
Name Data type |
Description |
|---|---|
|
StartMethod()
|
This method is called automatically once, if the OPC UA Method is requested (xExecute FALSEäTRUE). It is used to prepare the method operation, e. g. to initialize additional function blocks or to prepare a consistent data set. This method is optional. |
|
ExecuteMethod() Output variable: xComplete BOOL |
This method is called automatically cyclically, after the StartMethod() call. It is used to calculate the method operation, e. g. calculate a simple addition, start an internal process, or set device parameter via an additional function block. The cyclic call of this method is terminated if xComplete is set to TRUE (normal method operation finished by the appliaction) or xAbort is true (abort request by the OPC UA Server). |
|
FinalizeMethod() Output variable: xComplete BOOL |
This method is called automatically cyclically, after the ExecuteMethod() calls. It is used to finalize the method operation, e. g. to finalize additional used function blocks. It can also be used for the abort handling, if requested by the OPC UA Server (xAbort == true). The cyclic call of this method is terminated if xComplete is set to TRUE. This method is optional. |
|
ResetMethod() |
This method is called automatically once, after the FinalizeMethod() calls. It is used to reset the method operation, e. g. to reset additional variables. This method is optional. |
The OPC UA Client Server connection is a none realtime communication. Thus, the PLC application is not synchronized with the communication. In order not to disturb the PLC realtime task, the Server FB L_IOSP_MethodCall should be executed in a low prio task without watchdog or free-wheeling task.