<< Click to Display Table of Contents >>
ServerMachine |
This property determines the address of the station where the main OPC Server is executing. For applications executing locally, this property may remain blank (default). Otherwise, users must specify a path, such as "\\ServerName". If the OPC Server indicated in this property returns a value different from 1 (one, ServerStatus_Running) in the ServerStatus property, the OPC Driver tries to connect to the OPC Server indicated in the ServerMachine2 property, if that property is not an empty value and if the value of the ServerStatus property of that OPC Server is equal to 1 (one, ServerStatus_Running). This property can only be modified when the OPC Driver is disconnected. The next script contains an example of using this property.
Sub CommandButton1_Click()
Set Opc = Application.GetObject("OPCDriver1")
Opc.Deactivate
Opc.ServerId = "ElipseSCADA.OPCSvr.1"
Opc.ServerMachine = "\\server2"
Opc.Activate
End Sub