Developer's Toolkit for DAPL | ||||||||||||
DTD: Make your own onboard intelligenceVisit the reformatted DTD Web site pages.
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. ApplicationsUse a command module when
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. FeaturesThe 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
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. StructureA 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. TemplateMost 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 */ pipe_open(PipeIn,P_READ); pipe_open(PipeOut,P_WRITE); /* Run */ while (1) { iSample = pipe_get(PipeIn); /* Put your algorithm here */ pipe_put(PipeOut,iSample); } } 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. |