The DANSrv project wizard is started from the Visual Studio New Project dialog.
Visual Studio 2010
Select Visual Basic or C# and the DANSrv template.
Define the project name and directory and click OK. Make sure that you select the template that matches the selected .NET Framework version.
|
|
Visual Studio 2005/2008
Select Visual Basic or C# and the DANSrv template.
Define the project name and directory and click OK. |
![]() |
The DANSrv wizard shows a dialog page with the following configuration elements.
Item | Description |
Vendor Id | The company name defined is used as the first part of the server ProgId and Name e.g. "Advosol.CSsampleDA" Note: The ProgId can be modified on page 2 |
Server Name | The defined server name is used: - as the VS solution name and project name - as part of the server ProgId and Name e.g. "Advosol.CSsampleDA" Note: The ProgId can be modified on page 2 |
Update Rate | The rate is define in ms. This is the fastest rate the server can update the connected clients. |
Branch Separator Character |
The character separating the branch/item elements in a item ID is typically . or / |
Browse Mode | In Browse Mode REAL the item browsing is handled in the generic server. The items defined in the server cache are returned. In Browse Mode VIRTUAL the OPC DA V2/V3 browse function calls are forwarded to the customization plug-in. They have to return an OPC compliant result. This mode is typically used in combination with Item Validate Mode UnknownItems to implement a dynamic address space. The browse functions return all items that are or could be added to the server address space (defined in the generic server cache). The items are added in ValidateItems() when they are first accessed by a client. |
Item Validate Mode |
The Item Validate Mode can be:
|
Only Skeleton Code | If checked, then skeleton code is created with only the necessary method definitions and comments where application code needs to be inserted. |
ConfigBuilder sample code | The created sample code loads sample item definitions from an embedded XML configuration file and creates the server items accordingly. |
Custom Item Properties sample code |
The wizard created code contains a sample implementation of the custom properties handling customization methods. The OPC standard item properties 1..6 are handled in the generic server. However if the server implements a dynamic address space then item properties requests for items that are not yet added to the server cache need to include the properties 1..6 because the generic server does not yet have any information about the item. |
Virtual address space browsing sample code |
The wizard creates sample code for virtual address space browsing if browse mode VIRTUAL is selected and ConfigBuilder sample code is not selected. The created sample code implement the OPC browse methods and creates the items dynamically in the ValidateItems method, when the items are first accessed by a client. |
ProgId | The OPC server will be registered with this ProgId. From the definition on page 1 a suggestion is created: e.g. "Advosol.CSsampleDA.1" This suggestion may be modified in any suitable way. |
Description | The OPC server will be registered with this definition as the friendly name. From the definition on page 1 a suggestion is created: e.g. "Advosol.CSsample DA Server V1.0" This suggestion may be modified in any suitable way. |
Version independent ProgId | The OPC server will be registered with this version independent ProgId. From the definition on page 1 a suggestion is created: e.g. "Advosol.CSsampleDA" This suggestion may be modified in any suitable way. |
Version independent Description | The OPC server will be registered with this definition as the version independent friendly name. From the definition on page 1 a suggestion is created: e.g. "Advosol.CSsample DA Server" This suggestion may be modified in any suitable way. |