62
Chapter 8: Developing Your Application
8.1 Write the application program
The first step in developing your motion application is to write and compile a program on a host
PC using your standard PC development tools. This process involves integrating the MEI C
function libraries with your compiler of choice, developing your motion application, and
compiling the application along with the appropriate libraries.
Because the DSPpro executes DOS on-board, it is important to be sure to compile
16-bit targets
from your development environment. You can do this by calling your compiler from a DOS
prompt, or by selecting a 16-bit build from within your Windows development environment.
Consider the following example which assumes a DOS development environment and the
Borland Turbo C compiler. If your application is called YOURAPP.C, you would type the
following at the command prompt:
C:\TEST> bcc -ml yourapp.c medbc45l.lib
This calls the Borland command-line C compiler and supplies it with the source code of the
program under development (
yourapp.c
) along with the appropriate MEI function libraries (in
this case
medbc451.lib
).
If you are using Microsoft Visual C++, you would use the following command to compile
yourapp.c
:
C:\TEST> cl /AL yourapp.c medcl80l.lib
MEI supplies pre-compiled C function libraries for many popular compilers, and source code
libraries to use with unsupported development environments.
8.2 Testing the Application Program
If you have access to a computer with a standard MEI bus-based DSP Series motion controller
(e.g. PCX/DSP, LC/DSP, etc.), we strongly recommend using it as an application development
platform—the software should require no changes to run in the DSPpro.
When you reach the final stages of your development, you will want to execute the application
directly on the DSPpro CPU. MEI has developed utilities that enable the DSPpro to use the
keyboard and screen capabilities of the host system to provide a console for the DOS shell
running on the DSPpro. Using these utilities, your program can send diagnostic and other
information from the DSPpro to the host computer across the serial connection.
The utility to communicate with the DSPpro-Serial and DSPpro-VME is called REMSVR. The
only difference between the two utilities is that RCONSOLE communicates with the DSPpro
directly through the PC’s ISA bus, while REMSVR communicates with the DSPpro-Serial and
DSPpro-VME using the console port and a null-modem cable.
The following diagram illustrates this connection:
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com