Configuration Methods

Introduction

An object's configuration is static information that may be read and written, and an object retains its configuration until an application changes it. To configure an MPI object, you use a Config structure that is specific to each object.

To configure an MPI object, get the current Config from the motion controller by calling the ConfigGet method. Modify the Config structure as desired, and then send it back to the motion controller by calling the ConfigSet method.

If a motion controller has flash memory, you can configure that flash memory using the same Config structure. The MPI implementation handles all of the details for flash memory support; all your application needs is a handle to a flash memory object. If a motion controller does not have flash memory, the flash configuration methods will return MPIMessageUNSUPPORTED.

 

MPIObjectConfig{} Structure

An object's configuration structure contains all of the configurable items for that object. To configure an object, your application must declare a variable of type MPIObjectConfig{}. Note that some Config structures are very large, so if you declare a Config structure on a small stack, your application might encounter problems. A pointer to a Config structure is passed to the Config methods.

The MPI Config structures should be able to support generic object configurations for a variety of motion controllers. However, the MPI also provides you with a way to perform configuration unique to a particular motion controller. In addition to the MPIObjectConfig{} structure, MPI Config methods can also use an external configuration structure that is defined by the implementation.

For XMP only The external configuration structures are of type MEIObjectConfig{}.
Example The MEIAxisConfig{} structure contains XMP-specific configuration parameters that extend the configuration available in MPIAxisConfig{}.

Configuration Methods
Root Method .
ConfigGet mpiObjectConfigGet(...) Fill configuration structures with current motion controller configuration
ConfigSet mpiObjectConfigSet(...) Change current motion controller configuration

FlashConfigGet

 

FlashConfigSet

mpiObjectFlashConfigGet(...)

 

mpiObjectFlashConfigSet(...)

Fill configuration structures with current motion controller Flash configuration

Change current motion controller Flash configuration

 

 

mpiObjectConfigGet(...) / mpiObjectConfigSet(...)

The mpiObjectConfig( ) structure is meant to illustrate how objects are configured. Please swap the object you are interested in for the the object to configure. For example, mpiObjectConfigSet( ) shows the naming convention that mpiAxisConfigGet( ) follows.Both ConfigGet and ConfigSet take three arguments:
    • the first argument is the object handle (MPIObject)
    • the second argument is a pointer to an MPIObjectConfig{} structure (MPIObjectConfig *)
    • the third argument is a pointer to an external implementation-defined configuration structure (void *).The third argument may also be NULL
For XMP only The external argument is a pointer to an XMP-specific configuration structure of type MEIObjectConfig{}.

Use the Get method to fill the configuration structures with the current motion controller configuration for the object.
Use the Set method to change the current motion controller configuration for the object. (The Set method uses the configuration structures to do that.)

 

mpiObjectFlashConfigGet(...) / mpiObjectFlashConfigSet(...)

The FlashConfigGet and FlashConfigSet methods take four arguments:

    • The first argument is the object handle (MPIObject)
    • The second argument is an implementation-specific handle to Flash memory (void *).
    • The second argument can also be NULL.
    • The third argument is a pointer to an MPIObjectConfig{} structure (MPIObjectConfig *)
    • The fourth argument is a pointer to an external implementation-defined configuration structure (void *). The fourth argument can also be NULL.
For XMP only The flash handle is of type MEIFlash (second argument); the external argument (fourth argument) is a pointer to a configuration structure of type MEIObjectConfig{}.

Use the Get method to fill the configuration structures with the current motion controller Flash configuration for the object.
Use the Set method to change the current motion controller Flash configuration for the object. (The Set method uses the configuration structures to do that.)

The flash configuration is in effect after system start-up and also after resetting the motion controller (by calling the mpiControlReset(...) method).