OPCUA
Communication control for the OPC UA client driver.
WebVue support - Yes.
Mode |
Mnemonic |
Syntax |
0 | START | 1 |
1 | STOP | 1 |
2 | SWITCHOVER | 2 |
3 | METHOD | 3 |
Common arguments
Argument |
Meaning |
CommObjectName | The name of an OPC UA client communication object, under the form “NetworkName”, “NetworkName.ServerName” or “NetworkName.ServerName.RedundantServerName”. Type STR. |
Destination | Destination of the command. Type STR.
|
ResultVar |
The name of a register variable in which information resulting from the instruction will be placed. Type STR. |
Syntax 1
IntVal = OPCUA(Mode, CommObjectName, Destination[, ResultVar]);
Return type: INTEGER.
Execution
Mode |
Mnemonic |
Action |
0 | START |
Starts the OPC UA communication object CommObjectName. |
1 | STOP |
Stops the OPC UA communication object CommObjectName. |
Return:
|
The possible values of ResultVar are:
-
-1: Command in progress
-
0: Command completed successfully
-
1: Not implemented
-
2: Communication object not found (error returned by the producer)
-
3: Communication object not enabled
-
4: Communication object already enabled
-
5: Communication object already disabled
-
6: Communication object not produced by the local station
-
7: Message lost
-
8: Communication object stopped
-
9: Communication object already stopped
-
10: Producer not started
-
11: Communication object already connected
-
12: Communication object connecting
-
13: Connection lost
-
14: Communication object already disconnected
-
15: Communication object disconnecting
-
16: Produced in error state
-
17: Object undefined
-
18: Command failed
-
19: Insufficient license rights
-
20: Unknown error
-
21: Routing failed
-
22: Trial period elapsed
-
23: Command partially failed
Syntax 2
IntVal = OPCUA(Mode, ServerName[, ResultVar];
Return type: INTEGER.
Argument |
Meaning |
ServerName |
Full name of the OPC UA Server to force active as part of the redundancy. The value must be: “NetworkName.Server.Name” to activate the main Server or “NetworkName.ServerName.RedundantServerName” to activate a Standby Server |
Execution
Mode |
Mnemonic |
Action |
2 | SWITCHOVER |
Activates the OPC Server ServerName. |
Return:
|
The possible values of ResultVar are:
-
-1: Command in progress
-
0: Command completed successfully
-
1: Command failed
-
2: Object unknown
-
3: Not implemented
-
4: Routing failed
-
5: Invalid parameter
Syntax 3
IntVal = OPCUA(Mode, ObjectFullname, UrlFormattedObjectNodeId, UrlFormattedMethodNodeId, InputArgs, OutputVarName [, FieldName ][, ResultVar]);
Return type: INTEGER.
Argument |
Meaning |
ObjectFullname |
Full name of the OPC UA server that is to be called to perform the method. In the case of redundant servers, the full name has to be the one of the main server. The operation is applied to the active server (either main or standby server). |
UrlObjectNodeId |
Node identifier of the object providing the method. Format: "NSnamespaceIndex|identifierType|identifier". |
UrlMethodNodeId |
Node identifier of the method to call. Format: "NSnamespaceIndex|identifierType|identifier". |
InputArgs |
All input arguments required by the method as a Json-formatted string. Either a string or a text variable containing the Json fragment. |
OutputVarName | Variable name receiving the output result returned by the server. The variable type must match the type returned by the method. |
FieldName | Optional parameter to get part of the output result by specifying a path name. |
Execution
Mode |
Mnemonic |
Action |
3 | METHOD |
Sends a method call to a server by specifying input arguments in order for the server to perform an operation. The server's response contains the result, either a successful operation or a failure indicated by an error code. Return:
|
The possible values of ResultVar are:
-
1: Command completed successfully
-
-2: Unknown node
-
-3: Timeout
-
-4: Invalid input arguments
-
-5: Command failed
-
-6: Unknown network
-
-7: Unknown client
-
-8: Command aborted
-
-9: Command in progress
-
-10: Offline
-
-11: Communication disabled
-
-12: Not implemented