beautypg.com

Measurement Computing Data Acquisition Systems rev.10.4 User Manual

Page 13

background image

Programmer’s Manual

988594

API Programming, General Models 2-3

Here we are only configuring channels on the main unit. If configuring DBK expansion options

each DBK channel needs to be programmed into the channel scan sequence. You may also

need to set more specific channel configuration options. For this, refer to the sections

regarding your specific DBK expansion card.

The following shows how to program the channel scan sequence.

DaqAdcGain

gains[CHANCOUNT] = {DgainX1, DgainX2, DgainX8, DgainX4};

DWORD channels[CHANCOUNT] = {0,1,2,3};
DWORD flags[CHANCOUNT] = {DafAnalog|DafBipolar,DafAnalog|DafUnipolar,
DafAnalog|DafBipolar, DafAnalog|DafUnipolar};


err = daqAdcSetScan(handle, channels, gains, flags,CHANCOUNT);

Related API’s*

Description

DaqAdcSetScan

Performs basic channel scan sequence configuration, sets up

channel scan information

DaqAdcSetMux

Same as daqAdcSetScan but sets all channels to the same

configuration parameters

DaqAdcSetOption

Used to configure more complex configuration options for

individual channels

DaqAdcExpSetBank

Used to setup channel banks/blocks for use with DBK

expansion

*See the

API Command Reference chapter for detailed information.

2. Configure Acquisition Events – How Should the Acquisition Start and Stop?

In this section we describe how to configure the Starting and Stopping Events for your

acquisition. Each acquisition needs to have well defined Start and Stop Events. A Start Event

can be as simple as start the acquisition immediately upon arming. An acquisition Stop Event

can be as simple as Stop upon disarming the acquisition. The number and type of start and

stop events is dependent upon the capabilities of the data acquisition device and vary from

product to product. Acquisitions may also be defined with pre-trigger data. The amount of

pre-trigger data can vary.

err = daqAdcSetAcq(handle, DaamNShot, 0,SCANS);
err = daqSetTriggerEvent(handle,DatsSoftware, NULL,NULL,NULL,NULL,NULL,
DaqStartEvent);
err = daqSetTriggerEvent(handle,DatsScanCount,NULL,NULL,
NULL,NULL,NULL,NULL, DaqStopEvent);

Related API’s*

Description

daqAdcSetAcq

Configures acquisition modes as well as pre and post trigger

scan counts

daqSetTriggerEvent

Configures Start/Stop Trigger Events.

daqAdcSetTrig

Used to configure Start Trigger Event

daqAdcCalcTrig

Used to calculate Analog level in A/D counts for use in

daqAdcSetTrig

*See the

API Command Reference chapter for detailed information.