|
|
DataqSdk Control > Properties > ADCounter |
Applies to: |
DATAQSDK Active X Control |
Description: |
Each enabled data acquisition channel has an associated sample rate counter. The value of this counter + 1 determines how many samples to read before reporting one (for example, if ADCounter is 19 you report 1 data sample for every 20 read by the device) and may be used to define sample rates that are very close to an ideal rate. This property writes the specified counter value to all enabled channels (i.e., if ADCounter is set to 1 - the program reports half the data points in a manner determined by ADMethodList - so for every two samples per channel that come in - one is reported (SampleRate)). It may be used in conjunction with the property BurstCounter to define nearly-ideal sample rates. Valid values for this property range from 0 to 32,767. Default value is 0. When SampleRate and MaxBurstRate are set in your program, DataqSdk sets ADCounter and BurstCounter. If you set ADCounter and BurstCounter, it overwrites SampleRate based on the formula as displayed in BurstCounter. Use either SampleRate and MaxBurstRate OR ADCounter and BurstCounter. |
Syntax: |
DataqSdk1.ADCounter=variable (where variable is between 0 and 32,767) |
Variable: |
|
Example: |
Private Sub DataqSdk1_ NewData(ByVal Count As Integer) DQChart1. Chart (DataqSdk1. GetData) End Sub
Private Sub Start_Click() DataqSdk1. ADChannelCount = 1 DataqSdk1. EventPoint = 20 DataqSdk1. BurstCounter = 1000 DataqSdk1.ADCounter = 19 DataqSdk1. Start 'actual sample rate will be 800 Label1.Caption = Format(DataqSdk1. SampleRate,"0.00") End Sub
Private Sub Stop_Click() DataqSdk1. Stop End Sub |