This section describes how to test the SmartServer IoT OPC UA server that is monitoring a datapoint on a device, using both subscription and on-demand read (poll). An OPC UA client can subscribe to the server nodes (datapoints) so that it can receive notifications when the node values change. If the subscription feature is not used at the OPC UA client, on-demand read can be performed to get real-time datapoint values from the devices on the network.
This section consists of the following:
UAExpert is a full-featured OPC UA client and is designed as a general purpose test client for any OPC UA server.
To get started, download UAExpert from the Unified Automation website.
Testing the SmartServer IoT OPC UA Server
The procedure that follows provides the necessary steps to test the SmartServer IoT OPC UA server that is monitoring a datapoint on a device.
Note: For datapoint writes, an OPC UA client always uses normal priority.
Setting the OPC UA Server Configuration
- Log into the SmartServer configuration UI with the username and password.
- Click OK to login as appropriate for your web browser.
The Network Configuration page appears.
- Click OPC UA to go to the OPC UA Configuration page.
The OPC UA Configuration page appears.
Enable the OPC UA Server option.
For subscription-based monitoring (event-driven) at the OPC UA client, the Monitored and Polled datapoint setting needs to be enabled on the SmartServer CMS Datapoint Properties widget for LON IMM.
For datapoints on LON IMM, BACnet, and Modbus devices, polling must also be enabled to periodically read the datapoint value.
For datapoints on LON DMM devices, if polling is not enabled for the datapoint, the SmartServer automatically enables event-driven updates from the datapoint. Therefore, polling is not required to monitor a datapoint on a LON device using DMM.
See Defining Datapoint Properties for more information.
Continue testing the SmartServer IoT OPC UA server following the steps in the section below: Adding a New Server using UAExpert.
Adding a New Server using UAExpert
- With UAExpert OPC UA client installed, select Project → Servers → Add to add a new server.
Double-click the Custom Discovery entry and update the URL with the SmartServer IoT OPC UA end point.
Note: The OPC UA endpoint URL that is used by the OPC UA client to communicate with the OPC UA server is:
opc.tcp://<SmartServer IoT hostname>:55000/UA/echopcua-server
For more information about supplying the <SmartServer IoT hostname> variable depending on your SmartServer environment, refer to the Connectivity Testing section found in Connect to Your SmartServer.
Double-click the newly added OPC UA URL and select None for Anonymous authentication settings.Note: With SmartServer IoT OPC UA Server release 2.8 and higher, both Anonymous (None) and Basic256Sha256 authentication settings are supported. The login user credential is the same as the SmartServer IoT console login (default username is apollo).
Click OK to complete the add server process.
Continue testing the SmartServer IoT OPC UA server following the steps in the section below: Selecting the Monitored Datapoint.
Selecting the Monitored Datapoint
- Right-click the added server and select Connect.
Select the monitored datapoint from the OPC UA Address Space tree.
- For on-demand read, click the refresh (orange arrows) to get the current value of the datapoint from the device in the Attributes area.
In the example below, the datapoint display name is nvoLuxLevel, the datatype is UInt 16 (unsigned long) and the value is 310.
For subscription-based monitoring (event driven update), drag-and-drop the datapoint to the Data Access View area to begin getting live readings from the datapoint.
In the example below, the datapoint display name is nvoLuxLevel, the datatype is UInt 16 (unsigned long) and the value is 308.
The UAExpert supports ExtensionObject (e.g., a structure) datatype. The values of the fields can be displayed within the client.
In the example below, the display name of the datapoint is nvoValue. It is a SNVT_switch structure with a value field and a state field.