DNx-AI-208 Analog Input Layer
Chapter 3
14
Programming with the Low-Level API
Tel: 508-921-4600
www.ueidaq.com
Vers:
4.6
Date: November 2013
File:
AI208 Chap3.fm
© Copyright 2009
United Electronic Industries, Inc.
avail = minrq;
while (TRUE) {
DqAcbGetScansCopy(bcb, data, acb.framesize,
acb.framesize,
&size, &avail);
s= size*CHANNELS;
for (i = 0; i < size * CHANNELS; i++) {
fprintf(fo, "%f\t", *((float*)data + i));
if ((i % CHANNELS) == (CHANNELS - 1)) {
fprintf(fo, "\n");
}
}
printf("eFD:%d scans received (%d samples) min=%d
avail=%d\n", size,
samples, minrq, avail);
if (avail < minrq) {
break;
}
}
}
}
STEP 5:
Stop operation.
DqeEnable(FALSE, &bcb, 1, FALSE);
STEP 6:
Clean up.
DqAcbDestroy(bcb);
DqStopDQEngine(pDqe);
DqCloseIOM(hd0);
#ifndef _WIN32
DqCleanUpDAQLib();
#endif
3.5
Using Layer
in DMap
mode
#include "PDNA.h"
STEP 1:
Start DQE engine.
#ifndef _WIN32
DqInitDAQLib();
#endif
// Start engine
DqStartDQEngine(1000*10, &pDqe, NULL);
// open communication with IOM
hd0 = DqOpenIOM(IOM_IPADDR0, DQ_UDP_DAQ_PORT, TIMEOUT_DELAY,
&DQRdCfg);
// Receive IOM crucial identification data
DqCmdEcho(hd0, DQRdCfg);