AccessMode Property

Measurement Studio User Interface

AccessMode Property

Syntax

CWBinding.AccessMode

Data Type

CWDSAccessModes

You can use the following constants with this data type:

  • cwdsRead–Reads once when connected. You can trigger another read by calling the Update method.
  • cwdsReadAutoUpdate–Reads when connected and automatically reads again if the data at the data source is updated.
  • cwdsReadWriteAutoUpdate–Writes the current data once connected. The data is rewritten automatically if any attribute or value is set. Reads when connected and automatically reads again if the data at the data source is updated.
  • cwdsWrite–Writes the current data once connected. You can trigger the write again by calling the Update method.
  • cwdsWriteAutoUpdate–Writes the current data once connected. The data is rewritten automatically if any attribute or value is set.

Purpose

Specifies the read or write connection to make when connecting to the data source.

Remarks

Alternatively, you can set this property when you call the ConnectTo method.

Example

'Create a binding that charts wave data
'from a local DataSocket Server on a graph.
Dim Binding As CWBinding

'Add new CWBinding
CWGraph1.CWBindings.Add
Set Binding = CWGraph1.CWBindings.Item(1)

'Set AccessMode to automatically read and update
Binding.AccessMode = cwdsReadAutoUpdate
'Specify the data source on the DataSocket Server
Binding.URL = "dstp://localhost/wave"

'Bind the URL to CWGraph control, YData property
Binding.SetBindObject CWGraph1
Binding.BindProperty = "YData"

'Connect to data source
Binding.Connect

See Also

Connect

ConnectTo