int32_t  mpiControlStatisticsReset(MPIControl   control);

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


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

control a handle to the Control object.
Return Values

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. */ int32_t synqNetTimingStatistics(MPIControl control, MPISynqNet synqNet)
{ MPISynqNetTiming timingValues;
int32_t returnValue; // Grab Timing Data & Calculate Positions
returnValue = mpiControlStatisticsReset(mpiObjects->MPIControl());
if(returnValue != MPIMessageOK){
return returnValue;
} returnValue = MPISynqNetTiming(mpiObjects->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",*100); return returnValue;

See Also

mpiControlStatistics | MPIControlStatistics