. |
Configuring the Compensator Objects for OperationAfter determining the required compensator table size, we need to configure both the embedded compensation tables on controller and the MPI Compensator object. We will illustrate how to do this using the X-Y-Z system defined in the Determining Required Compensator Table Size section. Configuring Controller Compensation TableFrom our example in the previous section we have calculated that we need at least a point count of 105 to hold all of our measured compensation points (Acquiring and loading compensation points will be described in in the next section). First we need tell the motion controller to allocate memory space to hold the compensation table. We also need to enable a compensator since compensator objects are disabled on the controller by default. For an example, see the code below.
The comment above reminds us that calling mpiControlConfigSet(...) will reallocate dynamic memory. Reallocation of dynamic memory affects other objects on the controller, so it should only be done during system initialization and not during the execution of a move. Configuring the MPI Compensator ObjectContinuing with our example, we will now assume that our axis numbers for axis X, Y, and Z are 0, 1, & 2 respectively. If we also assume that the MPI Compensator object has already been created, the code to configure the object would look like the following:
Once we have the Compensation table allocated and have a configured Compensation object, the last step is to Load the Compensation Table. |
| | Copyright © 2001-2010 Motion Engineering |