The Server Object

To add a server either right-click the Node or press the 'Add Server' button on the toolbar to invoke the server selection form.



The form scans for network nodes when it comes up. Double-click on a node to check it for OPC servers. If no servers exist the timeout could be 20-30 seconds. These search actions run on a separate thread and will not block currently updating data. The status message and progress bar at the bottom gives feedback on the search progress. Double-click on the domain to refresh the list of network nodes. You can manually enter the server name of nodes that don't publish themselves on the LAN to add them to the tree. Once you select a server it will be added to the TagServer's tree control and then connected. The network node will also be added if it doesn't already exist. To explicitly connect or disconnect servers use the toolbar buttons or right-click and use the popup menu.



The disconnected state is indicated by the slashed circle over the tree item.



Select the server properties dialog to configure the server object.

Name - Give the server a descriptive name
Description - Add additional information to be saved with the server
Parent - Parent object in the tree
Guid, ProgID - The globally unique identifier and the program identifier are read when the server is located and can be inspected here. In theory, you could manually disconnect, change the ProgID or Guid and reconnect to access a different server on the same node. The Guid is used unless it doesn't exist and then the ProgID is used for getting COM objects and interfaces.
Vendor - Server vendor information
Version - Server version
Mode - Operational mode of the server
Connected - Is the server object connected to the server application?
WatchdogPeriod - This is the period, in milliseconds, to check communications by calling the OPC server's GetStatus method. If GetStatus fails, or times out, the server is disconnected and a PropertyChanged event is sent to subscribers that includes ServerMode.StatusCheckFail. The main form displays the associated error messages in the output window and detects that the 'Connected' property has changed to disconnected and applies the red slashed circle to the server's tree item.



WriteTimeoutPeriod - Writes are done asynchronously. This is the period of time to allow for a write conformation to be sent from the server before generating a write timeout error message. Write timeout messages are sent to subscribers of the TagServer's Errored event.

Copyright © 2004-2017 Industrial DOT NET, Inc.