.

mpiCaptureCreate

Declaration

 
MPICapture mpiCaptureCreate(MPIControl     control,
                            long           number);
  Required Header: stdmpi.h

Description

mpiCaptureCreate creates a Capture object. The Capture object is identified by its association with a motor object, the motor's encoder and the encoder's capture number. The maximum number of enabled captures is 32.

CaptureCreate is the equivalent of a C++ constructor.

NOTE: The default number of capture objects is zero. Make sure to change the number of capture objects to a value that includes your capture number before calling mpiCaptureCreate(…).

 
control a handle to a Control object
number An index to the encoder's capture block.
   
 
Return Values
handle to a Capture object
MPIHandleVOID if the object could not be created

Sample Code




/* Turn on one capture object for this example */
returnValue = mpiControlConfigGet(control, &controlConfig, NULL);
msgCHECK(returnValue);

controlConfig.captureCount = 1;

returnValue = mpiControlConfigSet(control, &controlConfig, NULL);
msgCHECK(returnValue);   

/* Create capture object */
captureNumber = 0;
capture = mpiCaptureCreate(control, captureNumber);
msgCHECK(mpiCaptureValidate(capture));

See Also

mpiCaptureNumber

 

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