ConnectTo Method
Syntax
CWBinding.ConnectTo URL, AccessMode
Purpose
Connects the CWBinding object to a data source or target.
Remarks
The ConnectTo method sets the URL and AccessMode properties to the values of the URL and AccessMode parameters passed to the method.
If you connect a reading client to a DataSocket item that does not exist, the DataSocket Server creates the item with a default value of 0.
If you want to manipulate data as it is written or read, set the DataUpdatedEnabled property to True so that the CWBindingDataUpdated event is generated. The CWBindingDataUpdated event is generated when data is ready to be sent (in write mode) or has just been received (in read mode). You might use the CWBindingDataUpdated event to scale values or ignore them if they don't meet your criteria.
Parameters
URL As String
URL of the data source or target to which you are connecting.
AccessMode As CWDSAccessModes
Access mode of the connection.
Example
'Create a reference to a CWBinding object
'on CWGraph1
Dim Binding As CWBinding
Set Binding = CWGraph1.CWBindings.Item(1)
'Connect Binding to wave item on local DataSocket Server
Binding.ConnectTo "dstp://localhost/wave", cwdsReadAutoUpdate