DataqSdk Control > Methods > ADMethodList

Previous | Next

ADMethodList

Applies to:

DATAQSDK Active X Control

Description:

Allows you to leverage the intelligent over-sampling (IOS) features that are characteristic of Dataq Instruments’ hardware. Using the SampleRate and MaxBurstRate properties, you can independently define the rate at which software requests data (SampleRate) and the rate at which the hardware samples the data (MaxBurstRate).

MaxBurstRate divided by the number of channels is always greater than or equal to Sample Rate, but as the ratio of MaxBurstRate divided by the number of channels to SampleRate increases, the potential for IOS increases. For instance, let’s assume a MaxBurstRate value of 20,000 samples per second and a SampleRate value of 1 sample per second with 4 channels enabled. Each time the software requests a sample, the hardware has acquired 5,000 samples per channel. IOS, or ADMethodList, allows you to define how the excess samples are treated and reported by the hardware.

For maximum oversampling factor, Set MaxBurstRate to 250,000 if your signals come from sources with low enough impedances that crosstalk is not a problem. Crosstalk is specified as -75 dB at 100 KHz into the following channel loaded by 100 Ohm resistor to ground.

There are four options: last point (0), average (1), minimum (2), and maximum (3). These options may be defined on a per channel basis. Using the example above, last point simply reports the 20,000th point; minimum reports the lowest value of the 20,000; maximum, the highest value of the 20,000; and average, the average value of all 20,000 sampled points. In the context of our example, these calculated values are reported once per second.

Default is Average.

Syntax:

DataqSdk1.ADMethodList (variant) (where variant is the name given to the method list as specified by the programmer - in the example below, it is MethodList)

Example:

Dim ChannelList(32) As Integer

Dim MethodList (32) As Integer

 

Private Sub Form_Load()

ChannelList(0)=0

ChannelList(1)=1

ChannelList(2)=2

ChannelList(3)=13

ChannelList(4)=14

ChannelList(5)=15

 

'this sets up the first channel (labelled channel 1 on your hardware device) as taking the Last data point; the second, fifth, and sixth channels (labelled channels 2, 15, and 16 on your hardware device) as taking the Average of the data points; the third channel (labelled channel 3 on your hardware device) as taking the Minimum (lowest) data point; and the fourth channel (labelled channel 14 on your hardware device) as taking the Maximum (highest) data point

MethodList(0)=0

MethodList(1)=1

MethodList(2)=2

MethodList(3)=3

MethodList(4)=1

MethodList(5)=1

End Sub

 

Private Sub DataqSdk1_ NewData(ByVal Count As Integer)

DQChart1. Chart (DataqSdk1. GetData)

End Sub

 

Private Sub Start_Click()

DataqSdk1. ADChannelCount = 6

DataqSdk1. EventPoint = 20

DataqSdk1. ADChannelList (ChannelList)

DataqSdk1.ADMethodList (MethodList)

DataqSdk1. Start

End Sub

 

Private Sub Stop_Click()

DataqSdk1. Stop

End Sub

 

Reference Materials | Top