F_GetCpuCoreIndex

F_GetCpuCoreIndex 1:

For a task index the function F_GetCpuCoreIndex returns the index of the CPU core on which the task runs.

If 0 is passed as task index, the CPU core index of the task in which the function is called is determined. If an invalid task index is passed, the function returns the CPU core index -1.

The function returns the determined CPU core index as a return parameter. It corresponds to the value of the Core column that is displayed in the Real-time sub-node below the SYSTEM node.

FUNCTION F_GetCpuCoreIndex: DINT

F_GetCpuCoreIndex 2: Inputs

VAR_INPUT
    nTaskIndex : DINT;
END_VAR

Name

Type

Description

nTaskIndex

DINT

Index of the task whose associated CPU index is to be determined. If 0 is passed as task index, the CPU core index of 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