Function BlockGetCtrlPerfPLCopen motion iconPipe Network motion icon

Description

This function block returns controller CPU performance statistics.

Figure 7-191: GetCtrlPerf

See also:

Arguments

Input

Execute Description On the rising edgeClosedA rising edge is the transition of a digital signal from low to high. It is also called positive edge, request to collect the controller's performance data.
  Data type BOOL
  Range 0,1
  Unit N/A
  Default
DataPointCount Description The number of motion manager cycles over which performance statistics will be gathered.
  Data type UDINT
  Range 2 - 240,000
  Unit N/A
  Default

Output

Done Description If True, then the command completed successfully.
  Data type BOOL
Error Description If True, an error has occurred.
  Data type BOOL
ErrorID Description Indicates the error if Error output is set to TRUE.ErrorID = 0 indicates no error, ErrorID = 1 indicates an error
  Data type INT
MissedCycles Description Indicates the number of missing VM cycles.
  Data type UDINT
MeanVmTime Description The mean VM execution time measured in microseconds.
  Data type LREAL
StdDevVmTime Description The standard deviation of the VM execution time measured in microseconds.
  Data type LREAL
MinVmTime Description The minimum VM execution time measured in microseconds.
  Data type LREAL
MaxVmTime Description The maximum VM execution time measured in microseconds.
  Data type LREAL
MeanMotMgrTime Description The mean motion manager execution time measured in microseconds.
  Data type LREAL
StdDevMotMgrTime Description The standard deviation of the motion manager execution time measured in microseconds.
  Data type LREAL
MinMotMgrTime Description The minimum motion manager execution time measured in microseconds.
  Data type LREAL
MaxMotMgrTime Description The maximum motion manager execution time measured in microseconds.
  Data type LREAL
MeanCpuIdlePct Description The mean percentage of time the controller CPU is idle. CPU idle period is measured across all CPU cores.
  Data type LREAL
StdDevCpuIdlePct Description The standard deviation of the measurements of the time that the controller CPU is idle. CPU idle period is measured across all cpu cores.
  Data type LREAL
MinCpuIdlePct Description The minimum measurement of the time that the controller CPU is idle. CPU idle period is measured across all cpu cores.
  Data type LREAL
MaxCpuIdlePct Description The maximum measurement of the time that the controller CPU is idle. CPU idle period is measured across all cpu cores.
  Data type LREAL

Example

FBD

FFLD

Structured Text

//Read controller performance data from last 1000 cycles (1 second at T#1ms update rate)
Inst_GetCtrlPerf( ReadPerformanceData, 1000 );
IF Inst_GetCtrlInfo.Done THEN
MissedCycles:= Inst_GetCtrlPerf.MissedCycles;
MaxVmTimeMs:= Inst_GetCtrlPerf.MaxVmTime;
MaxMotionManagerTime:= Inst_GetCtrlPerf.MaxMotMgrTime;
MeanCPUIdlePercentage:= Inst_GetCtrlPerf.MeanCpuIdlePct;
MaxCPUIdlePercentage:= Inst_GetCtrlPerf.MaxCpuIdlePct;
END_IF;

Go back to the top of the page [Top]