Chapter 3
10
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.
Chapter 3
Programming with the Low-Level API
This section describes how to program the PowerDNA cube using the
low-level API. The low-level API offers direct access to PowerDNA
DAQBIOS protocol and also allows you to access device registers
directly.
We recommend that, where possible, you use the UeiDaq Framework
high-level API (
“Programming with the Ueidaq Framework API” on
page 8), which is easier to use than the low-level API.
You need to use the low-level API only if you are using an operating
system other than Windows.
3.1
Configuration
Settings
Configuration settings are passed in
DqCmdSetCfg()
and
DqAcbInitOps()
functions.
Not all configuration bits apply to DNA-AO-308x series (AO-308, AO-
308-350, AO-308-353, AO-308-420) boards, however. The following bits
make sense:
#define DQ_FIFO_MODEFIFO (2L << 16)
// continuous acquisition with FIFO
#define DQ_LN_MAPPED (1L<<15)
// For WRRD (DMAP) devices
//(automatically selected)
#define DQ_LN_STREAMING (1L<<14)
// For RDFIFO devices - stream the FIFO data
//(automatically selected) For WRFIFO - do NOT
//send reply to WRFIFO unless needed
#define DQ_LN_IRQEN (1L<<10) //enable irqs
#define DQ_LN_PTRIGEDGE1 (1L<<9)
// stop trigger edge MSB
#define DQ_LN_PTRIGEDGE0 (1L<<8)
// stop trigger edge: 00 - software,
// 01 - rising, 02 – falling
#define DQ_LN_STRIGEDGE1 (1L<<7)
// start trigger edge MSB
#define DQ_LN_STRIGEDGE0 (1L<<6)
// start trigger edge: 00 - software,
//01 -rising, 02 - falling
#define DQ_LN_CVCKSRC1 (1L<<5)
// CV clock source MSB
#define DQ_LN_CVCKSRC0 (1L<<4)
// CV clock source 01 - SW,10 - HW, 11 –EXT
#define DQ_LN_CLCKSRC1 (1L<<3)
// CL clock source MSB
#define DQ_LN_CLCKSRC0 (1L<<2)
// CL clock source 01 - SW,10 - HW,11 –EXT
#define DQ_LN_ACTIVE (1L<<1)
Summary of Contents for DNx-AO-308-353
Page 3: ...iii ...