.

Configuration Methods

Introduction | mpiObjectConfig{} Structure | mpiObjectConfigGet(...) / mpiObjectConfigSet(...)

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.

Warning: The mpiControlReset(), mpiControlResetToDefault(), and mpiControlConfigSet() methods will all erase previously configured object settings. For this reason these methods must be called before creating any dependent objects, (motors, axes, recorders, etc.). If these methods are called after the creation of dependent objects and error (MPIControlMessageOBJECTS_CREATED) will be returned. Extra care must be taken for multi-threaded applications. If objects are created in one thread, these control methods may not return an OBJECTS_CREATED error if called from a different thread. The same problems associated with objects created before calling these methods applies however even if the objects are in different threads.

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.

Configuration Methods

Root Method .
ConfigGet mpiObjectConfigGet(...) Fill configuration structures with current motion controller configuration
ConfigSet mpiObjectConfigSet(...) Change current motion controller 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.

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.)


Object Methods | Configuration Methods | Memory Methods | Status Methods
| Event Notification Methods | List Methods | Identity Methods

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