Chapter 3
14
Programming with the Low-Level API
Tel: 508-921-4600
www.ueidaq.com
Vers:
1.4
Date:
September 2010
File:
AO-308-353 Chap3.fm
© Copyright 2009
United Electronic Industries, Inc.
CL[n] = n;
}
STEP 2:
Create and initialize host and IOM sides.
// Now we are going to test device
// DqAcbCreate(pDqe, hd0, DEVN, DQ_SS0IN, &bcb);
// Let’s assume that we are dealing with AI-201
//device
dquser_initialize_acb_structure();
// Now call the function
DqAcbInitOps(bcb,
&Config,
0, //TrigSize,
NULL, //pDQSETTRIG TrigMode,
&fCLClk,
0, //float* fCVClk,
&CLSize,
CL,
0, //uint32* ScanBlock,
&acb);
printf("Actual clock rate: %f\n", fCLClk);
// Now set up events
DqeSetEvent(bcb,
DQ_eFrameDone|DQ_ePacketLost|DQ_eBufferError|DQ_eP
acketOOB);
// Allocate data buffer
datta = dquser_allocatebuffer();
// Pre-fill ACB with raw data
dquser_prefillbuffer(data);
DqAcbPutScansCopy(bcb, data, // buffer
bufsize, // buffer size in
//scans
bufsize, // minimum size
&size, // actual copied
//size (from user
// buffer into ACB)
&avail);
// available free
// space in buffer
STEP 3:
Start operation.
// Start operations
DqeEnable(TRUE, &bcb, 1, FALSE);
Содержание DNx-AO-308-353
Страница 3: ...iii ...