Backplane api files – ProSoft Technology MVI69-ADM User Manual

Page 64

Advertising
background image

Understanding the MVI-ADM API

MVI-ADM ♦ 'C' Programmable

Developer's Guide

'C' Programmable Application Development Module

Page 64 of 342

ProSoft Technology, Inc.

February 20, 2013

3.7

Backplane API Files

The backplane API provides a simple backplane interface that is portable among
members of the MVI family. This is useful when developing an application that
implements a serial protocol for a particular device, such as a scale or barcode
reader. After an application has been developed, it can be used on any of the
MVI family modules.

The following table lists the supplied backplane API file names. These files
should be copied to a convenient directory on the computer on which the
application is being developed. These files need not be present on the module
when executing the application.

File Name

Description

MVIbpapi.h

Include file

MVIbpapi.lib

Library (16-bit OMF formatted)

3.7.1 Backplane API Architecture

The MVI API is composed of two parts: a memory resident driver (called the MVI
driver) and a statically-linked library (called the MVI library). Applications using
the MVI API must be linked with the MVI library. In addition, the MVI driver must
be loaded before an MVI API application can be executed.

This architecture makes it possible to design MVI applications that can be run on
any of the MVI family of modules without modification or even recompilation.

Data Transfer

The primary purpose of the API is to allow data to be transferred between the
module and the Controller. The API supports two types of data transfer functions:
Direct I/O and Messaging. Each of these methods has advantages and
disadvantages. The appropriate function for use will mainly depend upon the
amount of data to be transferred.

Direct I/O Access
For small amounts of data (that is, data that will fit into the specific module’s input
or output image), the direct I/O functions provide simple, fast access to the
module’s input and output images. This is the simplest and fastest way to
transfer data to and from the control processor, because the control processor
code accesses the mo

dule’s I/O image as it would for any other I/O module.

The disadvantage of this method is that the amount of data that can be
transferred is limited by the size of the module’s I/O image.
The direct I/O functions are MVIbp_WriteInputImage (page 215) and
MVIbp_ReadOutputImage (page 214).

It is important to note that if messaging is used, a portion of each I/O image must
be reserved for messaging, and therefore will not be available for direct I/O
access. One word of input and one word of output are required for messaging
control for each direction of desired data flow.

Advertising