.

meiControlStatisticsReset

Declaration

 
long  meiControlStatisticsReset(MPIControl   control);

  Required Header: stdmei.h
Change History: Added in the 03.04.00

Description

meiControlStatisticsReset resets the controller's maxBackgroundTime and maxForegroundTime values, and recalculates the controller's statistics.

 
control a handle to the Control object.
   
 
Return Values
MPIMessageOK  

Sample Code


/*
This function allows you to calculate how much of your SynqNet cycle you are actually using. The Foreground Cycle is reading values from all the nodes, where the TX (transmit) is sending data to nodes, and commanding motion. The larger the TX Start means that the Transmiting is happening later in the SynqNet Cycle (increasing latency between reading values, and interpreting them). However it is crucial that the TX Cycle Start NEVER is lower than the Foreground Cycle legnth. Always leave a Buffer. */
long synqNetTimingStatistics(MPIControl control, MEISynqNet synqNet)
{ MEISynqNetTiming timingValues;
long returnValue; // Grab Timing Data & Calculate Positions
returnValue = meiControlStatisticsReset(meiObjects->MpiControl());
if(returnValue != MPIMessageOK){
return returnValue;
} returnValue = meiSynqNetTiming(meiObjects->MpiSynqNet(), &timingValues); if(returnValue != MPIMessageOK){
return returnValue;
} printf("Foreground Cycle Usage: %3.2lf%%\n", timingValues.calculationTime/SQcontrollerPeriod*100); printf("TX Start @ Cycle Percent: %3.2lf%%\n", timingValues.txTime);
printf("TX Cycle Usage: %3.2lf%%\n", timingValues.downstream.total/timingValues.controllerPeriod*100); return returnValue;
}

See Also

meiControlStatistics | MEIControlStatistics

 

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