GetCtrlPerf
Function Block - Returns controller CPU performance statistics.
Inputs
Input |
Data Type |
Range |
Unit |
Default |
Description |
---|---|---|---|---|---|
Execute |
BOOL |
0 to 1 |
N/A |
No default |
On the rising edge, request to collect the controller's performance data. |
DataPointCount |
UDINT |
2 - 240,000 |
Cycles |
No default |
The number of motion manager cycles over which performance statistics are gathered. |
Outputs
Output |
Data Type |
Range |
Unit |
Description |
---|---|---|---|---|
Done |
BOOL |
No range |
N/A |
If TRUE, the command completed successfully. |
Error |
BOOL |
No range |
N/A |
If TRUE, an error has occurred. |
ErrorID |
INT |
No range |
N/A |
|
MissedCycles |
UDINT |
No range |
N/A |
Indicates the number of missing VM cycles. |
MeanVmTime |
LREAL |
≥ 0 (zero) |
Microseconds |
The mean VM execution time. |
StdDevVmTime |
LREAL |
≥ 0 (zero) |
Microseconds |
The standard deviation of the VM execution time. |
MinVmTime |
LREAL |
≥ 0 (zero) |
Microseconds |
The minimum VM execution time. |
MaxVmTime |
LREAL |
≥ 0 (zero) |
Microseconds |
The maximum VM execution time. |
MeanMotMgrTime |
LREAL |
≥ 0 (zero) |
Microseconds |
The mean motion manager execution time. |
StdDevMotMgrTime |
LREAL |
≥ 0 (zero) |
Microseconds |
The standard deviation of the motion manager execution time. |
MinMotMgrTime |
LREAL |
≥ 0 (zero) |
Microseconds |
The minimum motion manager execution time. |
MaxMotMgrTime |
LREAL |
≥ 0 (zero) |
Microseconds |
The maximum motion manager execution time. |
MeanCpuIdlePct |
LREAL |
0 to 100 |
Percent |
The mean percentage of time the controller CPU is idle.
|
StdDevCpuIdlePct |
LREAL |
0 to 100 |
N/A |
|
MinCpuIdlePct |
LREAL |
0 to 100 |
N/A |
|
MaxCpuIdlePct |
LREAL |
0 to 100 |
N/A |
|
Remarks
Generates a text file with performance statistics of the controller.
Figure 1: GetCtrlPerf
FBD Language Example
FFLD Language Example
IL Language Example
Not available.
ST Language Example
//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;
See Also