Chapter 6: AD12-8 Windows Driver Reference
Manual Number: 00650-014-4
Page 6-1
Chapter 6:
AD12-8 Windows Driver Reference
Driver Features
The Windows driver is implemented as a dynamic-link-library(DLL). There is no need to explic-
itly link this driver to your application, this linkage is performed at run-time by Windows.
There is a single point list in the driver. Thus, your point list can read points in the system in any
desired order. For more information on point lists, read the section in
Chapter 5
, entitled
The
Point List Concept
.
This driver supports thermocouples of types B,E,J,K,R,S and T. (The driver also
supports both 385 and 392 alpha RTDs.) You may use these thermocouples at any gain supported
by the AT16-P and the driver will compensate accordingly. Also, support for the AT16-P reference
junction is provided. The reference junction may be assigned to channel 0 of its AT16-P or to a
dedicated AD12-8 channel. If you assign the reference junction to a discrete AD12-8 channel, the
driver provides the means to indicate which AT16-P to apply the reference compensation.
You may find using the auto-configuration feature of the driver helpful and time saving. Use the
setup program provided to configure the card the way you intend to use it, then use auto-configura-
tion when you initialize the driver. All points will be set up for gain and curves, and, installed in the
point list.
Using the Driver
The following are the steps that you should take to use the driver with your application. The driver
has been tested with Microsoft Visual BASIC, version 3.0 and Borland C/C++, version 3.1 compil-
ers. The discussion that follows is intended for those compilers, but the principles should apply to
any compiler that uses the Pascal calling convention.
Tell your application about the driver.
The application needs to know the function prototypes of
the routines in the driver that you will use.
In C or C++, the function prototype will look like the example below.
extern C int PASCAL AD128_Init(int config,int addr,int range);
The extern C portion of the declaration tells the compiler not to use the C++ type of function call.
C++ and C function calls are not compatible. A file that defines all function prototypes for the
driver, as well as useful constants, is included in the
CPPWIN
directory. You may include this file
in your own application. Place the line of code below in the main global module of your program.
#include A12DRV.H
In Borland C/C++, you must also add the file
A12DRV.LIB
to your project file. See your docu-
mentation for creating and managing a project file.
In Visual BASIC, all that is needed is the function prototype which will look like the example on
the next page.