.

mpiProbeCreate

Declaration

 
MPIProbe mpiProbeCreate(MPIControl        control,
                        MPIProbeParams    *params)
  Required Header: stdmpi.h

Description

mpiProbeCreate creates a Probe object identified by the params, which is associated with a control object. ProbeCreate is the equivalent of a C++ constructor.

The probe params structure specifies the probe type, a probe object identification number, and an index to a hardware probe engine. See MPIProbeParams for details.

 
control a handle to a Probe object.
*params a pointer to a probe parameter's structure.
   
 
Return Values
handle handle to a Probe object.
MPIHandleVOID if the object could not be created.
MPIProbeMessagePROBE_INVALID The probe number specified was invalid. The likely cause of this is that the node you are referring to does not support the probe feature. Please refer to the Node FPGA Images: Features Table to see if your node supports probe.

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

mpiProbeDelete | mpiProbeValidate | MPIProbeParams

 

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