beautypg.com

Measurement Computing Data Acquisition Systems rev.10.4 User Manual

Page 12

background image

2-2 API Programming, General Models

988594

Programmer’s

Manual

Signal Environment

Important data acquisition concepts

for programmers are listed below and are discussed in

your device user’s manual.

Channel Identification

Scan Rates and Sequencing. With multiple scans, the time between scans becomes a

parameter. This time can be a constant or can be dependent upon a trigger.

Counter/Timer Operation

Triggering Options. Triggering starts the A/D conversion. The trigger can be an

external analog or TTL trigger, or a program controlled software trigger.

Parameters in the various A/D routines include: number of channels, number of scans, start of

conversion triggering, timing between scans, and mode of data transfer. Up to 512 A/D

channels can be sampled in a single scan. These channels can be consecutive or non-

consecutive with the same or different gains. The scan sequence makes no distinction

between local and expansion channels.

Seven Easy Steps to Data Acquisition

The sections that follow this one demonstrate various methods for designing and developing a

data acquisition application. Though these models vary widely in their purpose and

individually can seem quite complex most all employ a basic framework that is repeated

elsewhere in other models. This section will discuss the basic framework required to develop a

simple data acquisition application. The basic framework outlined here will be a re-occuring

theme through most, if not all, the subsequent programming models.

Each data acquisition task can be broken down into the following basic elements:

1. Configuring Channels – What Type of Channels? How Many?
2. Configuring Acquisition Events – How Should the Acquisition Start and Stop?
3. Setting the Acquisition Rate – How Fast Should the Channels be Scanned?
4. Setting up the Buffer Model – How Should the Data be Stored?
5. Arming the Acquisition and Starting the Transfer
6. Triggering the Acquisition
7. Monitoring the Acquisition and Receiving Data

While this basic framework is not comprehensive, it does provide a basic model and a theory

of operation from which to start developing your data acquisition application. Provided with

each step is a description of the task and its general function, as well as representative code

snippets from which an application can be developed and a table of related API functions

which may be used to implement the step.

1. Configure Channels – What Type of Channels? How Many?

Every data acquisition has one or more channels from which data is to be acquired. The

channels to be scanned comprise the channel scan configuration. Channels are added to the

channel scan sequence in the order that they are programmed. Even if some channels are

repeated in the channel scan sequence they are added to the channel scan sequence in the

programmed location.

NOTE: Hereafter, the term Channel Scan (or Scan) refers to the entirety of the channel scan

sequence configuration. In other words, a

Channel Scan (Scan) is comprised of all the

channels programmed into the channel scan sequence.