MPIControlConfigEnabled

Definition

typedef struct MPIControlConfigEnabled {
int32_t motorCount;
int32_t filterCount;
int32_t mechaWareCount;
int32_t axisCount;
int32_t motionSupervisorCount;
int32_t mathBlockCount;
int32_t userLimitCount;
int32_t programSequencerCount;
int32_t dataRecorderCount;
int32_t compensatorCount;
int32_t captureCount;
} MPIControlConfigEnabled;

 

Required Header: stdmpi.h

Change History: Added in 04.00.

Description

The MPIControlConfigEnabled structure contains the number of objects processed by the controller.  The controller’s memory allocation is dynamic, allowing it to scale to fit the motion system.  While dynamic memory allocation provides exact fit flexibility, it also requires initial planning for applications that need to support multiple network topologies or need to scale the controller’s object counts during operation.

During SynqNet network initialization, the controller’s memory is dynamically allocated and initialized with MPIControlConfigDynamicMemAlloc and MPIControlConfigEnabled object counts (MS, Axis, Filter, Motor, etc.) matching the discovered network topology.  For example, if 2x nodes are discovered with 2x motors each, then the controller will be automatically configured to allocate and enable 4 MS, Axis, Filter, and Motor objects.

If your application uses the discovered object count, control object count configuration is not necessary.  To decrease the number of controller objects, reduce the enabled count to reduce the controller’s processing load.  To increase the number of controller objects, re-configure the controller’s MPIControlConfigDynamicMemAlloc and MPIControlConfigEnabled object counts.

WARNING!  Configuring the control MPIControlConfigDynamicMemAlloc object counts will clear the controller’s dynamic memory and any configurations previously written to the controller’s dynamic memory is lost.  It is recommended to configure the control MPIControlConfigDynamicMemAlloc object counts first, BEFORE configuring other objects.

motorCount Number of motor objects enabled for a controller. The controller's motor object handles the interface to the servo or stepper drive, dedicated I/O and general purpose motor related I/O. For simple systems, the motorCount should equal the number of physical motors connected to the controller.
filterCount Number of filter objects enabled for a controller. The filter object handles the closed-loop servo calculations to control the motor. For simple systems, set the filterCount equal to the motorCount.
mechaWareCount Number of mechaWare objects enabled for a controller. The mechaWare object handles the user specified closed-loop control model calculations to control the motor.
axisCount Number of axis objects enabled for the controller. The controller's axis object handles the trajectory calculations for command position. For simple systems, set the axisCount equal to the motorCount.
motionSupervisorCount Number of motion supervisor objects enabled for a controller. The controller's motion supervisor handles coordination of motion and events for an axis or group of axes. For simple systems, set the motionSupervisorCount equal to the axisCount.
mathBlockCount Number of math blocks enabled for the controller.
programSequencerCount Number of program sequencer objects enabled for the controller. The controller's program sequencer object executes and manages a sequence of pre-compiled controller commands.
compensatorCount This value defines the number of enabled compensator objects.
captureCount Number of capture objects enabled for the controller. The controller's capture object manages the hardware resources to latch a motor's position feedback, triggered by an input.
dataRecorderCount Number of data recorder objects enabled for a controller. The controller's recorder object handles collecting and buffering any data in controller memory. The data recorders can collect up to a total of 32 addresses each sample.
userLimitCount Number of user limit objects enabled for the controller. The controller's user limit object processes logic from input conditions to trigger an output, event, and/or action.

Sample Code

 

/* Configure capture objects */
returnValue =
    mpiControlConfigGet(control, &controlConfig);

/* Disable the capture object processing, but leave them allocated for future use. */
controlConfig.enabled.captureCount = 0;

if (returnValue == MPIMessageOK) {
    returnValue =
        mpiControlConfigSet(control, &controlConfig);
}

See Also

MPIControlConfigDynamicMemAlloc | mpiControlConfigGet | mpiControlConfigSet | MPIControlMAX_OBJECTS