.

MPIProbeData

Definition

 
typedef enum  MPIProbeData {
    MPIProbeDataPOSITION_PRIMARY,
    MPIProbeDataPOSITION_SECONDARY,
    MPIProbeDataTIME,
} MPIProbeData;

Description

MPIProbeData is an enumeration of Probe data types. This specifies to the probe engine what data to collect when triggered.

 
MPIProbeDataPOSITION_PRIMARY Position from the motor's primary feedback
MPIProbeDataPOSITION_SECONDARY Position from the motor's secondary feedback
MPIProbeDataTIME Clock value from the node. The clock value can be used to derive the position by interpolating between the positions from the previous sample and the present sample period and dividing by the difference between the probe clock value and the initial clock value.

Sample Code


/*
   This Function configures a Probe that has already been created. 
   Pass in the Probe Object, Probe Trigger Source, Probe Data Type 
   (Position or Time Capture Mode), and whether or not to use the 
   input Filter.
*/

long configProbe(MPIProbe           probe, 
                 MPIProbeSource     source, 
                 MPIProbeData       dataType, 
                 bool               inputFilter
{
  MPIProbeConfig  probeConfig;
long returnValue; returnValue = mpiProbeConfigGet(probe, &probeConfig, NULL);
if(returnValue != MPIMessageOK)
{
return returnValue;
} probeConfig.enable = TRUE;
probeConfig.source = source;
probeConfig.data = dataType;
probeConfig.inputFilter = inputFilter; //TRUE = high for > 4 samples, FALSE = no filter returnValue = mpiProbeConfigSet(probe, &probeConfig, NULL); return returnValue;
}

See Also

meiProbeConfigGet | meiProbeConfigSet | MPIProbeConfig

 

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