# ReadMe: VersaAPI 1.0 Installation

### Application Programing Interface (API) for VersaLogic Mini PCIe Modules

Boards Supported | Analog Input (VL-MPEe-A1/A2) Serial + GPIO (VL-MPEe-U2)
OS Version | Windows 7 (32-bit)

## TABLE OF CONTENTS

1. Legal Disclaimer
2. Introduction
3. Installing the Device Drivers
4. Calling the API Functions

## 1.0 LEGAL DISCLAIMER

VersaLogic is making no claims of usability, efficacy or warranty. Information in this document is provided in connection with VersaLogic products. No license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted by this document. VersaLogic assumes no liability whatsoever, and VersaLogic disclaims any express or implied warranty relating to the sale and/or use of VersaLogic products, including liability or warranties relating to fitness for a particular purpose, merchantability or infringement of any patent, copyright or other intellectual property right. VersaLogic products are not intended for use in life-saving or life-sustaining applications.

VersaLogic disclaims all warranties and liabilities for the use of this document and the information contained herein, and assumes no responsibility for any errors which may appear in this document, nor does VersaLogic make a commitment to update the information contained herein. VersaLogic reserves the right to make changes to this document at any time without notice.

## 2.0 INTRODUCTION

The VersaLogic Application Programming Interface (VersaAPI) software suite includes a number of components for use on 32-bit Windows 7.

- Dynamic Link Libraries
- Linker files for linking with your application
- Device drivers for particular pieces of hardware
- OEM device drivers (for example the EXAR serial port drivers for the VL-MPEe-U2)

This read-me file provides instructions for using this software library with applicable VersaLogic Mini PCIe modules, such as the Analog Input module (VL-MPEe-A1/A2) and the Serial + GPIO module (VL-MPEe-U2). Before you begin the installation, download the software zip file and extract its contents into a temporary directory. Take note of the location of the temporary directory for access during these instructions.

## 3.0 INSTALLING THE DEVICE DRIVERS

1. Install the Mini PCIe card into your system as described in the module's reference manual. After the hardware is installed, Windows 7 will indicate that a new device has been added to your system in the Device Manager:
2. Right-click on the device and select "Update Driver Software ...". The driver update dialog box opens, enabling you to select a source location for the device driver software. Select "Browse my computer for driver software." The browse dialog box opens.
3. Browse to the temporary directory to which you extracted the VersaAPI files and select the directory. You will be presented with a warning that the driver file is unsigned. (Windows cannot verify the publisher of this software.) Select the option to install anyway. You will see a progress bar as the PCI Data Acquisition and Signal Processing Controller is installed.
   A message indicating successful installation should display.

VersaAPI is now ready for use with Microsoft Visual Studio 2008 to develop applications that can take advantage of the analog-to-digital and digital I/O capabilities of VersaLogic Mini PCIe modules.

## 4.0 CALLING THE API FUNCTIONS

The API functions are defined in the supplied header file VL_OSALib.h. This header file must be included in your application to be able to call the API functions. Also, the supplied library file VL_OSALib.lib must be linked into your application. This will enable your application to access the API calls in the supplied Dynamic Link Library (DLL).

### Call Examples

A typical sequence of calls would be:

> `VSL_Open
> VSL_GetVersion
> .
> .
> .
> `

Some combination of:

> `VSL_DIOGetChannelLevel
> VSL_DIOSetChannelLevel
> VSL_DIOSetChannleDirection`

And/or:

> `VSL_ADCSetAnalogInputRange
> VSL_ADCGetAnalogInput
> .
> .
> .
> VSL_Close`

### Notes

1. Your application must run at administrator level to be able to open the device driver that accesses the hardware. Without this step you will receive undefined results.
2. You will likely need to install the VS runtime executables for Visual Studio 2008 in order to run any applications using the API functions.
3. See the reference manuals of the supported Mini PCIe modules for details on making API calls. The manuals include parameter definitions, valid values, and valid return codes/values.
4. There is one additional call for users of the VL-MPEe-A1/A2 cards that allows the user to determine programmatically which of those cards is present in the system:

   > `VSL_GetADCType`

   See the header file for the function prototype and possible return values.

Copyright © 2013 VersaLogic Corp. All rights reserved.