F_GetTaskTotalTime

F_GetTaskTotalTime 1:

For a task index the function F_GetTaskTotalTime returns the total execution time of this task from the last cycle. The total execution time is the sum of the computing times of all modules that are registered on to the task.

If 0 is passed as task index, the value for the task in which the function is called is determined. If an invalid task index is passed, the function returns 0 as the total execution time.

The total execution time that was determined is shown as a multiple of 100 ns and returned by the function as a return parameter.

FUNCTION F_GetTaskTotalTime: UDINT

VAR_INPUT
    nTaskIndex : DINT;
END_VAR

nTaskIndex: Index of the task whose total execution time is to be determined. If 0 is passed as task index, the value for the task in which the function is called is determined.

See also:

Development environment

Target platform

PLC libraries to include

TwinCAT v3.1.4024.11

PC or CX (x86, x64, ARM)

Tc2_System (System) >= 3.4.24.0