beautypg.com

A -api custom program models, Overview, Data acquisition environment – Measurement Computing Personal Daq rev.6.0 User Manual

Page 119: Application programming interface (api), Hardware capabilities and constraints, Signal environment, Api custom program models a

background image

Personal Daq User’s Manual Appendix A,

887095

API Custom Program Modules A-1

API Custom Program Models

A


Overview ……A-1
Data Acquisition Environment ……A-1

Application Programming Interface (API) ……A-1
Hardware Capabilities and Constraints ……A-2
Signal Environment ……A-2

Programming Models ……A-2

Initialization and Error Handling ……A-3
Foreground Acquisition with One-Step Commands ……A-4
Counted Acquisitions Using Linear Buffers ……A-5
Indefinite Acquisition, Direct-To-Disk Using Circular Buffers ……A-7
Multiple Channel Types……A-10

Summary Guide of Selected API Functions ……A-14

Overview

By using the Application Programming Interface (API) with Personal Daq systems, you can create custom
software to satisfy your data acquisition requirements. Appendix B explains the API functions in detail.
This appendix shows how to combine API functions to perform typical tasks. When you understand how
the API works with the hardware, you are ready to program for optimum data acquisition. To help you get
this perspective, this appendix is divided into 3 parts:

Data Acquisition Environment outlines related concepts and defines Personal Daq capabilities the

programmer must work with (the API, hardware features, and signal management).

Programming Models explains the sequence and type of operations necessary for data acquisition.

These models provide the software building blocks to develop more complex and specialized
programs. The description for each model has a flowchart and program excerpt to show how the
API functions work.

Summary Guide of Selected API Functions is an easy-to-read table that describes when to use the

basic API functions.

Data Acquisition Environment

In order to write effective data acquisition software, programmers must understand:

• Software tools (the API documented in this manual and the programming language—you may need

to consult documentation for your chosen language)

• Hardware capabilities and constraints
• General concepts of data acquisition and signal management

Application Programming Interface (API)

The API includes all the software functions needed for building a data acquisition system with the
hardware described in this manual. Appendix B (API Commands) supplies the details about how each
function is used (parameters, hardware applicability, etc). In addition, you may need to consult your
language and computer documentation.

Hardware Capabilities and Constraints

To program the system effectively, you must understand your Personal Daq hardware capabilities.
Obviously you cannot program the hardware to perform beyond its design and specifications, but you also
want to take full advantage of the system’s power and features. You may need to refer to manual chapters
that pertain to hardware capability. In addition, you may need to consult your computer documentation. In
some cases, you may need to verify the hardware setup, use of channels, and signal conditioning options.

Signal Environment

Important data acquisition concepts for programmers are listed below. You should also refer to
Appendix C, Signal Management and Troubleshooting, to gain a better understanding of signal-related
issues. These include:

This manual is related to the following products: