.

How to Use the MPI App Wizard
with Visual Studio 2010

Selecting the MPI App Wizard Template

 
  1. Start Microsoft® Visual Studio 2010.

  2. Open a new Visual Studio project.



    Select the MPI App Wizard template.
    Enter in a new Project name and specify its location.
    Click on the OK button.

    During any step, you can press the F1 key for an explanation of the options.

 

Steps for Creating the Sample Application

Step 1

The first step is to select the type of application code you wish to generate: C, C++, MFC.

MPI Application Type

C Application
App Wizard will create a single source file C application.

C++ Application
App Wizard will create a multiple source file C++ project that will include using exceptions for MEI errors.

MFC Application
App Wizard will create an MFC Dialog project that will include using exceptionsfor MEI errors.

Comment Options

Include Source Code Comments
If checked, the App Wizard will include source code comments explaining the common actions.
NOTE
: If unchecked, the App Wizard will still include comments that are viewed as important. This will not affect "standard" MEI files, such as MeiException.cpp and MeiException.h for C++ and MFC projects.

Include MEI Copyright
If checked, all sources will include the "standard" MEI copyright with the current year being the ending year of the copyright.
NOTE: Unchecking this option will not affect "standard" MEI files, such as MeiException.cpp and MeiException.h for C++ and MFC projects.

Step 2

In the second step, you will specify the basic features of your system such as the number of Motion Supervisors, Axes, Filters, Motors, etc. You can also set what kind of Command Line Parsing you wish to support.

MPI Objects to Include

This section will specify what objects will be included in the sample application and how many of each object to include. For example, if you want to use a Motion Supervisor object, you will need to check the checkbox labeled "Motion Supervisors". Then you may specify how many Motion Supervisors to use by changing the "Object Count" box next to the "Motion Supervisors" checkbox.

AppUtil Library Options

The following options require use of MEI's "Application Utility" library found in <MEI>\XMP\AppUtil\. Using any one of these options will add the application utility library to project created by the App Wizard.

Command Line Parsing
The following options determine what kind of command line parsing is used with the application. MFC projects ignore these options.

 

No Parsing
No command line parsing will be used. Parameters used for creating a controller object will be set to default values. The controller object will then be created for accessing controller 0 on the local machine. The AppUtil library is not required for this option.

Basic Parsing
No command line parsing will be used. Parameters used for creating a controller object will be set to default values. The controller object will then be created for accessing controller 0 on the local machine. The AppUtil library is not required for this option.

Advanced Parsing
Advanced command line parsing will be used. This will include the typical "basic" parsing, and add support for additional command line parameters. The App Wizard will add support for a dummy command line parameter which can be easily edited. More parameters can be easily added by the user as well.

 

Step 3

In the last step, you can change the location of where the file will be saved.

Root MEI Directory

This section allows the user to specify the location of MEI files. This should agree with the installation directory chosen by the MPI InstallShield®.

For MEI Employees Only:
To create a project to be added to the sample application directory, use the default directory specified in the "Other Directory" edit box. This will allow the project files to correctly locate MEI libraries no matter where the user installs the MPI.

MEI Sample Application

This setting is intended only for applications written by MEI and used as sample applications. Checking this option will have the following affect:

 
  • The MEI Copyright will be included in all source files.

  • Placeholders for MEI Sample application one-line and full descriptions will be included in the main source file.

  • The debug version of the sample application will use the debug version of the MPI DLL.

When you click the Finish button, a dialog window will appear asking you to verify the parameters of the sample application.

Click OK and your new MPI Sample Application will be built in Microsoft Visual Studio.

 

       Legal Notice  |  Tech Email  |  Feedback
      
Copyright ©
2001-2021 Motion Engineering