DataqSdk Control > Methods > GetDataEx

Previous | Next

GetDataEx

Applies to:

DATAQSDK Active X Control

Description:

This copies the acquired data into the buffer into an integer array as binary data. GetDataEx ensures waveform data continuity by passing a continuous stream of acquired data to your program. When using GetDataFrameEx to retrieve data, there are no guarantees that the returned information is gap-free or non-overlapping. Therefore, GetDataFrameEx is useful for returning a specified quantity of historical information. The data copied is aligned with the first channel. This data format cannot be used with LabView or Visual Studio.Net.

Note:

1) Make sure you have enough data available before you copy it, using the AvailableData property.

2) Make sure the array allocated is large enough to store all the data requested.

Syntax:

DataqSdk1.GetDataEx(A(0),Count) (A(0) is a pointer to a 16-bit integer array; Count is the number of data points, not scans, that you are requesting (32,767 maximum))

Example:

Dim A(10000) As Integer

 

Private Sub DataqSdk1_ NewData(ByVal Count As Integer)

DataqSdk1.GetDataEx A(0), Count

DQChart1. ChartEx A(0), 1, Count

Label1.Caption = A(0)

'the next line of code converts the integer into volts - see Converting Counts to Volts

Label2.Caption = Format((A(0) And -4) / 32768 * 10, "0.00")

End Sub

 

Private Sub Start_Click()

DataqSdk1. EventPoint = 20

DataqSdk1. Start

End Sub

 

Private Sub Stop_Click()

DataqSdk1. Stop

End Sub

 

* The digital inputs are embedded in the first channel of the data stream.

 

Reference Materials | Top