DataqSerial Control > Methods > GetData

Previous | Next

GetDataEx

Applies to:

DATAQSERIAL Active X Control

Description:

Similar to GetData, GetDataEx returns waveform data to an integer array as binary data. The data will be aligned with the first channel. Sometimes it is necessary to process the data before it is displayed. the variant returned from GetData is difficult to access in VB, since variant operation controls are not easy to find. In this case, it is much easier to access an integer array.

Note:

1) Make sure you have enough data available before you copy it.

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

Syntax:

variable=DataqSerial1.GetDataEx(A(0),Count) (where A(0) is a pointer to the 16-bit integer array, A and Count is the number of data points that you are requesting (32,767 max))

Example:

Dim A(10000) As Integer

 

Private Sub Start_Click()

DataqSerial1. EventLevel=20

DataqSerial1. Start

End Sub

 

Private Sub Stop_Click()

DataqSerial1. Stop

End Sub

 

Private Sub DataqSerial1_ NewData (ByVal Count As Integer)

DataqSerial1.GetDataEx A(0),Count

DQChart1. ChartEx A(0),1,Count

End Sub

 

Reference Materials | Top