Data Acquisition (DAQ) and Control from Microstar Laboratories

Developer's Toolkit for DAPL

data acquisition filtering data acquisition software channel architecture enclosures services

DTD: Make your own onboard intelligence

Visit the reformatted DTD Web site pages.

DAPtools Basic

DAPtools Standard

DAPstudio complete

DAPcell Network Software

Developer's Toolkit for DAPL

With the Developer's Toolkit for DAPL, an experienced developer can extend the functionality of DAPL by creating command modules. Command modules can be written to meet any specialized processing or control requirements.

The current version of the Developer's Toolkit for DAPL, version 5.03, works with the current version of DAPL 2000, version 2.53, for command module development. Modules are pieces of code that can be installed, similar to the custom commands created with earlier DTD versions. The DAPL IIR Filter Module is an example of a command module of code. It is included in the DAPtools Standard package.

Why use the Developer's Toolkit for DAPL?

DAPL recognizes more than 100 predefined commands. These are sufficient for most applications. Sometimes, however, an application requires a DAPL command module. For example, the predefined DAPL PID command implements the standard PID algorithm, but a closed-loop control system may need a specialized algorithm instead of PID.

If you would prefer that we develop a command module for you, contact the System Integration group. Creating command modules is just one of the services they can provide for your data acquisition application.


Use a command module when

  • an application requires complex processing which is most easily implemented in C or C++;
  • an application requires complex software triggers which are most easily implemented in C or C++;
  • an application requires merging many DAPL commands into one command module to improve performance;
  • a control algorithm requires complex processing or very low latency;
  • a control algorithm must disable multitasking and take over the onboard processor;
  • an existing C algorithm is to run in the DAP to improve performance.

In any of these situations, the Developer's Toolkit for DAPL is the tool for the job. It provides tools for creating command modules using Microsoft C++ or Borland C++, optionally with critical sections in assembler.


The Developer's Toolkit for DAPL includes a run-time library with easy-to-use data acquisition function calls, a complete manual, many examples, and batch files for quickly compiling and building command modules. A command module can make calls to almost all standard C routines. In addition, the Developer's Toolkit for DAPL provides

  • access to DAPL data structures * pipes, variables, vectors, constants, and triggers
  • timing functions
  • functions for customized PID control
  • string formatting and output
  • control of the analog and digital output hardware
  • ability to transfer data and communicate with the PC
  • access to DAPL system commands
  • starting and stopping tasks, returning information on global DAPL data structures
  • access to floating point processing

Any number of command modules and predefined commands can run simultaneously on the DAP under DAPL. This can include multiple instances of the same command module. A command module can be run under DAPL exactly like any other DAPL command.


A typical command module consists of four sections of code: initialization, input, processing, and output. Initialization code reads and validates the parameters of the command module. After initialization, the command module enters an endless loop of input, processing, and output. DAPL controls how long the task runs, and switches among tasks when appropriate. Also, the task itself can release control of the processor to allow DAPL to switch to another task.


Most command modules do not involve extensive programming. A template for the simplest command modules is given below. This template provides all the code necessary to read in input data, process the values, and output the results.

/* PROCESS (PipeIn, PipeOut) */
#include  "CDAPCC.H"

void main (PIB **plib)
    void  **argv;
    int   argc, iSample;
    PIPE  *PipeIn, *PipeOut;

    /* Access task parameters */
    argv = param_process( plib, &argc,
        2, 2, T_PIPE_W, T_PIPE_W );
    PipeIn = (PIPE *) argv[1];
    PipeOut= (PIPE *) argv[2];

    /* Initialize */

    /* Run */
    while (1)
        iSample = pipe_get(PipeIn);
        /* Put your algorithm here */

This is the simplest template for a command module. The possibilities are limited only by your imagination.

Contact Microstar Laboratories for additional information.


Return to the Software page.