Subscribe operations can only be executed as calls from an asynchronous connector, as these use a websocket connection in the background to push changes from the Simplifier Server to the Business Application.
Input Parameters
operationType: Defines which operation you want to execute, in this case, “SUBSCRIBE”.
Parameter Name: operationType
Constant Value: SUBSCRIBE
Data Type: String
subscriptionType: Specifies the OPC UA Node type, that the subscription monitors
Parameter Name: subscriptionType
Constant Value: VARIABLE, EVENT
Data Type: String
nodeId: Defines the identification of the OPC UA node. It is split in 3 parameters (two mandatory and one optional):
- identifier:
Parameter Name: nodeId/identifier
Data Type: String - namespaceIndex:
Parameter Name: nodeId/namespaceIndex
Data Type: Integer - identifierType (optional): Searches for the Identifier with a fixed Data Type.
Parameter Name: nodeId/identifierType
Data Type: String
Constant Value: Numeric, UUID, String, Byte String
Note: In every namespace, each ID must be unique for its own identifierType (it is possible to use the String “7617” and the Numeric 7167 together in one namespace)
monitoredItems: Specifies a list of NodeIDs to be monitored
Parameter Name: monitoredItems[ ]
Data Type: Any (depends on the concrete child element within the parameter path)
Example of a monitored item for subscriptionType Variable:
monitoredItems[0]/identifier
monitoredItems[0]/namespaceIndex
Example of a monitored item for subscriptionType Event:
monitoredItems[0]/eventType/identifier
monitoredItems[0]/eventType/namespaceIndex
monitoredItems[0]/nodeId/identifier
monitoredItems[0]/nodeId/namespaceIndex
Output parameters
You can return all output parameters like this:
Parameter Name: /
Alias: result
Data Type: Any
If you want to get only selected output values, use the following syntax:
Parameter Name: value (for type variable) or data (for type event)
Data Type: float (depends on the values you want to be returned)