DANSrv Reference
Server Development
Send comments on this topic.
DANSrv OPC DA .Net Server Toolkit > Server Development

Glossary Item Box

With the DANSrv .NET Server Toolkit the OPC DA server development is reduced to the development of a .Net customization assembly with configuration definitions and device access methods.

The customization plug-in can be developed with Visual Studio 2005 and newer using either C# or Visual Basic, for either the .NET Frameworks 2/3.x or 4.x.
NSPlugin.dll should by built for 'ANY CPU' so that it can be used with either the 32bit or 64bit generic server executable.

There are multiple version of the generic server executable provided:
- DANSrv.exe for the .NET Framework 2 or 3.x
- DANSrvNet4.exe for the .NET Framework 4.x
The executables in the product installation directory are built for the X86 (32bit) platform.
The executables in the product installation X64 subdirectory are built for the X64 (64bit) platform. The file names are the same but the description in the file properties are different.

If you create applications with the Visual Studio 'New Project' template then the correct version of the generic server is copied into the application.

The sample applications are provided with projects for multiple Visual Studio versions.
The projects have a post build step that copies the generic server (DANSrv.exe or DANSrvNet4.exe) and configuration files into the project output directory. DANSrv.exe is copied from the project directory and if it's not there, from the parent directory.

To create 64-bit servers you need to overwrite the DANSrv.exe file in the Sample Applications subdirectory with the 64-bit version of DANSrv.exe from the X64 setup subdirectory or copy this file into the project directories.

 

New Project
A new server development project can:

.NET Framework Versions
The DANSrv toolkit is provided for all versions of the .NET Framework:

 

 

Upgrade .NET2 DANSrv projects to .NET4
The upgrade can be made without changing the application code. The following is necessary:

  1. Replace the generic server DANSrv.exe with DANSrvNet4.exe
    This file may be renamed to a meaningful application name. This is recommended for users that have different servers running on the same machine. The file description in the file properties can be checked to determine the version of the generic server.
  2. In the server plug-in Visual Studio project:
    1. Change the Assembly name from NSPlugin.dll to NSPluginNet4.dll
      This name cannot be changed because DANSrvNet4.exe is compiled for this name.
    2. Change the target .NET Framework to .NET4
    3. References may have to be changed to the .NET4 version of the referenced assembly.
    4. Make sure that the selected target platform is ANY CPU if the plug-in is to be used with either 32-bit or 64-bit generic server.

 

 

Server for 64-bit mode operation
The 64-bit edition of the DANSrv.exe/DANSrvNet4.exe generic server can be used with the same customization plug-in DLLs if the plug-in assembly is compiled for the ANY CPU target platform.

The 64-bit server requires 64-bit OPC Core Components. The provided Advosol OPC Core Components work in 32-bit and 64-bit mode.

The 64-bit mode server can be accessed from 32-bit applications and 64-bit applications.
Test provided test clients are .NET applications built for ANY CPU and run in 64-bit mode on x64 machines.

 

© 2002-2017 Copyright Advosol Inc. All Rights Reserved.