.

MPICaptureSource

Definition

typedef enum MPICaptureSource {
    MPICaptureSourceMOTOR_IO_0,
    MPICaptureSourceMOTOR_IO_1,
    MPICaptureSourceMOTOR_IO_2,
    MPICaptureSourceMOTOR_IO_3,
    MPICaptureSourceMOTOR_IO_4,
    MPICaptureSourceMOTOR_IO_5,
    MPICaptureSourceMOTOR_IO_6,
    MPICaptureSourceMOTOR_IO_7,
    MPICaptureSourceHOME,
    MPICaptureSourceINDEX,
    MPICaptureSourceLIMIT_HW_NEG,
    MPICaptureSourceLIMIT_HW_POS,
    MPICaptureSourceGLOBAL,
    MPICaptureSourceINDEX_SECONDARY,
    MPICaptureSourceCOUNT,
} MPICaptureSource;

Description

MPICaptureSource is an enumeration of input trigger sources for a capture.

For dedicated input capture sources, (Home, Index, Limits, etc.) use the enums defined in MPICaptureSource.

For general input capture sources, you will need to look up the node specific input enum that matches the MPICaptureSourceMOTOR_IO values. You can determine the appropriate MPICaptureSourceMOTOR_IO by referencing the appropriate node header file. In the node specific header file (manufacturer_model.h), look for the NodeMotorIoConfig (replacing "Node" with the node name). The NodeMotorIoConfig contains the indices for the node specific I/O bits that correspond to the MPICaptureSource enums. Use the MPICaptureSource enum that matches the node specific enum to select the capture trigger source.

 
MPICaptureSourceMOTOR_IO_0 a capture trigger source is the 0 bit in the motor's configurable I/O.
MPICaptureSourceMOTOR_IO_1 a capture trigger source is the 1 bit in the motor's configurable I/O.
MPICaptureSourceMOTOR_IO_2 a capture trigger source is the 2 bit in the motor's configurable I/O.
MPICaptureSourceMOTOR_IO_3 a capture trigger source is the 3 bit in the motor's configurable I/O.
MPICaptureSourceMOTOR_IO_4 a capture trigger source is the 4 bit in the motor's configurable I/O.
MPICaptureSourceMOTOR_IO_5 a capture trigger source is the 5 bit in the motor's configurable I/O.
MPICaptureSourceMOTOR_IO_6 a capture trigger source is the 6 bit in the motor's configurable I/O.
MPICaptureSourceMOTOR_IO_7 a capture trigger source is the 7 bit in the motor's configurable I/O.
MPICaptureSourceHOME a capture trigger source is the HOME input in the dedicated I/O input.
MPICaptureSourceINDEX a capture trigger source is the encoder INDEX input in the dedicated I/O input.
MPICaptureSourceLIMIT_HW_NEG a capture trigger source is the Hardware Negative Limit input in the dedicated I/O input.
MPICaptureSourceLIMIT_HW_POS a capture trigger source is the Hardware Positive Limit input in the dedicated IO word. Please see MPIMotorInfoDedicatedIn.
MPICaptureSourceGLOBAL a capture trigger source is the Global capture signal found on the node. Please see MPICaptureTriggerGlobal.
MPICaptureSourceINDEX_SECONDARY A a capture trigger source is the index on the secondary encoder. If position based capture is selected with the feedback source being the secondary encoder, this is the only valid capture source.
MPICaptureSourceCOUNT Total number of possible input sources for a capture.

Example: RMB-10V
Configure MEI RMB-10V capture for trigger on XCVR_C.

From RMBMotorIoConfig in mei_rmb.h:


typedef enum { /* index values for MEIMotorConfigIo[] */
RMBMotorIoConfigINVALID = -1, RMBMotorIoConfigXCVR_A = MEIMotorIoConfigIndex0, RMBMotorIoConfigXCVR_B = MEIMotorIoConfigIndex1, RMBMotorIoConfigXCVR_C = MEIMotorIoConfigIndex2, RMBMotorIoConfigUSER_0_IN = MEIMotorIoConfigIndex6, RMBMotorIoConfigUSER_0_OUT = MEIMotorIoConfigIndex7, RMBMotorIoConfigUSER_1_IN = MEIMotorIoConfigIndex8, RMBMotorIoConfigUSER_1_OUT = MEIMotorIoConfigIndex9, RMBMotorIoConfigUSER_2_IN = MEIMotorIoConfigIndex10, RMBMotorIoConfigUSER_2_OUT = MEIMotorIoConfigIndex11, RMBMotorIoConfigLAST, RMBMotorIoConfigFIRST = RMBMotorIoConfigINVALID + 1
} RMBMotorIoConfig;

The matching enumeration value for XCVR_C is RMBMotorIoConfigXCVR_C. RMBMotorIoConfigXCVR_C is defined as index 2. Thus, the MPICaptureSource to use is MPICaptureSourceMOTOR_IO_2 (the third MPICaptureSourceMOTOR_IO value).


MPICaptureConfig captureConfig; /* enable capture source trigger for XCVR_C on mei_rmb */
captureConfig.source[MPICaptureSourceMOTOR_IO_2].enabled = TRUE;

If you want to set the capture source for a HOME, simply use the MPICaptureSourceHOME enum.

Example: Trust TA800
To configure the capture source for hall A on a Trust TA800 node, use MPICaptureSourceMOTOR_IO_0 (matches to node specific enum: TA800MotorIoConfigHALL_A). Remember that you will need to look in trust_ta800.h (the node module) to find TA800MotorIoConfigHALL_A.

See Also

MPICaptureTrigger

 

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