beautypg.com

Returns, Function usage – Measurement Computing Data Acquisition Systems rev.10.4 User Manual

Page 98

background image

Returns

DerrNotCapable

No digital or counter

DerrInvGain

Invalid

gain

DerrInvChan

Invalid

channel

DerrNoError

No error

For more details on error messages, please refer to the Daq Error Table.

This function may not return an error immediately.
daqAdcArm

or daqAdcSetRate may return an error from the scan list.

Function Usage

Scan Sequence Configuration

The daqAdcSetScan function is the method by which the scan sequence is programmed. The channel scan
is comprised of all channels configured for scanning. When a user application sets each of the values in the
channels, gains and flags arrays and passes these array pointers to daqAdcSetScan, the driver interprets
each array element as a configuration variable for the corresponding scan element. The following table
demonstrates this relationship:

Array

Location

Scan

Location

Channels

Array Elements

gains

Array Elements

flags

Array Elements

0 0 Channels(0)

gains(0)

flags(0)

1 1 Channels(1)

gains(1)

flags(1)

2 2 Channels(2)

gains(2)

flags(2)

3 3 Channels(3)

gains(3)

flags(3)

4 4 Channels(4)

gains(4)

flags(4)

chanCount+1 chanCount+1 channels(chanCount+1) gains(chanCount+1) flags(chanCount+1)


As many as 512 channel entries can be made in the acquisition scan group configuration. Any analog input
channel can be included in the scan group configuration at any valid gain setting. Scan group configuration
may be composed of local or expansion channels (and, for the DaqBook/DaqBoard, the high-speed digital I/O
port). Each of the parameters that define the scan group are described in more detail below:

The channels parameter is a pointer to an array of up to 512 channel values. Each entry represents a
channel number in the scan group configuration. Channels can be entered multiple times at the same or
different gain and flags settings.

The gains parameter is a pointer to an array of up to 512 gain settings. Each entry in the gain array
represents the gain to be used with the corresponding channel entry. Gain entry can be any valid gain setting
for the corresponding channel.

The flags parameter is a pointer to an array of up to 512 channel flag settings. Each entry in the flag array
represents a 4-byte-wide bit map of channel configuration settings for the corresponding channel entry. The
flags can be used to set channel-specific configuration settings such as polarity [and channel type for
DaqBook/2000 Series, DaqLab/2000 Series, DaqScan/2000 Series, DaqBoard/2000 Series, DaqBoard/1000
Series and cPCI DaqBoard/2000c Series boards]. The channel may require further configuration. If this is the
case, then see the daqSetOption function for further channel configuration instructions.

4.2-42 Daq API Command Reference

988594

Programmer’s Manual