.

mpiCaptureConfigSet

Declaration

 
long mpiCaptureConfigSet(MPICapture       capture,
                         MPICaptureConfig *config,
                         void             *external)
  Required Header: stdmpi.h

Description

mpiCaptureConfigSet sets a Capture object's (capture) configuration using data from the structure pointed to by config, and also using data from the implementation-specific structure pointed to by external (if external is not NULL).

The Capture object's configuration information in external is in addition to the Capture object's configuration information in config, i.e, the Capture object's configuration information in config and in external is not the same information. Note that config or external can be NULL (but not both NULL).

If a capture has been previously configured (non-default), use mpiCaptureConfigReset(...) to return the capture to the default configuration before calling mpiCaptureConfigGet(...) and mpiCaptureConfigSet(...). Or if you do not call mpiCaptureConfigReset(...), make sure that all members of the MPICaptureConfig{...} structure are explicitly set before calling mpiCaptureConfigSet(...).

NOTE:
Do not reconfigure the source (trigger) capture resource with different settings via different MPICapture objects. Time-based capture allows you to capture multiple encoder positions using the same trigger.

Currently, each motor only has one trigger resource— i.e. one trigger whose trigger state may be configured. If MPICapture object 0 is configured to trigger off of motor 0's index line, and then MPICapture object 1 is configured to trigger off of motor 0's home input, then only the capture trigger for motor 0 will have been reconfigured. Both MPICapture object 0 and MPICapture object 1 will now trigger off of motor 0's home input.

If capture is used in a homing routine, always set home trigger polarity to TRUE (see MPIMotorEventTrigger). Home event status bit transitions from 0 to 1 when capture is triggered. Having polarity set to 0 (FALSE) may cause mpiCaptureStatus(…) to return MEICaptureMessageCAPTURE_STATE_INVALID.

Remarks

*external should be NULL.

 
Return Values  
MPIMessageOK  

See Also

mpiCaptureConfigGet | mpiCaptureConfigReset

 

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