.

MPIProbeParams

Definition

 
typedef struct MPIProbeParams {
    MPIProbeType     type;
    MPIProbeNumber   number;
    long             probeIndex;
} MPIProbeParams;

Description

MPIProbeParams specifies the parameters for a Probe engine.

 
type An enumerated Probe type. Determines the Probe number definition.
number An union to identify the object number that is associated with the Probe. The Probe type defines the number.
probeIndex An index to specify the Probe engine. The hardware may support one or more Probe engines per Motor or Node. The number of Probe engines supported by the hardware can be read with meiMotorInfo(...) and meiSqNodeInfo(...).

Sample Code


/*
This Function Creates a Probe. You must specify what Probe Type you wish to use: a Motor Probe, or Node Probe (typically a device will only support one mode, not both). The Probe number refers to the probe number you wish to refer throughout the program, where the Probe index is the probe number for that device (starting with 0). In the case of multiple probes on a single node, Index = 0, 1, 2, etc.
*/
long probeInit(MPIControl *control, MPIProbe *probe, MPIProbeType probeType, long intProbeNumber, long intProbeIndex) { MPIProbeParams probeParams;
long returnValue; //Probe Initialization
probeParams.type = probeType;
if(probeType == MPIProbeTypeMOTOR){
probeParams.number.motor = intProbeNumber;
}else{ // == MPIProbeTypeNODE
probeParams.number.node = intProbeNumber;
}
probeParams.probeIndex = intProbeIndex; *probe = mpiProbeCreate(*control, &probeParams);
returnValue = mpiProbeValidate(*probe);
return returnValue;
}

See Also

mpiProbeParams | mpiProbeCreate | MEIMotorInfo | MEISqNodeInfo

 

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