Dataman 520 Series User Manual
Page 7
Development kit for DATAMAN 520 series
Programmer’s Guide
Data(DataBuffer, Length,
SamplesCount, DataStatus,
TriggerStatus)
Data(DataBuffer, Length,
SamplesCount, DataStatus,
TriggerStatus)
No
Yes
Is DataStatus = True?
Any processing
Data are ready in buffer
Figure 2.3.1. – Data acquisition loop
int SamplesCount, TriggerStatus;
bool DataStatus;
unsigned short int DataBuffer[8192];
while (1)
{
Data(DataBuffer, 8192, SamplesCount, DataStatus, TriggerStatus);
if (DataStatus)
{
for (int i = 0; i < 8192; i++)
{
fBufferA[i]
=
DataBuffer[i]
&
0xff;
fBufferB[i] = (DataBuffer[i] >> 8) & 0xff;
}
UpdateWithNewData();
}
}
return 0;
New data are stored in the DataBuffer each time the
function returns with
successful data acquisition.
- 7 -