For a stand-alone UA server the uaPLUS.Net4.exe is the main application. uaPLUS uses the same plug-in DLL interface as the Advosol DANSrv OPC DA .NET Server and XDASrv XML DA server toolkits. |
![]() |
The NSPlugin.dll interface was originally designed for the DANSrv OPC DA Server.
The DANSrv generic server does much of the OPC DA specified data processing, keeping the NSPlugin.dll code simple, practically only transferring changed item values between the devices and the generic server.
This concept also works well with the uaPLUS generic server, which does the UA specific data handling.
UA Mapping
The DA items managed by the plug-in are mapped to UA objects at startup.
The NSPlugin.dll is represented as the root object with the default name DAplugin
The name can be changed with a definition in the AppSettings section of the application configuration file (uaPLUS.Net4.exe.config)
<add key="DArootName" value="myName"/>
Servers implemented with uaPLUS DLL version can set the name by writing the static object uaPLUS.daRootName before the uaPLUS instance is created.
The DA branch structure defined in NSPlugin.dll is mirrored under this UA object.
The items are defined as a fully qualified identifier string with the decimal point '.' as the delimiter for the branch structure.
The generic UA server builds all the necessary UA objects and references for a hierarchical structure.
E.g. the item definition "aaa.bbb.ccc" builds the UA object structure:
Objects
root for plug-in (the name is defined in the UA server applications configuration file)
aaa
bbb
ccc
New Project for DA functionality
A new server development project can be:
-
created with the new project wizard of either Visual Studio 2008, 2010, 2012,2013.
The wizard creates a new Visual Studio project with either skeleton code or sample code according the dialog selections. -
based on one of the sample applications
Copy the best fitted sample application into a new directory and make the following changes:-
open the copied project in Visual Studio and optionally change the solution and project name.
The project output must be NSPlugin.DLL (the generic server is compiled for this name and interface). -
In case the plug-in is to be used also with DANSrv.exe:
open the file ServerAdapt.cs / .vb and change the server registration definitions in the method GetServerRegistryDef() if the plug-in is also going to be used with the DANSrv OPC DA generic server. Unique GUIDs for the CLSID and APPID can be generate with the Visual Studio tool Create GUIDS -
open the Visual Studio project properties, select Configuration properties - debugging and change the Start Application path to uaPLUS.Net4.exe respectively uaPLUS.Net35.exe in bin/Debug of the current project. Visual Studio defines an absolute path that still points to the project that was copied.
-
build and start the project. The server runs as a Windows process.
-
make the functional program changes required by your application.
-