.

Creating MPICapture Objects

The way MPICapture Objects are created has also changed. MPICapture objects are now associated with encoders. Before SynqNet, each capture could easily be enumerated across the entire controller, and thus MPICapture objects were created using an MPIControl handle. But with SynqNet, different drives can support different numbers of encoders, so this enumeration is now impossible. In SynqNet Phase II, MPICapture objects are now created using an MPIMotor handle. SynqNet Phase I had two different ways to access capture objects, one of which was identical to the analog MPI and the second was specific to SynqNet Phase I. The table below lists some of the differences between the ways capture objects are created or accessed.

MPI Version
Method for Creating/Accessing
Capture Objects
Handle Type
Used to Create
Capture Objects
Capture Objects
Need Deletion?
Analog
mpiCaptureCreate
MPIControl
Yes
SynqNet Phase I
mpiCaptureCreate
MPIControl
Yes
SynqNet Phase I
mpiMotorCapture
MPIMotor
No†
SynqNet Phase II
mpiCaptureCreate
MPIControl
Yes
† - These capture objects were created and deleted by the motor object.

The function prototypes for creating or accessing capture objects is listed below:

Analog / SynqNet Phase I
const MPICapture mpiCaptureCreate(MPIControl  control,
                                  long        number);


const MPICapture mpiMotorCapture(MPIMotor  motor,
                                 long      index);
SynqNet Phase II
MPICapture mpiCaptureCreate(MPIControl  control,
                            long        number);

The encoder argument identifies which encoder to create a capture for.

The number argument tells which capture to use on a particular encoder. Number represents the index of a zero-indexed array of captures, similar to the number argument for other mpiCreate. methods.

The function prototype for the for the mpiCaptureDelete() method has not changed.

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