ConfigDataCollection

NOTE:  This method was deprecated in V4-2.  The recommended method to set data collection properties is SetConnectionAttribute.

 

long ConfigDataCollection (Long Frequency, Long Duration, Long Flags);

 

Available (from release):

 

stOCX (V2-02), stPro Automation (V2-02).  

 

Note:  The function of the Flags parameter was enhanced to include HDA in release V4-1.

Return Value:

 

Nonzero if successful otherwise 0.

 

Parameters:

 

Name:

Description:

Frequency

The frequency in Milliseconds at which data will be collected.

Duration

The length (in seconds) of the cache used to store data.  Once the duration has been exceeded then the oldest data values will be overwritten (i.e. the cache is a circular buffer).

Flags

Defines how data is read.

 

  • For DA connections, the following options are available:

 

0

1

Cache

Device

Read from the Cache

Read from the Device

 

These define whether the data is read from a Cache or directly from the underlying Device.

 

  • For HDA connections, the following options are available:  

 

65536

786432

Interpolative

Actual

Show Interpolated data

Show only actual data points

 

These define whether data that is marked as having been Interpolated is to be displayed or ignored.

 

Note:  The Flags parameter is only applicable when connected to DA or HDA OPCServers.

 

Remarks:

 

Call this method to set the data collection properties when connecting directly to an OPC Data Source.

 

Note:  This method is not applicable when connected to a Sapphire Collector, since in that scenario it is the collector than defines the data collection characteristics