Instruction manual

AMPDIO DRIVERS
Page 58
..\DIO_CODE\x64 for the “x64” build. If things are moved around, then the project settings need to
be adjusted accordingly (in which case it is probably easiest to copy the adioctl.h, dio_tc.h and
dio_tc.lib into the same directory as the rest of the application files).
For later versions of Microsoft Visual C++, the project files can be automatically converted to use
the new version when they are opened. It is possible to build the examples using the free “Express”
edition of Visual C++, but it will also be necessary to obtain and install Microsoft Platform SDK”
and configure the directories in the “Projects and Solutions” section in the “Options” dialog in Visual
C++ Express. In that section the following paths should be added to the appropriate subsections:
 Executable files: C:\Program Files\Microsoft SDK\Bin
 Include files: C:\Program Files\Microsoft SDK\include
 Library files: C:\Program Files\Microsoft SDK\Lib
(The above paths need to be changed if the Platform SDK has been installed somewhere else.)
These options are global, not part of a specific project, so they only need to be configured once.
The following header files from the ‘..\DIO_CODE’ directory are common to all the applications:
 adioctl.h
 dio_tc.h
In addition, the standard C header files and the Win32 header files are required, but should already
be in the standard include path.
For Microsoft Visual C++, the applications are linked to ‘..\DIO_CODE\dio_tc.lib’, which is a stub
library for DIO_TC.DLL. Note that ‘..\DIO_CODE\dio_tc.lib’ is not compatible with other non-
Microsoft compilers such as Borland C++ builder, but it is relatively straightforward to create a
‘dio_tc.lib’ file compatible with other compilers from the supplied ‘DIO_TC.DLL’ or
‘..\DIO_CODE\dio_tc.def’ files, e.g. using the IMPLIB utility for Borland C.
In addition to ‘dio_tc.lib’, the standard C libraries and Win32 libraries are linked to.
See the README.TXT file in the EX_C sub-directory for more information about the examples.
4.5.1 Capture Analogue Input to Comma-Separated Variables (CSV) or Binary File
This example demonstrates timed capture of analogue input data to a comma-separated variable
(CSV) file, which may then be opened in a spreadsheet program such as Microsoft Excel. It also
supports capturing to a raw binary file. It runs on the PC26AT, PC27E, PC30AT, PCI230 and
PCI260 cards.
It allows the user to choose a supported card from a list, then asks a series of questions about the
capture progress. Default answers in square brackets can be selected by pressing the carriage
return key. All user input to the program is from standard input so answers to questions could be
provided by redirecting standard input from a file.
Once the user has set up the capture process, it is started and captured input data is converted to
ASCII CSV format and written to the output file, either as raw numbers from the driver or as voltage
values.
The example uses interrupts. See the README.TXT file in the EX_C sub-directory for more
details.