Program Interface Library
Windows, VxWorks, and Linux Programming
CEI-100/CEI-200/CEI-
x20 User’s Manual
58
CEI-x20 Programming
The software distribution includes a robust Application Programming
Interface (API) library for each CEI-x20 device. The CEI-220, -420, and -
420A support the
standard
API, while the CEI-520, -520A, -620, -820, and
-820TX support the
enhanced
API. The enhanced API is a superset of the
standard API.
Under Windows, the standard API (CEI-220/420/420A) is provided as a
32-bit DLL and both 32-bit and 64-bit DLLs are provided for the enhanced
API (CEI-520/520A/620/820/820TX). The 32-bit standard and enhanced
API DLLs are named CEI22032.DLL, and the enhanced 64-bit API DLL
is named CEI22064.DLL. To interface with the API from a user
application, link with one of the provided Microsoft-compatible or
Borland-compatible LIB files. Link 32-bit applications with
CEI22032.LIB, and link 64-bit applications with CEI22064.LIB.
The CEI-x20 Windows installer automatically determines the correct 32-
bit API DLL for the device type being installed and copies it into the 32-
bit Windows system folder. If running under 64-bit Windows, the correct
64-bit API DLL is copied into the 64-bit Windows system folder as well.
To determine which 32-bit API DLL is in use under 32-bit or 64-bit
Windows, use Windows Explorer to browse to the file CEI22032.DLL in
the 32-bit Windows system folder (typically ‘c:\winnt\system32’ or
‘c:\windows\system32’ under 32-bit Windows or ‘c:\windows\syswow64’
under 64-bit Windows). Under the Version or Details tab, the
File
Description
field lists the board types supported by the DLL. The product
list should include the board type you are trying to access. Similarly, to
determine which 64-bit API DLL is in use under 64-bit Windows, inspect
the file CEI22064.DLL in the 64-bit Windows system folder (typically
‘c:\windows\system32’ under 64-bit Windows).
CEI-x20 products also support operation under Linux. The Linux
installation resides in a separate folder on the distribution CD, and Linux
installation instructions can be found in the file, Linux_x20_install.txt, in
the root directory on the distribution CD. Under Linux, the installer places
a shared library under the /usr/lib directory. The library installed depends
on the selected device type. Installation of the CEI-220/420 places
libcei22032.so under /usr/lib, installation of the CEI-520/620/820 places
libceix2032.so under /usr/lib, and installation of the CEI-820TX places
libcei820tx32.so under /usr/lib. All Linux libraries are compiled with the
GNU C compiler (gcc).
Link your application to the shared library by including –lcei22032, –
lceix2032, or –lcei820tx32 in your Makefile or on the command line. For
example:
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com