User`s manual
CYDAS UDR Library User’s Guide CYDAS UDR Library Description and Use
13
Memory models
Both Borland and Microsoft C compilers support different memory models. The CYDAS UDR Library comes
with the following four versions of the library.
CBCC.LIB - For use with compact model
CBCS.LIB - For use with small model
CBCM.LIB - For use with medium model
CBCL.LIB - For use with large and huge model
Large data arrays
The CYDAS UDR Library supports input and output from very large (>64K) amounts of data. If your
program requires storage and transfer of large single data sets, you must compile it for the "huge" model and
use the CBCL.LIB library. If you declare an array to hold the data, it should be declared
__huge.
If you allocate memory (as is done in the example programs using
malloc) it should be allocated using
_halloc (Microsoft) or halloc (Borland), the pointer declared as __huge and memory freed using _hfree
(Microsoft) or
hfree (Borland). Note that you must also include the malloc.h header.
Compiling the sample C programs
The example programs demonstrate how to call each of the CYDAS UDR Library functions from a C
program. Two batch files are provided that show how to compile and link the sample programs using the
Microsoft and Borland compilers.
MAKEMC16.BAT - compile and link with Microsoft C
MAKETC16.BAT - compile and link with Borland C
Using the Library with HP VEE
The CYDAS UDR Library with HP VEE includes a complete interface to HP VEE providing a
DataAcq-specific menu bar addition and functions as well as complete examples of all the library functions.
To understand how the interface to HP VEE interacts with I/O boards, you need to study both this manual and
the example programs. This manual is written for symbolic programming languages such as BASIC and C.
VEE is a graphical programming language.
It is very important that you scan the entire manual for information that relates to general performance.
Remember, VEE is using the entire CYDAS UDR Library as the interface to the I/O boards. Limitations and
performance factors in the library are reflected in VEE programs that use the library. The manual contains
related information throughout the contents. We encourage you to review the entire manual.
The CYDAS UDR Library interface to VEE follows the structure of the library as it is used with all other
languages. The arguments presented here in symbolic format are the same arguments you will need to specify
when using VEE to control an I/O board. The manual explains the functions and each of the arguments. The
VEE examples show how the function is interfaced to VEE and show how to use the function to control the
I/O boards.
There is one exception to this rule: the programming argument
MemHandle is replaced in VEE with the
argument
DataArray. VEE allocates data arrays directly. Windows programming languages use another
method of pointing to data arrays. In addition to a name change, there is some VEE programming logic done
to dimension a two-dimensional data array for all multichannel operations. This logic can be seen by
examining the design view of the function.