Getting Started OPC UA

OAS is both an OPC UA Client and OPC UA Server.

Open Automation Software Tags can be defined to connect to OPC UA Servers with the built in OPC UA Driver Interface.

If you want interface OAS with an OPC UA Client please see the Getting Started OPC UA Client guide.

The following steps can be used to setup communications with OPC UA Servers.

Step 1 – Check OPC UA License

OAS

Start Configure OAS application from the program group Open Automation Software.

Select Configure-License and verify that OPC UA is one of the available Drivers in the lower left of the window.  If you do not see OPC UA available contact support@oasiot.com to update your license.

NOTE: To configure remote OAS Engines enter the IP Address or node name in the Network Node field and click on Select.

Network Node
Enabled Drivers

NOTE: You will need to be running Open Automation Software Version 10.0.0.12 or greater to support OPC UA communications. You can download the latest version from our Open Automation Software Download page.

Step 2 – Configure OPC UA Driver

Select Configure-Drivers.

Configure Drivers

Enter a meaningful Driver Interface Name that you will refer to this physical connection when defining Tags with an OPC UA Data Source.

OPC UA Driver Name

Set the Driver type to OPC UA.

OPC UA Driver

Define the Server Url property to the endpoint of the OPC UA server to connect to.

Server Url

Use the BROWSE button of the Security Profile to select one of the security profiles. Use None:None:Binary for the fastest interface.

OPC UA Security Profile
OPC UA Security Profiles

If the server requires user authentication enable the property User Security to define the Username and Password.

OPC UA User Security

Optionally define a secondary failover server if the primary server fails with the property Enable Failover.


If both the primary and secondary servers are offline the Return to Online settings determines the retry frequency.

View Driver Interface Failover for more information and and video demonstrating communications failover.

NOTE: The certificate path is C:\ProgramData\OpenAutomationSoftware\pki on Windows and /ConfigFiles/pki/ on Linux. You may need to move the server’s certificate from the rejected\certs folder to the trusted\certs folder.

OPC UA Certificates

Select the Add Driver button in the upper left of the window to add the Driver Interface as an available selection when defining Tags in the next step.

Add Driver

Note: If you need to define several Driver Interfaces you can use the CSV Export and CSV Import on the toolbar together with Microsoft Excel.

CSV Import and Export

Drivers can also be programmatically assigned with the OAS REST API or .NET Server Configuration interface.

Step 3 – Configure OPC UA Tags

Select Configure-Tags.

Menu Configure Tags

Select Add Group to add a group to place tags in.

Add Group
Add Tag Group

NOTE: You can add organizational Groups as many levels deep as you prefer and add tags to groups.  To do this first add a Group to the root level, then right click on the Group in the right window to add additional Groups or Tags.

Tag Group Options

Select Add Tag to add a tag to the group selected.

Add Tag
Add Tag to Group

Change the Data Source property to OPC UA.

OPC UA Data Source

If you have more than one OPC UA Server defined in the Driver Interfaces select the desired Driver Interface.

Select OPC UA Driver

Use the BROWSE button next to the NodeId to browse for a node in the OPC UA server.

OPC UA NodeId
OPC UA Browse

Select OK to assign the IdType, NodeId, Namespace, and Data Type.

Specify the desired Publishing Interval for the Tag.

OPC UA Publishing Interval

Select Apply Changes and verify the Value and data quality is good.

Apply Changes

Check that the data quality of the tag is Good Quality and the value from the OPC UA server is returned.

Good Quality

NOTE: If you are unable to connect to the OPC UA Server due to a certificate security error go to C:\ProgramData\OpenAutomationSoftware\pki\ on Windows or the pki sub-directory where the OAS Engine is located on Linux and copy the files in the rejected\certs directory to trusted\certs.

If the data quality is Bad Quality view Troubleshooting OPC UA Server Connection Error for solutions to common errors.

To define multiple tags use one of the following optional methods.

  • Use One Click OPC UA to automatically create tags from all OPC UA Nodes from a selected OPC Server or branch within an OPC Server. Then selectively delete the groups and tags that are not required.
  • Use CSV Export and CSV Import on the toolbar in the upper right together with Microsoft Excel to add or modify tags.
  • Programmatically define Tags using the free to use OASConfig component with the SetTagProperties method.
  • Programmatically define Tags with the OAS REST API.

Step 4 – Save OPC UA Tags and Drivers

Select the Save button on the toolbar at the top.

Load and Save

Enter a file name to be saved in C:\ProgramData\OpenAutomationSoftware\ConfigFiles directory on Windows or ConfigFiles subdirectory on Linux.

When prompted to set the file as the default configuration to load on startup select Yes.

Set Default Tag File

NOTE: The tags and and drivers are both saved into one file.

The tags defined are now ready for use in all OAS features like Data Logging, Data Route, and Open UIEngine.